From d92a4052b475c6be69ef4a978d2f6e304fe70db4 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Mon, 30 May 2022 18:35:17 +0100 Subject: [PATCH 01/86] feat: initial nitro migratoooor implementation --- .../arb-bridge-eth/contracts/bridge/Inbox.sol | 6 + .../contracts/bridge/NitroMigrator.sol | 177 ++++++++++++++++++ 2 files changed, 183 insertions(+) create mode 100644 packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol diff --git a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol index 209caa3de3..b73ff6f01e 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol @@ -36,6 +36,7 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { uint8 internal constant L2_MSG = 3; uint8 internal constant L1MessageType_L2FundedByL1 = 7; uint8 internal constant L1MessageType_submitRetryableTx = 9; + uint8 internal constant L1MessageType_chainHalt = 12; uint8 internal constant L2MessageType_unsignedEOATx = 0; uint8 internal constant L2MessageType_unsignedContractTx = 1; @@ -51,6 +52,11 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { WhitelistConsumer.whitelist = _whitelist; } + function chainHalt() external returns (uint256) { + require(msg.sender == Bridge(address(bridge)).owner(), "ONLY_BRIDGE_OWNER"); + return _deliverMessage(L1MessageType_chainHalt, msg.sender, abi.encodePacked("")); + } + /** * @notice Send a generic L2 message to the chain * @dev This method is an optimization to avoid having to emit the entirety of the messageData in a log. Instead validators are expected to be able to parse the data from the transaction's input diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol new file mode 100644 index 0000000000..d91cb73116 --- /dev/null +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -0,0 +1,177 @@ +// SPDX-License-Identifier: Apache-2.0 + +/* + * Copyright 2019-2021, Offchain Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import "./Bridge.sol"; +import "./Outbox.sol"; +import "./Inbox.sol"; +import "./SequencerInbox.sol"; +import "../rollup/RollupEventBridge.sol"; +import "./Old_Outbox/OldOutbox.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; +import "../rollup/facets/RollupAdmin.sol"; +import "../rollup/RollupLib.sol"; + +pragma solidity ^0.6.11; + +contract NitroMigrator is Ownable { + uint8 internal constant L1MessageType_chainHalt = 12; + + Inbox immutable inbox; + SequencerInbox immutable sequencerInbox; + Bridge immutable bridge; + RollupEventBridge immutable rollupEventBridge; + OldOutbox immutable outboxV1; + Outbox immutable outboxV2; + // assumed this contract is now the rollup admin + RollupAdminFacet immutable rollup; + + address immutable nitroBridge; + address immutable nitroOutbox; + address immutable nitroSequencerInbox; + address immutable nitroInboxLogic; + + // this is used track the message count in which the final inbox message was force included + // initially set to max uint256. after step 1 its set to sequencer's inbox message count + uint256 messageCountWithHalt; + + constructor( + Inbox _inbox, + SequencerInbox _sequencerInbox, + Bridge _bridge, + RollupEventBridge _rollupEventBridge, + OldOutbox _outboxV1, + Outbox _outboxV2, + RollupAdminFacet _rollup, + address _nitroBridge, + address _nitroOutbox, + address _nitroSequencerInbox, + address _nitroInboxLogic + ) public Ownable() { + inbox = _inbox; + sequencerInbox = _sequencerInbox; + bridge = _bridge; + rollupEventBridge = _rollupEventBridge; + rollup = _rollup; + outboxV1 = _outboxV1; + outboxV2 = _outboxV2; + nitroBridge = _nitroBridge; + nitroOutbox = _nitroOutbox; + nitroSequencerInbox = _nitroSequencerInbox; + nitroInboxLogic = _nitroInboxLogic; + // setting to max value means it won't be possible to execute step 2 before step 1 + messageCountWithHalt = type(uint256).max; + } + + /// @dev this assumes this contract owns the rollup/inboxes/bridge before this function is called (else it will revert) + /// this will create the final input in the inbox, but there won't be the final assertion available yet + function nitroStep1() external onlyOwner { + require(messageCountWithHalt == type(uint256).max, "STEP1_ALREADY_TRIGGERED"); + uint256 delayedMessageCount = inbox.chainHalt(); + + bridge.setInbox(address(inbox), false); + bridge.setInbox(address(outboxV1), false); + bridge.setInbox(address(outboxV2), false); + // we disable the rollupEventBridge later since its needed in order to create/confirm assertions + + bridge.setOutbox(address(this), true); + + { + uint256 bal = address(bridge).balance; + (bool success, ) = bridge.executeCall(nitroBridge, bal, ""); + require(success, "ESCROW_TRANSFER_FAIL"); + } + + bridge.setOutbox(address(this), false); + + // instead of a force include we can set maxDelayBlock and maxDelayTimestamp to (type(uint256).max - 2) + // there isn't an overflow protection, so this means it would overflow and return to the curr value - 1 + // passing the time delta requirement + uint256 prevMaxDelayBlocks = sequencerInbox.maxDelayBlocks(); + uint256 prevMaxDelaySeconds = sequencerInbox.maxDelaySeconds(); + + rollup.setSequencerInboxMaxDelay(type(uint256).max - 2, type(uint256).max - 2); + + // TODO: will this cause a sequencer reorg? + sequencerInbox.forceInclusion( + delayedMessageCount, + L1MessageType_chainHalt, + [block.number, block.timestamp], + delayedMessageCount, + tx.gasprice, + address(this), + keccak256(abi.encodePacked("")), + bridge.inboxAccs(delayedMessageCount - 1) + ); + + rollup.setSequencerInboxMaxDelay(prevMaxDelayBlocks, prevMaxDelaySeconds); + + // we can use this to verify in step 2 that the assertion includes the chainHalt message + messageCountWithHalt = sequencerInbox.messageCount(); + + // TODO: remove permissions from gas refunder to current sequencer inbox + + // TODO: trigger inbox upgrade to new logic + } + + /// @dev this assumes step 1 has executed succesfully and that a validator has made the final assertion that includes the inbox chainHalt + function nitroStep2( + bytes32[3] memory bytes32Fields, + uint256[4] memory intFields, + uint256 proposedBlock, + uint256 inboxMaxCount + ) external onlyOwner { + require(inboxMaxCount == messageCountWithHalt, "WRONG_MESSAGE_COUNT"); + + RollupLib.ExecutionState memory afterExecutionState = RollupLib.decodeExecutionState( + bytes32Fields, + intFields, + proposedBlock, + inboxMaxCount + ); + bytes32 expectedStateHash = RollupLib.stateHash(afterExecutionState); + + // TODO: should we provide the nodeNum instead as a param? can delete anything bigger than it from rollup + uint256 nodeNum = rollup.latestNodeCreated(); + // the actual nodehash doesn't matter, only its after state of execution + bytes32 actualStateHash = rollup.getNode(nodeNum).stateHash(); + require(expectedStateHash == actualStateHash, "WRONG_STATE_HASH"); + + // TODO: we can forceCreate the assertion and have the rollup paused in step 1 + rollup.pause(); + // we could disable the rollup user facet so only the admin can interact with the rollup + // would make the dispatch rollup revert when calling user facet. but easier to just pause it + + // TODO: ensure everyone is unstaked? + // need to wait until last assertion beforeforce confirm assertion + uint256 stakerCount = rollup.stakerCount(); + address[] memory stakers = new address[](stakerCount); + for (uint64 i = 0; i < stakerCount; ++i) { + stakers[i] = rollup.getStakerAddress(i); + } + // they now have withdrawable stake to claim + // rollup needs to be unpaused for this. + // TODO: we can remove `whenNotPaused` modifier from that function + rollup.forceRefundStaker(stakers); + + // TODO: forceResolveChallenge if any + // TODO: double check that challenges can't be created and new stakes cant be added + + bridge.setInbox(address(rollupEventBridge), false); + // enable new Bridge with funds (ie set old outboxes) + } +} From 366377cb6363dd3bb89ceb458aa600e776a05219 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Mon, 30 May 2022 18:45:28 +0100 Subject: [PATCH 02/86] feat: force inclusion without delay by admin to be used in nitro migration --- .../contracts/bridge/NitroMigrator.sol | 12 +--- .../contracts/bridge/SequencerInbox.sol | 55 +++++++++++++++++-- 2 files changed, 52 insertions(+), 15 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index d91cb73116..df036ef699 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -98,16 +98,8 @@ contract NitroMigrator is Ownable { bridge.setOutbox(address(this), false); - // instead of a force include we can set maxDelayBlock and maxDelayTimestamp to (type(uint256).max - 2) - // there isn't an overflow protection, so this means it would overflow and return to the curr value - 1 - // passing the time delta requirement - uint256 prevMaxDelayBlocks = sequencerInbox.maxDelayBlocks(); - uint256 prevMaxDelaySeconds = sequencerInbox.maxDelaySeconds(); - - rollup.setSequencerInboxMaxDelay(type(uint256).max - 2, type(uint256).max - 2); - // TODO: will this cause a sequencer reorg? - sequencerInbox.forceInclusion( + sequencerInbox.forceInclusionNoDelay( delayedMessageCount, L1MessageType_chainHalt, [block.number, block.timestamp], @@ -118,8 +110,6 @@ contract NitroMigrator is Ownable { bridge.inboxAccs(delayedMessageCount - 1) ); - rollup.setSequencerInboxMaxDelay(prevMaxDelayBlocks, prevMaxDelaySeconds); - // we can use this to verify in step 2 that the assertion includes the chainHalt message messageCountWithHalt = sequencerInbox.messageCount(); diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index 8feb7589e5..db165a1c50 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -92,7 +92,6 @@ contract SequencerInbox is ISequencerInbox, Cloneable { /** * @notice Move messages from the delayed inbox into the Sequencer inbox. Callable by any address. Necessary iff Sequencer hasn't included them before delay period expired. */ - function forceInclusion( uint256 _totalDelayedMessagesRead, uint8 kind, @@ -103,6 +102,57 @@ contract SequencerInbox is ISequencerInbox, Cloneable { bytes32 messageDataHash, bytes32 delayedAcc ) external { + // Can only force-include after the Sequencer-only window has expired. + require(l1BlockAndTimestamp[0] + maxDelayBlocks < block.number, "MAX_DELAY_BLOCKS"); + require(l1BlockAndTimestamp[1] + maxDelaySeconds < block.timestamp, "MAX_DELAY_TIME"); + + forceInclusionImpl( + _totalDelayedMessagesRead, + kind, + l1BlockAndTimestamp, + inboxSeqNum, + gasPriceL1, + sender, + messageDataHash, + delayedAcc + ); + } + + function forceInclusionNoDelay( + uint256 _totalDelayedMessagesRead, + uint8 kind, + uint256[2] calldata l1BlockAndTimestamp, + uint256 inboxSeqNum, + uint256 gasPriceL1, + address sender, + bytes32 messageDataHash, + bytes32 delayedAcc + ) external { + // no delay on force inclusion, triggered only by rollup's owner + require(Rollup(payable(rollup)).owner() == msg.sender, "ONLY_ROLLUP_OWNER"); + + forceInclusionImpl( + _totalDelayedMessagesRead, + kind, + l1BlockAndTimestamp, + inboxSeqNum, + gasPriceL1, + sender, + messageDataHash, + delayedAcc + ); + } + + function forceInclusionImpl( + uint256 _totalDelayedMessagesRead, + uint8 kind, + uint256[2] calldata l1BlockAndTimestamp, + uint256 inboxSeqNum, + uint256 gasPriceL1, + address sender, + bytes32 messageDataHash, + bytes32 delayedAcc + ) internal { require(_totalDelayedMessagesRead > totalDelayedMessagesRead, "DELAYED_BACKWARDS"); { bytes32 messageHash = Messages.messageHash( @@ -114,9 +164,6 @@ contract SequencerInbox is ISequencerInbox, Cloneable { gasPriceL1, messageDataHash ); - // Can only force-include after the Sequencer-only window has expired. - require(l1BlockAndTimestamp[0] + maxDelayBlocks < block.number, "MAX_DELAY_BLOCKS"); - require(l1BlockAndTimestamp[1] + maxDelaySeconds < block.timestamp, "MAX_DELAY_TIME"); // Verify that message hash represents the last message sequence of delayed message to be included bytes32 prevDelayedAcc = 0; From 01cbc34ff0af6a295097f64b289cf4019bc58a0d Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Mon, 30 May 2022 18:47:22 +0100 Subject: [PATCH 03/86] feat: allow validators to withdraw funds when rollup is paused --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 3 +-- packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index df036ef699..ff5675db76 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -154,8 +154,7 @@ contract NitroMigrator is Ownable { stakers[i] = rollup.getStakerAddress(i); } // they now have withdrawable stake to claim - // rollup needs to be unpaused for this. - // TODO: we can remove `whenNotPaused` modifier from that function + // rollup doesn't need to be unpaused for this. rollup.forceRefundStaker(stakers); // TODO: forceResolveChallenge if any diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index 9cb65d157c..493fa84317 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -591,7 +591,6 @@ contract RollupUserFacet is AbsRollupUserFacet { external override onlyValidator - whenNotPaused returns (uint256) { uint256 amount = withdrawFunds(msg.sender); From 6d02eb30a014bfa73c9438ccb8281d59a2cd4527 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Mon, 30 May 2022 18:53:43 +0100 Subject: [PATCH 04/86] refactor: shutdown message name and id --- packages/arb-bridge-eth/contracts/bridge/Inbox.sol | 6 +++--- .../arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol index b73ff6f01e..bf51765d43 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol @@ -36,7 +36,7 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { uint8 internal constant L2_MSG = 3; uint8 internal constant L1MessageType_L2FundedByL1 = 7; uint8 internal constant L1MessageType_submitRetryableTx = 9; - uint8 internal constant L1MessageType_chainHalt = 12; + uint8 internal constant L1MessageType_shutdownForNitro = 128; uint8 internal constant L2MessageType_unsignedEOATx = 0; uint8 internal constant L2MessageType_unsignedContractTx = 1; @@ -52,9 +52,9 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { WhitelistConsumer.whitelist = _whitelist; } - function chainHalt() external returns (uint256) { + function shutdownForNitro() external returns (uint256) { require(msg.sender == Bridge(address(bridge)).owner(), "ONLY_BRIDGE_OWNER"); - return _deliverMessage(L1MessageType_chainHalt, msg.sender, abi.encodePacked("")); + return _deliverMessage(L1MessageType_shutdownForNitro, msg.sender, abi.encodePacked("")); } /** diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index ff5675db76..5883d15948 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -29,7 +29,7 @@ import "../rollup/RollupLib.sol"; pragma solidity ^0.6.11; contract NitroMigrator is Ownable { - uint8 internal constant L1MessageType_chainHalt = 12; + uint8 internal constant L1MessageType_shutdownForNitro = 128; Inbox immutable inbox; SequencerInbox immutable sequencerInbox; @@ -81,7 +81,7 @@ contract NitroMigrator is Ownable { /// this will create the final input in the inbox, but there won't be the final assertion available yet function nitroStep1() external onlyOwner { require(messageCountWithHalt == type(uint256).max, "STEP1_ALREADY_TRIGGERED"); - uint256 delayedMessageCount = inbox.chainHalt(); + uint256 delayedMessageCount = inbox.shutdownForNitro(); bridge.setInbox(address(inbox), false); bridge.setInbox(address(outboxV1), false); @@ -101,7 +101,7 @@ contract NitroMigrator is Ownable { // TODO: will this cause a sequencer reorg? sequencerInbox.forceInclusionNoDelay( delayedMessageCount, - L1MessageType_chainHalt, + L1MessageType_shutdownForNitro, [block.number, block.timestamp], delayedMessageCount, tx.gasprice, @@ -110,7 +110,7 @@ contract NitroMigrator is Ownable { bridge.inboxAccs(delayedMessageCount - 1) ); - // we can use this to verify in step 2 that the assertion includes the chainHalt message + // we can use this to verify in step 2 that the assertion includes the shutdownForNitro message messageCountWithHalt = sequencerInbox.messageCount(); // TODO: remove permissions from gas refunder to current sequencer inbox @@ -118,7 +118,7 @@ contract NitroMigrator is Ownable { // TODO: trigger inbox upgrade to new logic } - /// @dev this assumes step 1 has executed succesfully and that a validator has made the final assertion that includes the inbox chainHalt + /// @dev this assumes step 1 has executed succesfully and that a validator has made the final assertion that includes the inbox shutdownForNitro function nitroStep2( bytes32[3] memory bytes32Fields, uint256[4] memory intFields, From bf1df24421dcadf3916d4343ecde517a4fbeb34c Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Mon, 30 May 2022 19:11:22 +0100 Subject: [PATCH 05/86] docs: add clarifications on expectations --- .../contracts/bridge/NitroMigrator.sol | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 5883d15948..cdfc1f21a3 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -78,11 +78,15 @@ contract NitroMigrator is Ownable { } /// @dev this assumes this contract owns the rollup/inboxes/bridge before this function is called (else it will revert) - /// this will create the final input in the inbox, but there won't be the final assertion available yet + /// this will create the final input in the inbox, but there won't be the final assertion available yet. + /// it is assumed that at this point the sequencer has stopped receiving txs and has posted its final batch on-chain function nitroStep1() external onlyOwner { require(messageCountWithHalt == type(uint256).max, "STEP1_ALREADY_TRIGGERED"); uint256 delayedMessageCount = inbox.shutdownForNitro(); + // the `bridge` won't have any enabled inboxes after nitroStep2, so force inclusion after this shouldn't be possible + // the rollup event bridge will update the delayed accumulator after the final rollup shutdown events, but this + // shouldn't be an issue bridge.setInbox(address(inbox), false); bridge.setInbox(address(outboxV1), false); bridge.setInbox(address(outboxV2), false); @@ -98,7 +102,10 @@ contract NitroMigrator is Ownable { bridge.setOutbox(address(this), false); - // TODO: will this cause a sequencer reorg? + // if the sequencer posted its final batch and was shutdown before `nitroStep1` this shouldn't be an issue + // we could lock the sequencer inbox with `forceInclusionNoDelay` but this wouldnt stop a reorg from accepting + // txs in the RPC interface without posting a batch. + // `nitroStep2` will only enforce inclusion of assertions that read up to this current point. sequencerInbox.forceInclusionNoDelay( delayedMessageCount, L1MessageType_shutdownForNitro, @@ -114,8 +121,6 @@ contract NitroMigrator is Ownable { messageCountWithHalt = sequencerInbox.messageCount(); // TODO: remove permissions from gas refunder to current sequencer inbox - - // TODO: trigger inbox upgrade to new logic } /// @dev this assumes step 1 has executed succesfully and that a validator has made the final assertion that includes the inbox shutdownForNitro @@ -159,8 +164,12 @@ contract NitroMigrator is Ownable { // TODO: forceResolveChallenge if any // TODO: double check that challenges can't be created and new stakes cant be added - bridge.setInbox(address(rollupEventBridge), false); + } + + function nitroStep3() external onlyOwner { // enable new Bridge with funds (ie set old outboxes) + // TODO: enable new elements of nitro chain (ie bridge, inbox, outbox, rollup, etc) + // TODO: trigger inbox upgrade to new logic } } From bcef7780bf47c5eef872fcd913f36f051d7befce Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 31 May 2022 12:07:53 +0100 Subject: [PATCH 06/86] add force confirm step to migrator --- .../contracts/bridge/NitroMigrator.sol | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index cdfc1f21a3..37f0e57e4d 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -128,7 +128,13 @@ contract NitroMigrator is Ownable { bytes32[3] memory bytes32Fields, uint256[4] memory intFields, uint256 proposedBlock, - uint256 inboxMaxCount + uint256 inboxMaxCount, + bytes32 beforeSendAcc, + bytes calldata sendsData, + uint256[] calldata sendLengths, + uint256 afterSendCount, + bytes32 afterLogAcc, + uint256 afterLogCount ) external onlyOwner { require(inboxMaxCount == messageCountWithHalt, "WRONG_MESSAGE_COUNT"); @@ -146,6 +152,16 @@ contract NitroMigrator is Ownable { bytes32 actualStateHash = rollup.getNode(nodeNum).stateHash(); require(expectedStateHash == actualStateHash, "WRONG_STATE_HASH"); + rollup.forceConfirmNode( + nodeNum, + beforeSendAcc, + sendsData, + sendLengths, + afterSendCount, + afterLogAcc, + afterLogCount + ); + // TODO: we can forceCreate the assertion and have the rollup paused in step 1 rollup.pause(); // we could disable the rollup user facet so only the admin can interact with the rollup From 579da99982e05bfaf511b6d00ace1844cd7fcb90 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 31 May 2022 12:23:04 +0100 Subject: [PATCH 07/86] Refactor seq inbox for nitro shutdown cleanup --- .../contracts/bridge/NitroMigrator.sol | 17 ++--- .../contracts/bridge/SequencerInbox.sol | 75 +++++++------------ 2 files changed, 33 insertions(+), 59 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 37f0e57e4d..cce731df94 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -80,7 +80,7 @@ contract NitroMigrator is Ownable { /// @dev this assumes this contract owns the rollup/inboxes/bridge before this function is called (else it will revert) /// this will create the final input in the inbox, but there won't be the final assertion available yet. /// it is assumed that at this point the sequencer has stopped receiving txs and has posted its final batch on-chain - function nitroStep1() external onlyOwner { + function nitroStep1(address[] calldata seqAddresses) external onlyOwner { require(messageCountWithHalt == type(uint256).max, "STEP1_ALREADY_TRIGGERED"); uint256 delayedMessageCount = inbox.shutdownForNitro(); @@ -102,19 +102,14 @@ contract NitroMigrator is Ownable { bridge.setOutbox(address(this), false); - // if the sequencer posted its final batch and was shutdown before `nitroStep1` this shouldn't be an issue - // we could lock the sequencer inbox with `forceInclusionNoDelay` but this wouldnt stop a reorg from accepting + // if the sequencer posted its final batch and was shutdown before `nitroStep1` there shouldn't be any reorgs + // we could lock the sequencer inbox with `shutdownForNitro` but this wouldnt stop a reorg from accepting // txs in the RPC interface without posting a batch. // `nitroStep2` will only enforce inclusion of assertions that read up to this current point. - sequencerInbox.forceInclusionNoDelay( + sequencerInbox.shutdownForNitro( delayedMessageCount, - L1MessageType_shutdownForNitro, - [block.number, block.timestamp], - delayedMessageCount, - tx.gasprice, - address(this), - keccak256(abi.encodePacked("")), - bridge.inboxAccs(delayedMessageCount - 1) + bridge.inboxAccs(delayedMessageCount - 1), + seqAddresses ); // we can use this to verify in step 2 that the assertion includes the shutdownForNitro message diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index db165a1c50..a095e5e064 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -106,54 +106,6 @@ contract SequencerInbox is ISequencerInbox, Cloneable { require(l1BlockAndTimestamp[0] + maxDelayBlocks < block.number, "MAX_DELAY_BLOCKS"); require(l1BlockAndTimestamp[1] + maxDelaySeconds < block.timestamp, "MAX_DELAY_TIME"); - forceInclusionImpl( - _totalDelayedMessagesRead, - kind, - l1BlockAndTimestamp, - inboxSeqNum, - gasPriceL1, - sender, - messageDataHash, - delayedAcc - ); - } - - function forceInclusionNoDelay( - uint256 _totalDelayedMessagesRead, - uint8 kind, - uint256[2] calldata l1BlockAndTimestamp, - uint256 inboxSeqNum, - uint256 gasPriceL1, - address sender, - bytes32 messageDataHash, - bytes32 delayedAcc - ) external { - // no delay on force inclusion, triggered only by rollup's owner - require(Rollup(payable(rollup)).owner() == msg.sender, "ONLY_ROLLUP_OWNER"); - - forceInclusionImpl( - _totalDelayedMessagesRead, - kind, - l1BlockAndTimestamp, - inboxSeqNum, - gasPriceL1, - sender, - messageDataHash, - delayedAcc - ); - } - - function forceInclusionImpl( - uint256 _totalDelayedMessagesRead, - uint8 kind, - uint256[2] calldata l1BlockAndTimestamp, - uint256 inboxSeqNum, - uint256 gasPriceL1, - address sender, - bytes32 messageDataHash, - bytes32 delayedAcc - ) internal { - require(_totalDelayedMessagesRead > totalDelayedMessagesRead, "DELAYED_BACKWARDS"); { bytes32 messageHash = Messages.messageHash( kind, @@ -176,6 +128,33 @@ contract SequencerInbox is ISequencerInbox, Cloneable { "DELAYED_ACCUMULATOR" ); } + forceInclusionImpl(_totalDelayedMessagesRead, delayedAcc); + } + + /// @dev this function is intended to force include the delayed inbox a final time in the nitro migration + function shutdownForNitro( + uint256 _totalDelayedMessagesRead, + bytes32 delayedAcc, + address[] calldata seqAddresses + ) external { + // no delay on force inclusion, triggered only by rollup's owner + require(Rollup(payable(rollup)).owner() == msg.sender, "ONLY_ROLLUP_OWNER"); + forceInclusionImpl(_totalDelayedMessagesRead, delayedAcc); + // the delayed inbox has all inboxes disabled, so state won't progress there. + // if there are no delayed inboxes and no sequencer addresses, the state can't progress anymore. + for (uint64 i = 0; i < seqAddresses.length; ++i) { + isSequencer[seqAddresses[i]] = false; + } + deprecatedSequencer = address(0); + } + + /// @dev allows anyone to disable sequencer addresses from the inbox in case the addresses provided in `shutdownForNitro` weren't exhaustive + function disableSequencer(address seqAddress) external { + isSequencer[seqAddress] = false; + } + + function forceInclusionImpl(uint256 _totalDelayedMessagesRead, bytes32 delayedAcc) internal { + require(_totalDelayedMessagesRead > totalDelayedMessagesRead, "DELAYED_BACKWARDS"); uint256 startNum = messageCount; bytes32 beforeAcc = 0; From ce96334b1c78a235f0e6d465697be0ed998f15f7 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 31 May 2022 12:28:12 +0100 Subject: [PATCH 08/86] refactor to cleanup diff --- .../arb-bridge-eth/contracts/bridge/SequencerInbox.sol | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index a095e5e064..206a558049 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -102,10 +102,6 @@ contract SequencerInbox is ISequencerInbox, Cloneable { bytes32 messageDataHash, bytes32 delayedAcc ) external { - // Can only force-include after the Sequencer-only window has expired. - require(l1BlockAndTimestamp[0] + maxDelayBlocks < block.number, "MAX_DELAY_BLOCKS"); - require(l1BlockAndTimestamp[1] + maxDelaySeconds < block.timestamp, "MAX_DELAY_TIME"); - { bytes32 messageHash = Messages.messageHash( kind, @@ -116,6 +112,9 @@ contract SequencerInbox is ISequencerInbox, Cloneable { gasPriceL1, messageDataHash ); + // Can only force-include after the Sequencer-only window has expired. + require(l1BlockAndTimestamp[0] + maxDelayBlocks < block.number, "MAX_DELAY_BLOCKS"); + require(l1BlockAndTimestamp[1] + maxDelaySeconds < block.timestamp, "MAX_DELAY_TIME"); // Verify that message hash represents the last message sequence of delayed message to be included bytes32 prevDelayedAcc = 0; From cf8aef90629d6bb33f5f6d81e6233e4a4e20114d Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 31 May 2022 14:29:46 +0100 Subject: [PATCH 09/86] respond to pr comments --- .../contracts/bridge/NitroMigrator.sol | 53 +++++++++++++------ 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index cce731df94..92bcaa2830 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -31,23 +31,36 @@ pragma solidity ^0.6.11; contract NitroMigrator is Ownable { uint8 internal constant L1MessageType_shutdownForNitro = 128; - Inbox immutable inbox; - SequencerInbox immutable sequencerInbox; - Bridge immutable bridge; - RollupEventBridge immutable rollupEventBridge; - OldOutbox immutable outboxV1; - Outbox immutable outboxV2; + Inbox public immutable inbox; + SequencerInbox public immutable sequencerInbox; + Bridge public immutable bridge; + RollupEventBridge public immutable rollupEventBridge; + OldOutbox public immutable outboxV1; + Outbox public immutable outboxV2; // assumed this contract is now the rollup admin - RollupAdminFacet immutable rollup; + RollupAdminFacet public immutable rollup; - address immutable nitroBridge; - address immutable nitroOutbox; - address immutable nitroSequencerInbox; - address immutable nitroInboxLogic; + address public immutable nitroBridge; + address public immutable nitroOutbox; + address public immutable nitroSequencerInbox; + address public immutable nitroInboxLogic; // this is used track the message count in which the final inbox message was force included // initially set to max uint256. after step 1 its set to sequencer's inbox message count - uint256 messageCountWithHalt; + uint256 public messageCountWithHalt; + + /// @dev The nitro migration includes various steps. + /// Step0 is setup with contract deployments and integrity checks + /// Step1 is settling the current state of inputs to the system (bridge, delayed and sequencer inbox) in a consistent way + /// Step2 is settling the current state of outputs to the system (rollup assertions) in a consistent way that includes state from step1 + /// Step3 is enabling the nitro chain from the state settled in Step1 and Step2 + enum NitroMigrationSteps { + Step0, + Step1, + Step2, + Step3 + } + NitroMigrationSteps public latestCompleteStep; constructor( Inbox _inbox, @@ -75,12 +88,14 @@ contract NitroMigrator is Ownable { nitroInboxLogic = _nitroInboxLogic; // setting to max value means it won't be possible to execute step 2 before step 1 messageCountWithHalt = type(uint256).max; + latestCompleteStep = NitroMigrationSteps.Step0; } /// @dev this assumes this contract owns the rollup/inboxes/bridge before this function is called (else it will revert) /// this will create the final input in the inbox, but there won't be the final assertion available yet. /// it is assumed that at this point the sequencer has stopped receiving txs and has posted its final batch on-chain function nitroStep1(address[] calldata seqAddresses) external onlyOwner { + require(latestCompleteStep == NitroMigrationSteps.Step0, "WRONG_STEP"); require(messageCountWithHalt == type(uint256).max, "STEP1_ALREADY_TRIGGERED"); uint256 delayedMessageCount = inbox.shutdownForNitro(); @@ -91,6 +106,8 @@ contract NitroMigrator is Ownable { bridge.setInbox(address(outboxV1), false); bridge.setInbox(address(outboxV2), false); // we disable the rollupEventBridge later since its needed in order to create/confirm assertions + // TODO: will the nitro node process these events from the rollup event bridge? probably not since these aren't force included. + // is it a problem that we're dropping these delayed messages? probably not. bridge.setOutbox(address(this), true); @@ -116,6 +133,7 @@ contract NitroMigrator is Ownable { messageCountWithHalt = sequencerInbox.messageCount(); // TODO: remove permissions from gas refunder to current sequencer inbox + latestCompleteStep = NitroMigrationSteps.Step1; } /// @dev this assumes step 1 has executed succesfully and that a validator has made the final assertion that includes the inbox shutdownForNitro @@ -123,7 +141,6 @@ contract NitroMigrator is Ownable { bytes32[3] memory bytes32Fields, uint256[4] memory intFields, uint256 proposedBlock, - uint256 inboxMaxCount, bytes32 beforeSendAcc, bytes calldata sendsData, uint256[] calldata sendLengths, @@ -131,17 +148,15 @@ contract NitroMigrator is Ownable { bytes32 afterLogAcc, uint256 afterLogCount ) external onlyOwner { - require(inboxMaxCount == messageCountWithHalt, "WRONG_MESSAGE_COUNT"); - + require(latestCompleteStep == NitroMigrationSteps.Step1, "WRONG_STEP"); RollupLib.ExecutionState memory afterExecutionState = RollupLib.decodeExecutionState( bytes32Fields, intFields, proposedBlock, - inboxMaxCount + messageCountWithHalt ); bytes32 expectedStateHash = RollupLib.stateHash(afterExecutionState); - // TODO: should we provide the nodeNum instead as a param? can delete anything bigger than it from rollup uint256 nodeNum = rollup.latestNodeCreated(); // the actual nodehash doesn't matter, only its after state of execution bytes32 actualStateHash = rollup.getNode(nodeNum).stateHash(); @@ -176,11 +191,15 @@ contract NitroMigrator is Ownable { // TODO: forceResolveChallenge if any // TODO: double check that challenges can't be created and new stakes cant be added bridge.setInbox(address(rollupEventBridge), false); + + latestCompleteStep = NitroMigrationSteps.Step2; } function nitroStep3() external onlyOwner { + require(latestCompleteStep == NitroMigrationSteps.Step2, "WRONG_STEP"); // enable new Bridge with funds (ie set old outboxes) // TODO: enable new elements of nitro chain (ie bridge, inbox, outbox, rollup, etc) // TODO: trigger inbox upgrade to new logic + latestCompleteStep = NitroMigrationSteps.Step3; } } From 7c54416809db7890384a2fc55f2b8bae12fd0c43 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 31 May 2022 14:31:03 +0100 Subject: [PATCH 10/86] Add comment of intermediate action needed --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 92bcaa2830..dbb163f9d9 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -54,6 +54,7 @@ contract NitroMigrator is Ownable { /// Step1 is settling the current state of inputs to the system (bridge, delayed and sequencer inbox) in a consistent way /// Step2 is settling the current state of outputs to the system (rollup assertions) in a consistent way that includes state from step1 /// Step3 is enabling the nitro chain from the state settled in Step1 and Step2 + /// Between steps 1 and 2 a validator needs to make the final assertion that includes the inbox shutdownForNitro message enum NitroMigrationSteps { Step0, Step1, From a07121cc83b1c1950d802468f14a372ecb49582e Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 31 May 2022 14:41:03 +0100 Subject: [PATCH 11/86] Add existence checks to nitro contracts --- .../contracts/bridge/NitroMigrator.sol | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index dbb163f9d9..cc4471c32d 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -20,11 +20,12 @@ import "./Bridge.sol"; import "./Outbox.sol"; import "./Inbox.sol"; import "./SequencerInbox.sol"; -import "../rollup/RollupEventBridge.sol"; import "./Old_Outbox/OldOutbox.sol"; -import "@openzeppelin/contracts/access/Ownable.sol"; import "../rollup/facets/RollupAdmin.sol"; +import "../rollup/RollupEventBridge.sol"; import "../rollup/RollupLib.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/utils/Address.sol"; pragma solidity ^0.6.11; @@ -83,10 +84,18 @@ contract NitroMigrator is Ownable { rollup = _rollup; outboxV1 = _outboxV1; outboxV2 = _outboxV2; + + // we check that the new contracts that will receive permissions are actually contracts + require(Address.isContract(_nitroBridge), "BRIDGE_NOT_CONTRACT"); + require(Address.isContract(_nitroOutbox), "OUTBOX_NOT_CONTRACT"); + require(Address.isContract(_nitroSequencerInbox), "SEQINBOX_NOT_CONTRACT"); + require(Address.isContract(_nitroInboxLogic), "INBOX_NOT_CONTRACT"); + nitroBridge = _nitroBridge; nitroOutbox = _nitroOutbox; nitroSequencerInbox = _nitroSequencerInbox; nitroInboxLogic = _nitroInboxLogic; + // setting to max value means it won't be possible to execute step 2 before step 1 messageCountWithHalt = type(uint256).max; latestCompleteStep = NitroMigrationSteps.Step0; From 15ba6c6467d2b4b17220cb16c0781a8f5eb1d034 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 31 May 2022 14:55:34 +0100 Subject: [PATCH 12/86] Add consistency checks to ensure contracts are ready for the nitro upgrade --- .../arb-bridge-eth/contracts/bridge/Inbox.sol | 4 +++ .../contracts/bridge/NitroMigrator.sol | 19 +++++++++--- .../contracts/bridge/SequencerInbox.sol | 4 +++ .../contracts/libraries/NitroReadyQuery.sol | 30 +++++++++++++++++++ .../contracts/rollup/facets/RollupUser.sol | 4 +++ 5 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol diff --git a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol index bf51765d43..f08e4fac19 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol @@ -52,6 +52,10 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { WhitelistConsumer.whitelist = _whitelist; } + function isNitroReady() external pure returns (bool) { + return true; + } + function shutdownForNitro() external returns (uint256) { require(msg.sender == Bridge(address(bridge)).owner(), "ONLY_BRIDGE_OWNER"); return _deliverMessage(L1MessageType_shutdownForNitro, msg.sender, abi.encodePacked("")); diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index cc4471c32d..fe066af899 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -24,6 +24,7 @@ import "./Old_Outbox/OldOutbox.sol"; import "../rollup/facets/RollupAdmin.sol"; import "../rollup/RollupEventBridge.sol"; import "../rollup/RollupLib.sol"; +import "../libraries/NitroReadyQuery.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; @@ -85,11 +86,21 @@ contract NitroMigrator is Ownable { outboxV1 = _outboxV1; outboxV2 = _outboxV2; + { + // we deploy a new contract to check if the rollup is ready so we can ensure the query + // is dispatched to the user facet, not the admin + NitroReadyQuery queryContract = new NitroReadyQuery(); + require(queryContract.isNitroReady(address(_rollup)), "ROLLUP_NOT_NITRO_READY"); + } + + require(_inbox.isNitroReady(), "INBOX_NOT_UPGRADED"); + require(_sequencerInbox.isNitroReady(), "SEQINBOX_NOT_UPGRADED"); + // we check that the new contracts that will receive permissions are actually contracts - require(Address.isContract(_nitroBridge), "BRIDGE_NOT_CONTRACT"); - require(Address.isContract(_nitroOutbox), "OUTBOX_NOT_CONTRACT"); - require(Address.isContract(_nitroSequencerInbox), "SEQINBOX_NOT_CONTRACT"); - require(Address.isContract(_nitroInboxLogic), "INBOX_NOT_CONTRACT"); + require(Address.isContract(_nitroBridge), "NITRO_BRIDGE_NOT_CONTRACT"); + require(Address.isContract(_nitroOutbox), "NITRO_OUTBOX_NOT_CONTRACT"); + require(Address.isContract(_nitroSequencerInbox), "NITRO_SEQINBOX_NOT_CONTRACT"); + require(Address.isContract(_nitroInboxLogic), "NITRO_INBOX_NOT_CONTRACT"); nitroBridge = _nitroBridge; nitroOutbox = _nitroOutbox; diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index 206a558049..b248f78de3 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -89,6 +89,10 @@ contract SequencerInbox is ISequencerInbox, Cloneable { emit MaxDelayUpdated(newMaxDelayBlocks, newMaxDelaySeconds); } + function isNitroReady() external pure returns (bool) { + return true; + } + /** * @notice Move messages from the delayed inbox into the Sequencer inbox. Callable by any address. Necessary iff Sequencer hasn't included them before delay period expired. */ diff --git a/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol b/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol new file mode 100644 index 0000000000..6629c7b70f --- /dev/null +++ b/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: Apache-2.0 + +/* + * Copyright 2019-2021, Offchain Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +pragma solidity ^0.6.11; + +interface NitroReadyContract { + function isNitroReady() external pure returns (bool); +} + +contract NitroReadyQuery { + /// @dev queries a contract to know if its ready for the nitro upgrade + function isNitroReady(address target) external pure returns (bool) { + return NitroReadyContract(target).isNitroReady(); + } +} diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index 493fa84317..cc05ff3a1c 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -598,6 +598,10 @@ contract RollupUserFacet is AbsRollupUserFacet { destination.transfer(amount); return amount; } + + function isNitroReady() external pure returns (bool) { + return true; + } } contract ERC20RollupUserFacet is AbsRollupUserFacet { From 31fa37cfbda76de433650a316b5ce0d5ad030d1c Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 31 May 2022 17:45:15 +0100 Subject: [PATCH 13/86] respond to pr comments --- .../arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index fe066af899..5337534a8a 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -87,8 +87,8 @@ contract NitroMigrator is Ownable { outboxV2 = _outboxV2; { - // we deploy a new contract to check if the rollup is ready so we can ensure the query - // is dispatched to the user facet, not the admin + // this contract is the rollup admin, and we want to check if the user facet is upgraded + // so we deploy a new contract to ensure the query is dispatched to the user facet, not the admin NitroReadyQuery queryContract = new NitroReadyQuery(); require(queryContract.isNitroReady(address(_rollup)), "ROLLUP_NOT_NITRO_READY"); } @@ -124,8 +124,8 @@ contract NitroMigrator is Ownable { // the rollup event bridge will update the delayed accumulator after the final rollup shutdown events, but this // shouldn't be an issue bridge.setInbox(address(inbox), false); - bridge.setInbox(address(outboxV1), false); - bridge.setInbox(address(outboxV2), false); + bridge.setOutbox(address(outboxV1), false); + bridge.setOutbox(address(outboxV2), false); // we disable the rollupEventBridge later since its needed in order to create/confirm assertions // TODO: will the nitro node process these events from the rollup event bridge? probably not since these aren't force included. // is it a problem that we're dropping these delayed messages? probably not. From 3f2edfbc75471743816943c7ed323b54e192e996 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Thu, 2 Jun 2022 12:46:47 +0100 Subject: [PATCH 14/86] respond to PR comments --- packages/arb-bridge-eth/contracts/bridge/Inbox.sol | 9 +++++++-- .../arb-bridge-eth/contracts/bridge/SequencerInbox.sol | 10 +++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol index f08e4fac19..5fbc78d743 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol @@ -36,6 +36,7 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { uint8 internal constant L2_MSG = 3; uint8 internal constant L1MessageType_L2FundedByL1 = 7; uint8 internal constant L1MessageType_submitRetryableTx = 9; + uint8 internal constant L1MessageType_endOfBlock = 6; uint8 internal constant L1MessageType_shutdownForNitro = 128; uint8 internal constant L2MessageType_unsignedEOATx = 0; @@ -56,9 +57,13 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { return true; } - function shutdownForNitro() external returns (uint256) { + function shutdownForNitro() external returns (uint256 msgNum) { require(msg.sender == Bridge(address(bridge)).owner(), "ONLY_BRIDGE_OWNER"); - return _deliverMessage(L1MessageType_shutdownForNitro, msg.sender, abi.encodePacked("")); + // we deliver an end of block message followed by the shutdown message + msgNum = _deliverMessage(L1MessageType_endOfBlock, msg.sender, abi.encodePacked("")); + msgNum = _deliverMessage(L1MessageType_shutdownForNitro, msg.sender, abi.encodePacked("")); + // only the last inbox message number is returned + return msgNum; } /** diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index b248f78de3..fd997327c5 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -142,7 +142,14 @@ contract SequencerInbox is ISequencerInbox, Cloneable { ) external { // no delay on force inclusion, triggered only by rollup's owner require(Rollup(payable(rollup)).owner() == msg.sender, "ONLY_ROLLUP_OWNER"); - forceInclusionImpl(_totalDelayedMessagesRead, delayedAcc); + + // if _totalDelayedMessagesRead == totalDelayedMessagesRead, we don't need to force include + // if _totalDelayedMessagesRead < totalDelayedMessagesRead we are trying to read backwards and will revert in forceInclusionImpl + // if _totalDelayedMessagesRead > totalDelayedMessagesRead we will force include the new delayed messages into the seqInbox + if (_totalDelayedMessagesRead != totalDelayedMessagesRead) { + forceInclusionImpl(_totalDelayedMessagesRead, delayedAcc); + } + // the delayed inbox has all inboxes disabled, so state won't progress there. // if there are no delayed inboxes and no sequencer addresses, the state can't progress anymore. for (uint64 i = 0; i < seqAddresses.length; ++i) { @@ -153,6 +160,7 @@ contract SequencerInbox is ISequencerInbox, Cloneable { /// @dev allows anyone to disable sequencer addresses from the inbox in case the addresses provided in `shutdownForNitro` weren't exhaustive function disableSequencer(address seqAddress) external { + require(deprecatedSequencer == address(0), "ONLY_AFTER_NITRO_SHUTDOWN"); isSequencer[seqAddress] = false; } From a9c5fbfa2ed21c06c663c4609e7e0d8759dc29a4 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Thu, 2 Jun 2022 12:50:29 +0100 Subject: [PATCH 15/86] Refactor isNitroReady hook to expect magic value --- packages/arb-bridge-eth/contracts/bridge/Inbox.sol | 4 ++-- .../arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 9 ++++++--- .../arb-bridge-eth/contracts/bridge/SequencerInbox.sol | 4 ++-- .../contracts/libraries/NitroReadyQuery.sol | 4 ++-- .../contracts/rollup/facets/RollupUser.sol | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol index 5fbc78d743..95e1b0674b 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol @@ -53,8 +53,8 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { WhitelistConsumer.whitelist = _whitelist; } - function isNitroReady() external pure returns (bool) { - return true; + function isNitroReady() external pure returns (uint8) { + return uint8(0xa4b1); } function shutdownForNitro() external returns (uint256 msgNum) { diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 5337534a8a..726cac26a4 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -90,11 +90,14 @@ contract NitroMigrator is Ownable { // this contract is the rollup admin, and we want to check if the user facet is upgraded // so we deploy a new contract to ensure the query is dispatched to the user facet, not the admin NitroReadyQuery queryContract = new NitroReadyQuery(); - require(queryContract.isNitroReady(address(_rollup)), "ROLLUP_NOT_NITRO_READY"); + require( + queryContract.isNitroReady(address(_rollup)) == uint8(0xa4b1), + "ROLLUP_NOT_NITRO_READY" + ); } - require(_inbox.isNitroReady(), "INBOX_NOT_UPGRADED"); - require(_sequencerInbox.isNitroReady(), "SEQINBOX_NOT_UPGRADED"); + require(_inbox.isNitroReady() == uint8(0xa4b1), "INBOX_NOT_UPGRADED"); + require(_sequencerInbox.isNitroReady() == uint8(0xa4b1), "SEQINBOX_NOT_UPGRADED"); // we check that the new contracts that will receive permissions are actually contracts require(Address.isContract(_nitroBridge), "NITRO_BRIDGE_NOT_CONTRACT"); diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index fd997327c5..1c70a72d29 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -89,8 +89,8 @@ contract SequencerInbox is ISequencerInbox, Cloneable { emit MaxDelayUpdated(newMaxDelayBlocks, newMaxDelaySeconds); } - function isNitroReady() external pure returns (bool) { - return true; + function isNitroReady() external pure returns (uint8) { + return uint8(0xa4b1); } /** diff --git a/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol b/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol index 6629c7b70f..5a210f3cc3 100644 --- a/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol +++ b/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol @@ -19,12 +19,12 @@ pragma solidity ^0.6.11; interface NitroReadyContract { - function isNitroReady() external pure returns (bool); + function isNitroReady() external pure returns (uint8); } contract NitroReadyQuery { /// @dev queries a contract to know if its ready for the nitro upgrade - function isNitroReady(address target) external pure returns (bool) { + function isNitroReady(address target) external pure returns (uint8) { return NitroReadyContract(target).isNitroReady(); } } diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index cc05ff3a1c..c14627e545 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -599,8 +599,8 @@ contract RollupUserFacet is AbsRollupUserFacet { return amount; } - function isNitroReady() external pure returns (bool) { - return true; + function isNitroReady() external pure returns (uint8) { + return uint8(0xa4b1); } } From d035013b56d3e5809a36187806e705bdcb8a9267 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Thu, 2 Jun 2022 13:59:56 +0100 Subject: [PATCH 16/86] Add shutdownForNitro rollup admin functionality --- .../contracts/bridge/NitroMigrator.sol | 4 ++- .../contracts/rollup/Rollup.sol | 11 ++++++ .../contracts/rollup/facets/RollupAdmin.sol | 35 +++++++++++++++++++ .../contracts/rollup/facets/RollupUser.sol | 14 ++++---- 4 files changed, 57 insertions(+), 7 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 726cac26a4..516223885e 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -92,9 +92,11 @@ contract NitroMigrator is Ownable { NitroReadyQuery queryContract = new NitroReadyQuery(); require( queryContract.isNitroReady(address(_rollup)) == uint8(0xa4b1), - "ROLLUP_NOT_NITRO_READY" + "USER_ROLLUP_NOT_NITRO_READY" ); } + // this returns a different magic value so we can differentiate the user and admin facets + require(_rollup.isNitroReady() == uint8(0xa4b2), "ADMIN_ROLLUP_NOT_NITRO_READY"); require(_inbox.isNitroReady() == uint8(0xa4b1), "INBOX_NOT_UPGRADED"); require(_sequencerInbox.isNitroReady() == uint8(0xa4b1), "SEQINBOX_NOT_UPGRADED"); diff --git a/packages/arb-bridge-eth/contracts/rollup/Rollup.sol b/packages/arb-bridge-eth/contracts/rollup/Rollup.sol index 9a8ed66be2..f7377ed698 100644 --- a/packages/arb-bridge-eth/contracts/rollup/Rollup.sol +++ b/packages/arb-bridge-eth/contracts/rollup/Rollup.sol @@ -66,6 +66,17 @@ abstract contract RollupBase is Cloneable, RollupCore, Pausable { mapping(address => bool) isValidator; + /// @dev indicates if the rollup is in shutdown for nitro mode. can only be toggled by `shutdownForNitro` in admin facet + bool public shutdownForNitroMode; + + /// @dev allows a function to be executed either if contract is either in `shutdownForNitroMode` or not paused + modifier whenInShutdownModeOrNotPaused() { + if (!shutdownForNitroMode) { + require(!paused(), "Pausable: paused"); + } + _; + } + /// @notice DEPRECATED -- this method is deprecated but still mantained for backward compatibility /// @dev this actually returns the avmGasSpeedLimitPerBlock /// @return this actually returns the avmGasSpeedLimitPerBlock diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol index 928dc43d4e..c9ecd8a476 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol @@ -3,6 +3,7 @@ pragma solidity ^0.6.11; import "../Rollup.sol"; +import "../INode.sol"; import "./IRollupFacets.sol"; import "../../bridge/interfaces/IOutbox.sol"; import "../../bridge/interfaces/ISequencerInbox.sol"; @@ -322,4 +323,38 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { ); emit OwnerFunctionCalled(24); } + + /// @dev this function is intended to be called as part of the shutdown process of the classic contracts in favour of nitro + /// It is expected that the rollup is not paused during the start of shutdown step, the shutdown procedure will pause the rollup. + /// A final rollup node number is specified, then the rollup will only allow that node and its direct predecessors to be confirmed. + /// All nodes that aren't directly previous to this are deleted, but in practice none are expected to be present (as this would mean an eventual challenge). + /// Even though the rollup is paused, we use the `shutdownForNitroMode` var to allow validators to go through the sequence of final nodes confirming them so their send values are added to the outbox + /// The deadline for the nodes marked as final are ignored to a lower value to allow for these faster confirmations, which will make L2 to L1 txs available for execution sooner + function shutdownForNitro(uint256 finalNodeNum) external whenNotPaused { + uint256 latestConfirmedNodeNum = latestConfirmed(); + { + // first we destroy all nodes that aren't in the correct chain + uint256 curr = finalNodeNum; + uint256 expectedPrev = finalNodeNum; + // if finalNodeNum == latestConfirmed we don't need to delete any siblings + while (curr != latestConfirmedNodeNum) { + if (curr == expectedPrev) { + INode currNode = getNode(curr); + expectedPrev = currNode.prev(); + } else { + destroyNode(curr); + } + curr -= 1; + } + } + + // TODO: should this remove stakers? + + shutdownForNitroMode = true; + _pause(); + } + + function isNitroReady() external pure returns (uint8) { + return uint8(0xa4b2); + } } diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index c14627e545..7a25220ae1 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -77,7 +77,7 @@ abstract contract AbsRollupUserFacet is RollupBase, IRollupUser { uint256 afterSendCount, bytes32 afterLogAcc, uint256 afterLogCount - ) external onlyValidator whenNotPaused { + ) external onlyValidator whenInShutdownModeOrNotPaused { requireUnresolvedExists(); // There is at least one non-zombie staker @@ -85,14 +85,15 @@ abstract contract AbsRollupUserFacet is RollupBase, IRollupUser { INode node = getNode(firstUnresolvedNode()); - // Verify the block's deadline has passed - node.requirePastDeadline(); + if (!shutdownForNitroMode) { + // Verify the block's deadline has passed + node.requirePastDeadline(); + getNode(latestConfirmed()).requirePastChildConfirmDeadline(); + } // Check that prev is latest confirmed require(node.prev() == latestConfirmed(), "INVALID_PREV"); - getNode(latestConfirmed()).requirePastChildConfirmDeadline(); - removeOldZombies(0); // All non-zombie stakers are staked on this node @@ -591,6 +592,7 @@ contract RollupUserFacet is AbsRollupUserFacet { external override onlyValidator + whenInShutdownModeOrNotPaused returns (uint256) { uint256 amount = withdrawFunds(msg.sender); @@ -650,7 +652,7 @@ contract ERC20RollupUserFacet is AbsRollupUserFacet { external override onlyValidator - whenNotPaused + whenInShutdownModeOrNotPaused returns (uint256) { uint256 amount = withdrawFunds(msg.sender); From 882ab5125cd12f391f8120a229beb137366ce30d Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Thu, 2 Jun 2022 14:59:22 +0100 Subject: [PATCH 17/86] Update migration flow to allow for validators to confirm sequentially after final assertion --- .../contracts/bridge/NitroMigrator.sol | 103 +++++------------- .../contracts/rollup/RollupCore.sol | 2 +- .../contracts/rollup/facets/RollupAdmin.sol | 48 +++++--- .../contracts/rollup/facets/RollupUser.sol | 7 +- 4 files changed, 71 insertions(+), 89 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 516223885e..20e3cbbd4c 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -47,16 +47,23 @@ contract NitroMigrator is Ownable { address public immutable nitroSequencerInbox; address public immutable nitroInboxLogic; - // this is used track the message count in which the final inbox message was force included - // initially set to max uint256. after step 1 its set to sequencer's inbox message count - uint256 public messageCountWithHalt; - /// @dev The nitro migration includes various steps. - /// Step0 is setup with contract deployments and integrity checks - /// Step1 is settling the current state of inputs to the system (bridge, delayed and sequencer inbox) in a consistent way - /// Step2 is settling the current state of outputs to the system (rollup assertions) in a consistent way that includes state from step1 - /// Step3 is enabling the nitro chain from the state settled in Step1 and Step2 - /// Between steps 1 and 2 a validator needs to make the final assertion that includes the inbox shutdownForNitro message + /// + /// > Step0 is setup with contract deployments and integrity checks + /// + /// This is the setup for the upgrade, where all contracts are deployed but the upgrade migration hasn't started yet. + /// Before Step1 the ownership of the Inbox / Rollup / Outbox / Bridge / SequencerInbox must all be transferred to this contract + /// The sequencer should stop receiving messages over RPC and post its final batch before Step1 is called. + /// + /// > Step1 is settling the current state of inputs to the system (bridge, delayed and sequencer inbox) in a consistent way + /// + /// The validator must now post the final assertion that executes all messages included in Step1 (ie the shutdownForNitro message) + /// + /// > Step2 is settling the current state of outputs to the system (rollup assertions) in a consistent way that includes state from step1. This pauses most of the rollup functionality + /// + /// The validator is now able to confirm all pending nodes between latestConfirmed and latestCreated. Step3 is only possible after this happens. + /// + /// > Step3 is enabling the nitro chain from the state settled in Step1 and Step2. enum NitroMigrationSteps { Step0, Step1, @@ -112,8 +119,6 @@ contract NitroMigrator is Ownable { nitroSequencerInbox = _nitroSequencerInbox; nitroInboxLogic = _nitroInboxLogic; - // setting to max value means it won't be possible to execute step 2 before step 1 - messageCountWithHalt = type(uint256).max; latestCompleteStep = NitroMigrationSteps.Step0; } @@ -122,7 +127,6 @@ contract NitroMigrator is Ownable { /// it is assumed that at this point the sequencer has stopped receiving txs and has posted its final batch on-chain function nitroStep1(address[] calldata seqAddresses) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step0, "WRONG_STEP"); - require(messageCountWithHalt == type(uint256).max, "STEP1_ALREADY_TRIGGERED"); uint256 delayedMessageCount = inbox.shutdownForNitro(); // the `bridge` won't have any enabled inboxes after nitroStep2, so force inclusion after this shouldn't be possible @@ -131,9 +135,10 @@ contract NitroMigrator is Ownable { bridge.setInbox(address(inbox), false); bridge.setOutbox(address(outboxV1), false); bridge.setOutbox(address(outboxV2), false); + // we disable the rollupEventBridge later since its needed in order to create/confirm assertions - // TODO: will the nitro node process these events from the rollup event bridge? probably not since these aren't force included. - // is it a problem that we're dropping these delayed messages? probably not. + // the rollup event bridge will still add messages to the Bridge's accumulator, but these will never be included into the sequencer inbox + // it is not a problem that these messages will be lost, as long as classic shutdown and nitro boot are deterministic bridge.setOutbox(address(this), true); @@ -146,8 +151,8 @@ contract NitroMigrator is Ownable { bridge.setOutbox(address(this), false); // if the sequencer posted its final batch and was shutdown before `nitroStep1` there shouldn't be any reorgs - // we could lock the sequencer inbox with `shutdownForNitro` but this wouldnt stop a reorg from accepting - // txs in the RPC interface without posting a batch. + // even though we remove the seqAddr from the sequencer inbox with `shutdownForNitro` this wouldnt stop a reorg from + // the sequencer accepting txs in the RPC interface without posting a batch. // `nitroStep2` will only enforce inclusion of assertions that read up to this current point. sequencerInbox.shutdownForNitro( delayedMessageCount, @@ -155,77 +160,29 @@ contract NitroMigrator is Ownable { seqAddresses ); - // we can use this to verify in step 2 that the assertion includes the shutdownForNitro message - messageCountWithHalt = sequencerInbox.messageCount(); - // TODO: remove permissions from gas refunder to current sequencer inbox latestCompleteStep = NitroMigrationSteps.Step1; } /// @dev this assumes step 1 has executed succesfully and that a validator has made the final assertion that includes the inbox shutdownForNitro - function nitroStep2( - bytes32[3] memory bytes32Fields, - uint256[4] memory intFields, - uint256 proposedBlock, - bytes32 beforeSendAcc, - bytes calldata sendsData, - uint256[] calldata sendLengths, - uint256 afterSendCount, - bytes32 afterLogAcc, - uint256 afterLogCount - ) external onlyOwner { + function nitroStep2(uint256 finalNodeNum) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step1, "WRONG_STEP"); - RollupLib.ExecutionState memory afterExecutionState = RollupLib.decodeExecutionState( - bytes32Fields, - intFields, - proposedBlock, - messageCountWithHalt - ); - bytes32 expectedStateHash = RollupLib.stateHash(afterExecutionState); - - uint256 nodeNum = rollup.latestNodeCreated(); - // the actual nodehash doesn't matter, only its after state of execution - bytes32 actualStateHash = rollup.getNode(nodeNum).stateHash(); - require(expectedStateHash == actualStateHash, "WRONG_STATE_HASH"); - - rollup.forceConfirmNode( - nodeNum, - beforeSendAcc, - sendsData, - sendLengths, - afterSendCount, - afterLogAcc, - afterLogCount - ); - - // TODO: we can forceCreate the assertion and have the rollup paused in step 1 - rollup.pause(); - // we could disable the rollup user facet so only the admin can interact with the rollup - // would make the dispatch rollup revert when calling user facet. but easier to just pause it - - // TODO: ensure everyone is unstaked? - // need to wait until last assertion beforeforce confirm assertion - uint256 stakerCount = rollup.stakerCount(); - address[] memory stakers = new address[](stakerCount); - for (uint64 i = 0; i < stakerCount; ++i) { - stakers[i] = rollup.getStakerAddress(i); - } - // they now have withdrawable stake to claim - // rollup doesn't need to be unpaused for this. - rollup.forceRefundStaker(stakers); - - // TODO: forceResolveChallenge if any - // TODO: double check that challenges can't be created and new stakes cant be added - bridge.setInbox(address(rollupEventBridge), false); - + rollup.shutdownForNitro(finalNodeNum); latestCompleteStep = NitroMigrationSteps.Step2; } function nitroStep3() external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step2, "WRONG_STEP"); + require( + rollup.latestConfirmed() == rollup.latestNodeCreated(), + "ROLLUP_SHUTDOWN_NOT_COMPLETE" + ); + bridge.setInbox(address(rollupEventBridge), false); + // enable new Bridge with funds (ie set old outboxes) // TODO: enable new elements of nitro chain (ie bridge, inbox, outbox, rollup, etc) // TODO: trigger inbox upgrade to new logic + latestCompleteStep = NitroMigrationSteps.Step3; } } diff --git a/packages/arb-bridge-eth/contracts/rollup/RollupCore.sol b/packages/arb-bridge-eth/contracts/rollup/RollupCore.sol index d19d78515e..83c92e038f 100644 --- a/packages/arb-bridge-eth/contracts/rollup/RollupCore.sol +++ b/packages/arb-bridge-eth/contracts/rollup/RollupCore.sol @@ -73,7 +73,7 @@ contract RollupCore is IRollupCore { * @param stakerNum Index of the staker * @return Address of the staker */ - function getStakerAddress(uint256 stakerNum) external view override returns (address) { + function getStakerAddress(uint256 stakerNum) public view override returns (address) { return _stakerList[stakerNum]; } diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol index c9ecd8a476..604a191da7 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol @@ -331,27 +331,47 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { /// Even though the rollup is paused, we use the `shutdownForNitroMode` var to allow validators to go through the sequence of final nodes confirming them so their send values are added to the outbox /// The deadline for the nodes marked as final are ignored to a lower value to allow for these faster confirmations, which will make L2 to L1 txs available for execution sooner function shutdownForNitro(uint256 finalNodeNum) external whenNotPaused { + // TODO: prove that final node num includes the last send by arbos + + uint256 latestCreated = latestNodeCreated(); + // delete all nodes created after the final one (which should be none) + while (latestCreated > finalNodeNum) { + destroyNode(latestCreated); + latestCreated--; + } + uint256 latestConfirmedNodeNum = latestConfirmed(); - { - // first we destroy all nodes that aren't in the correct chain - uint256 curr = finalNodeNum; - uint256 expectedPrev = finalNodeNum; - // if finalNodeNum == latestConfirmed we don't need to delete any siblings - while (curr != latestConfirmedNodeNum) { - if (curr == expectedPrev) { - INode currNode = getNode(curr); - expectedPrev = currNode.prev(); - } else { - destroyNode(curr); - } - curr -= 1; + + // first we destroy all nodes that aren't in the correct chain + uint256 curr = finalNodeNum; + uint256 expectedPrev = finalNodeNum; + // if finalNodeNum == latestConfirmed we don't need to delete any siblings + while (curr != latestConfirmedNodeNum) { + if (curr == expectedPrev) { + INode currNode = getNode(curr); + expectedPrev = currNode.prev(); + } else { + destroyNode(curr); + } + curr--; + } + + uint256 stakerCount = stakerCount(); + for (uint64 i = 0; i < stakerCount; ++i) { + address stakerAddr = getStakerAddress(i); + if (getNode(latestStakedNode(stakerAddr)) == INode(0)) { + // this node got destroyed, so we force refund the staker + reduceStakeTo(stakerAddr, 0); + turnIntoZombie(stakerAddr); } + // else the staker can unstake and withdraw regularly using `returnOldDeposit` } - // TODO: should this remove stakers? + // TODO: do we force resolve challenges? shouldn't be needed shutdownForNitroMode = true; _pause(); + emit OwnerFunctionCalled(25); } function isNitroReady() external pure returns (uint8) { diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index 7a25220ae1..b7f2199136 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -231,7 +231,12 @@ abstract contract AbsRollupUserFacet is RollupBase, IRollupUser { * and move it to the desired node. * @param stakerAddress Address of the staker whose stake is refunded */ - function returnOldDeposit(address stakerAddress) external override onlyValidator whenNotPaused { + function returnOldDeposit(address stakerAddress) + external + override + onlyValidator + whenInShutdownModeOrNotPaused + { require(latestStakedNode(stakerAddress) <= latestConfirmed(), "TOO_RECENT"); requireUnchallengedStaker(stakerAddress); withdrawStaker(stakerAddress); From 816c90d0753316e65ff7ff4a41105842235e19e0 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Thu, 2 Jun 2022 16:00:44 +0100 Subject: [PATCH 18/86] Add ownership transfer to rollup admin --- .../arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol index 604a191da7..06b18d5233 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol @@ -10,6 +10,7 @@ import "../../bridge/interfaces/ISequencerInbox.sol"; import "../../libraries/Whitelist.sol"; import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; contract RollupAdminFacet is RollupBase, IRollupAdmin { /** @@ -374,6 +375,12 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { emit OwnerFunctionCalled(25); } + /// @dev allows the admin to transfer the ownership of a contract controlled by the rollup + function transferOwnership(Ownable target, address newOwner) external { + target.transferOwnership(newOwner); + emit OwnerFunctionCalled(26); + } + function isNitroReady() external pure returns (uint8) { return uint8(0xa4b2); } From d0e0c93ab7922c16aefc9be0f63969019a7fdfea Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Fri, 3 Jun 2022 10:36:01 +0100 Subject: [PATCH 19/86] Add arbitrary call affordance --- .../contracts/bridge/NitroMigrator.sol | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 20e3cbbd4c..824947b4ca 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -185,4 +185,32 @@ contract NitroMigrator is Ownable { latestCompleteStep = NitroMigrationSteps.Step3; } + + /// @dev allows the owner to do arbitrary calls. This is useful in case an unexpected event + /// happens and we need to react to it using the migrator. + /// This should be enough to recover from any unexpected state since no external contracts rely + /// on this contract's state (ie `latestCompleteStep`). + /// If other contracts relied on this, we'd need to use a delegate call instead. + function executeTransactions( + bytes[] calldata data, + address[] calldata destination, + uint256[] calldata amount + ) external payable onlyOwner { + uint256 numTxes = data.length; + require(numTxes == destination.length, "WRONG_LENGTH"); + require(numTxes == amount.length, "WRONG_LENGTH"); + + for (uint256 i = 0; i < numTxes; i++) { + if (data[i].length > 0) require(destination[i].isContract(), "NO_CODE_AT_ADDR"); + (bool success, ) = address(destination[i]).call{ value: amount[i] }(data[i]); + if (!success) { + assembly { + let ptr := mload(0x40) + let size := returndatasize() + returndatacopy(ptr, 0, size) + revert(ptr, size) + } + } + } + } } From 11e057fee3e9e0d19b8849e0c7deea81b484ce20 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Fri, 3 Jun 2022 11:39:25 +0100 Subject: [PATCH 20/86] fix nitro migrator arbitrary call --- .../contracts/bridge/NitroMigrator.sol | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 824947b4ca..f2794c88cd 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -191,25 +191,19 @@ contract NitroMigrator is Ownable { /// This should be enough to recover from any unexpected state since no external contracts rely /// on this contract's state (ie `latestCompleteStep`). /// If other contracts relied on this, we'd need to use a delegate call instead. - function executeTransactions( - bytes[] calldata data, - address[] calldata destination, - uint256[] calldata amount + function executeTransaction( + bytes calldata data, + address destination, + uint256 amount ) external payable onlyOwner { - uint256 numTxes = data.length; - require(numTxes == destination.length, "WRONG_LENGTH"); - require(numTxes == amount.length, "WRONG_LENGTH"); - - for (uint256 i = 0; i < numTxes; i++) { - if (data[i].length > 0) require(destination[i].isContract(), "NO_CODE_AT_ADDR"); - (bool success, ) = address(destination[i]).call{ value: amount[i] }(data[i]); - if (!success) { - assembly { - let ptr := mload(0x40) - let size := returndatasize() - returndatacopy(ptr, 0, size) - revert(ptr, size) - } + if (data.length > 0) require(Address.isContract(destination), "NO_CODE_AT_ADDR"); + (bool success, ) = destination.call{ value: amount }(data); + if (!success) { + assembly { + let ptr := mload(0x40) + let size := returndatasize() + returndatacopy(ptr, 0, size) + revert(ptr, size) } } } From b43732cea4216f8d125415cb0fc28086efb584d2 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Sun, 5 Jun 2022 13:03:29 +0100 Subject: [PATCH 21/86] track rollup shutdown mode with block number and respond to pr comments --- .../contracts/bridge/NitroMigrator.sol | 8 ++- .../arb-bridge-eth/contracts/rollup/Node.sol | 21 ++++++-- .../contracts/rollup/Rollup.sol | 20 ++++---- .../contracts/rollup/facets/RollupAdmin.sol | 50 ++++++++++++------- .../contracts/rollup/facets/RollupUser.sol | 8 ++- 5 files changed, 69 insertions(+), 38 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index f2794c88cd..ec5d6b438f 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -165,9 +165,13 @@ contract NitroMigrator is Ownable { } /// @dev this assumes step 1 has executed succesfully and that a validator has made the final assertion that includes the inbox shutdownForNitro - function nitroStep2(uint256 finalNodeNum) external onlyOwner { + function nitroStep2( + uint256 finalNodeNum, + bool destroyAlternatives, + bool destroyChallenges + ) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step1, "WRONG_STEP"); - rollup.shutdownForNitro(finalNodeNum); + rollup.shutdownForNitro(finalNodeNum, destroyAlternatives, destroyChallenges); latestCompleteStep = NitroMigrationSteps.Step2; } diff --git a/packages/arb-bridge-eth/contracts/rollup/Node.sol b/packages/arb-bridge-eth/contracts/rollup/Node.sol index 0d82465e16..c928daca50 100644 --- a/packages/arb-bridge-eth/contracts/rollup/Node.sol +++ b/packages/arb-bridge-eth/contracts/rollup/Node.sol @@ -20,6 +20,7 @@ pragma solidity ^0.6.11; import "./INode.sol"; import "../libraries/Cloneable.sol"; +import "./Rollup.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; contract Node is Cloneable, INode { @@ -37,8 +38,7 @@ contract Node is Cloneable, INode { /// @notice Index of the node previous to this one uint256 public override prev; - /// @notice Deadline at which this node can be confirmed - uint256 public override deadlineBlock; + uint256 private deadlineBlock_; /// @notice Deadline at which a child of this node can be confirmed uint256 public override noChildConfirmedBeforeBlock; @@ -63,6 +63,13 @@ contract Node is Cloneable, INode { _; } + /// @notice Deadline block at which this node can be confirmed + /// @dev nodes can be confirmed instantly after shutdownForNitroBlock + function deadlineBlock() public view override returns (uint256) { + uint256 shutdownForNitroBlock = Rollup(payable(rollup)).shutdownForNitroBlock(); + return shutdownForNitroBlock >= block.number ? shutdownForNitroBlock : deadlineBlock_; + } + /** * @notice Mark the given staker as staked on this node * @param _rollup Initial value of rollup @@ -87,7 +94,7 @@ contract Node is Cloneable, INode { challengeHash = _challengeHash; confirmData = _confirmData; prev = _prev; - deadlineBlock = _deadlineBlock; + deadlineBlock_ = _deadlineBlock; noChildConfirmedBeforeBlock = _deadlineBlock; } @@ -135,13 +142,17 @@ contract Node is Cloneable, INode { * @notice Check whether the current block number has met or passed the node's deadline */ function requirePastDeadline() external view override { - require(block.number >= deadlineBlock, "BEFORE_DEADLINE"); + require(block.number >= deadlineBlock(), "BEFORE_DEADLINE"); } /** * @notice Check whether the current block number has met or passed deadline for children of this node to be confirmed */ function requirePastChildConfirmDeadline() external view override { - require(block.number >= noChildConfirmedBeforeBlock, "CHILD_TOO_RECENT"); + require( + Rollup(payable(rollup)).shutdownForNitroMode() || + block.number >= noChildConfirmedBeforeBlock, + "CHILD_TOO_RECENT" + ); } } diff --git a/packages/arb-bridge-eth/contracts/rollup/Rollup.sol b/packages/arb-bridge-eth/contracts/rollup/Rollup.sol index f7377ed698..96660692eb 100644 --- a/packages/arb-bridge-eth/contracts/rollup/Rollup.sol +++ b/packages/arb-bridge-eth/contracts/rollup/Rollup.sol @@ -66,12 +66,17 @@ abstract contract RollupBase is Cloneable, RollupCore, Pausable { mapping(address => bool) isValidator; - /// @dev indicates if the rollup is in shutdown for nitro mode. can only be toggled by `shutdownForNitro` in admin facet - bool public shutdownForNitroMode; + /// @dev indicates the block which the rollup starts the shutdown for nitro mode + uint256 public shutdownForNitroBlock; + + /// @dev indicates if rollup is in shutdown for nitro mode + function shutdownForNitroMode() public view returns (bool) { + return block.number >= shutdownForNitroBlock; + } /// @dev allows a function to be executed either if contract is either in `shutdownForNitroMode` or not paused modifier whenInShutdownModeOrNotPaused() { - if (!shutdownForNitroMode) { + if (!shutdownForNitroMode()) { require(!paused(), "Pausable: paused"); } _; @@ -154,6 +159,8 @@ contract Rollup is Proxy, RollupBase { // facets[0] == admin, facets[1] == user facets = _facets; + shutdownForNitroBlock = type(uint256).max; + emit RollupCreated(_machineHash); require(isInit(), "INITIALIZE_NOT_INIT"); } @@ -164,12 +171,7 @@ contract Rollup is Proxy, RollupBase { address proxyAdmin = ProxyUtil.getProxyAdmin(); require(msg.sender == proxyAdmin, "NOT_FROM_ADMIN"); - // this upgrade moves the delay blocks and seconds tracking to the sequencer inbox - // because of that we need to update the admin facet logic to allow the owner to set - // these values in the sequencer inbox - - STORAGE_GAP_1 = 0; - STORAGE_GAP_2 = 0; + shutdownForNitroBlock = type(uint256).max; } function createInitialNode(bytes32 _machineHash) private returns (INode) { diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol index 06b18d5233..32cdb47e8f 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol @@ -331,20 +331,17 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { /// All nodes that aren't directly previous to this are deleted, but in practice none are expected to be present (as this would mean an eventual challenge). /// Even though the rollup is paused, we use the `shutdownForNitroMode` var to allow validators to go through the sequence of final nodes confirming them so their send values are added to the outbox /// The deadline for the nodes marked as final are ignored to a lower value to allow for these faster confirmations, which will make L2 to L1 txs available for execution sooner - function shutdownForNitro(uint256 finalNodeNum) external whenNotPaused { + function shutdownForNitro( + uint256 finalNodeNum, + bool destroyAlternatives, + bool destroyChallenges + ) external whenNotPaused { + require(!shutdownForNitroMode(), "ALREADY_SHUTDOWN_MODE"); // TODO: prove that final node num includes the last send by arbos - uint256 latestCreated = latestNodeCreated(); - // delete all nodes created after the final one (which should be none) - while (latestCreated > finalNodeNum) { - destroyNode(latestCreated); - latestCreated--; - } - - uint256 latestConfirmedNodeNum = latestConfirmed(); - // first we destroy all nodes that aren't in the correct chain - uint256 curr = finalNodeNum; + uint256 latestConfirmedNodeNum = latestConfirmed(); + uint256 curr = latestNodeCreated(); uint256 expectedPrev = finalNodeNum; // if finalNodeNum == latestConfirmed we don't need to delete any siblings while (curr != latestConfirmedNodeNum) { @@ -352,6 +349,7 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { INode currNode = getNode(curr); expectedPrev = currNode.prev(); } else { + require(destroyAlternatives, "ALTERNATIVES_NOT_EXPECTED"); destroyNode(curr); } curr--; @@ -360,25 +358,43 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { uint256 stakerCount = stakerCount(); for (uint64 i = 0; i < stakerCount; ++i) { address stakerAddr = getStakerAddress(i); + address chall = currentChallenge(stakerAddr); + + if (chall != address(0)) { + require(destroyChallenges, "CHALLENGE_NOT_EXPECTED"); + address asserter = IChallenge(chall).asserter(); + address challenger = IChallenge(chall).challenger(); + + clearChallenge(asserter); + clearChallenge(challenger); + + IChallenge(chall).clearChallenge(); + } + if (getNode(latestStakedNode(stakerAddr)) == INode(0)) { // this node got destroyed, so we force refund the staker - reduceStakeTo(stakerAddr, 0); - turnIntoZombie(stakerAddr); + withdrawStaker(stakerAddr); } // else the staker can unstake and withdraw regularly using `returnOldDeposit` } - // TODO: do we force resolve challenges? shouldn't be needed - - shutdownForNitroMode = true; + shutdownForNitroBlock = block.number; _pause(); emit OwnerFunctionCalled(25); } + /// @dev stops the rollup from shutdownForNitro mode in case something goes wrong during the migration process + function undoShutdownForNitro() external whenPaused { + require(shutdownForNitroMode(), "NOT_SHUTDOWN_MODE"); + shutdownForNitroBlock = type(uint256).max; + _unpause(); + emit OwnerFunctionCalled(26); + } + /// @dev allows the admin to transfer the ownership of a contract controlled by the rollup function transferOwnership(Ownable target, address newOwner) external { target.transferOwnership(newOwner); - emit OwnerFunctionCalled(26); + emit OwnerFunctionCalled(27); } function isNitroReady() external pure returns (uint8) { diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index b7f2199136..5cf8cdcd77 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -85,11 +85,9 @@ abstract contract AbsRollupUserFacet is RollupBase, IRollupUser { INode node = getNode(firstUnresolvedNode()); - if (!shutdownForNitroMode) { - // Verify the block's deadline has passed - node.requirePastDeadline(); - getNode(latestConfirmed()).requirePastChildConfirmDeadline(); - } + // Verify the block's deadline has passed + node.requirePastDeadline(); + getNode(latestConfirmed()).requirePastChildConfirmDeadline(); // Check that prev is latest confirmed require(node.prev() == latestConfirmed(), "INVALID_PREV"); From c06710d61d5642ffbd6c466cc8b5f4ca2ac2acd9 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Sun, 5 Jun 2022 13:15:22 +0100 Subject: [PATCH 22/86] Add assertion period change to migrator and events on rollup shutdown --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 3 +++ .../arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index ec5d6b438f..bdc3ce997e 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -160,6 +160,9 @@ contract NitroMigrator is Ownable { seqAddresses ); + // this speeds up the process allowing validators to post assertions more frequently + rollup.setMinimumAssertionPeriod(4); + // TODO: remove permissions from gas refunder to current sequencer inbox latestCompleteStep = NitroMigrationSteps.Step1; } diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol index 32cdb47e8f..3ad103b0b6 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol @@ -13,6 +13,10 @@ import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract RollupAdminFacet is RollupBase, IRollupAdmin { + event NodeDestroyedInMigration(uint256 nodeNum); + event ChallengeDestroyedInMigration(address challenge); + event StakerWithdrawnInMigration(address staker); + /** * Functions are only to reach this facet if the caller is the owner * so there is no need for a redundant onlyOwner check @@ -351,6 +355,7 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { } else { require(destroyAlternatives, "ALTERNATIVES_NOT_EXPECTED"); destroyNode(curr); + emit NodeDestroyedInMigration(curr); } curr--; } @@ -369,11 +374,13 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { clearChallenge(challenger); IChallenge(chall).clearChallenge(); + emit ChallengeDestroyedInMigration(chall); } if (getNode(latestStakedNode(stakerAddr)) == INode(0)) { // this node got destroyed, so we force refund the staker withdrawStaker(stakerAddr); + emit StakerWithdrawnInMigration(stakerAddr); } // else the staker can unstake and withdraw regularly using `returnOldDeposit` } From 5ea29fe52f3cd51b340c77e12cbc04b964fb237c Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Tue, 7 Jun 2022 20:05:25 +0200 Subject: [PATCH 23/86] Nitro migration init --- .../contracts/bridge/NitroMigrator.sol | 30 +- .../contracts/bridge/SequencerInbox.sol | 1 + packages/arb-bridge-eth/package.json | 2 + packages/arb-bridge-eth/scripts/genAbi.js | 57 +++ .../arb-bridge-eth/test/nitro-upgrade.fork.ts | 331 +++++++++++++++++ .../test/nitroMigrationManager.ts | 350 ++++++++++++++++++ yarn.lock | 104 +++++- 7 files changed, 859 insertions(+), 16 deletions(-) create mode 100644 packages/arb-bridge-eth/scripts/genAbi.js create mode 100644 packages/arb-bridge-eth/test/nitro-upgrade.fork.ts create mode 100644 packages/arb-bridge-eth/test/nitroMigrationManager.ts diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index f2794c88cd..4c0a309a16 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -52,7 +52,6 @@ contract NitroMigrator is Ownable { /// > Step0 is setup with contract deployments and integrity checks /// /// This is the setup for the upgrade, where all contracts are deployed but the upgrade migration hasn't started yet. - /// Before Step1 the ownership of the Inbox / Rollup / Outbox / Bridge / SequencerInbox must all be transferred to this contract /// The sequencer should stop receiving messages over RPC and post its final batch before Step1 is called. /// /// > Step1 is settling the current state of inputs to the system (bridge, delayed and sequencer inbox) in a consistent way @@ -93,18 +92,7 @@ contract NitroMigrator is Ownable { outboxV1 = _outboxV1; outboxV2 = _outboxV2; - { - // this contract is the rollup admin, and we want to check if the user facet is upgraded - // so we deploy a new contract to ensure the query is dispatched to the user facet, not the admin - NitroReadyQuery queryContract = new NitroReadyQuery(); - require( - queryContract.isNitroReady(address(_rollup)) == uint8(0xa4b1), - "USER_ROLLUP_NOT_NITRO_READY" - ); - } - // this returns a different magic value so we can differentiate the user and admin facets - require(_rollup.isNitroReady() == uint8(0xa4b2), "ADMIN_ROLLUP_NOT_NITRO_READY"); - + require(_rollup.isNitroReady() == uint8(0xa4b1), "USER_ROLLUP_NOT_NITRO_READY"); require(_inbox.isNitroReady() == uint8(0xa4b1), "INBOX_NOT_UPGRADED"); require(_sequencerInbox.isNitroReady() == uint8(0xa4b1), "SEQINBOX_NOT_UPGRADED"); @@ -125,8 +113,19 @@ contract NitroMigrator is Ownable { /// @dev this assumes this contract owns the rollup/inboxes/bridge before this function is called (else it will revert) /// this will create the final input in the inbox, but there won't be the final assertion available yet. /// it is assumed that at this point the sequencer has stopped receiving txs and has posted its final batch on-chain - function nitroStep1(address[] calldata seqAddresses) external onlyOwner { + /// Before this step the ownership of the Rollup and Bridge must have been transferred to this contract + // CHRIS: TODO: remove bridge data + function nitroStep1(address[] calldata seqAddresses, bytes calldata bridgeData) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step0, "WRONG_STEP"); + + // check that ownership of the bridge and rollup has been transferred + require(rollup.owner() == address(this), "ROLLUP_OWNER_NOT_SET"); + require(bridge.owner() == address(this), "BRIDGE_OWNER_NOT_SET"); + // we can only check whether the admin contract is ready when we are the owner of it, + // which is why we do it here rather than in the constructor like the other checks. + // this returns a different magic value so we can differentiate the user and admin facets + require(rollup.isNitroReady() == uint8(0xa4b2), "ADMIN_ROLLUP_NOT_NITRO_READY"); + uint256 delayedMessageCount = inbox.shutdownForNitro(); // the `bridge` won't have any enabled inboxes after nitroStep2, so force inclusion after this shouldn't be possible @@ -144,7 +143,7 @@ contract NitroMigrator is Ownable { { uint256 bal = address(bridge).balance; - (bool success, ) = bridge.executeCall(nitroBridge, bal, ""); + (bool success, ) = bridge.executeCall(nitroBridge, bal, bridgeData); require(success, "ESCROW_TRANSFER_FAIL"); } @@ -173,6 +172,7 @@ contract NitroMigrator is Ownable { function nitroStep3() external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step2, "WRONG_STEP"); + // CHRIS: TODO: destroying the node in the previous steps does not reset latestConfirmed/latestNodeCreated require( rollup.latestConfirmed() == rollup.latestNodeCreated(), "ROLLUP_SHUTDOWN_NOT_COMPLETE" diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index 1c70a72d29..4dcd8448a1 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -153,6 +153,7 @@ contract SequencerInbox is ISequencerInbox, Cloneable { // the delayed inbox has all inboxes disabled, so state won't progress there. // if there are no delayed inboxes and no sequencer addresses, the state can't progress anymore. for (uint64 i = 0; i < seqAddresses.length; ++i) { + require(isSequencer[seqAddresses[i]], "UNKNOWN_SEQUENCER"); isSequencer[seqAddresses[i]] = false; } deprecatedSequencer = address(0); diff --git a/packages/arb-bridge-eth/package.json b/packages/arb-bridge-eth/package.json index b680727122..7ee46722a2 100644 --- a/packages/arb-bridge-eth/package.json +++ b/packages/arb-bridge-eth/package.json @@ -21,6 +21,7 @@ "scripts": { "build": "./scripts/build.bash", "test": "yarn run hardhat test test/*.spec.ts", + "gen:abi": "node ./scripts/genAbi.js", "test:ci": "CI=true $npm_execpath run test", "test:gas": "REPORT_GAS=true $npm_execpath run test", "test:fork": "SHOULD_FORK=1 yarn run hardhat test test/*.fork.ts", @@ -44,6 +45,7 @@ "hardhat": "hardhat --config hardhat.config.ts" }, "dependencies": { + "@arbitrum/nitro-contracts": "1.0.0-beta.5", "@openzeppelin/contracts": "3.4.2", "@openzeppelin/contracts-0.8": "npm:@openzeppelin/contracts@^4.3.2", "@openzeppelin/contracts-upgradeable": "3.4.2", diff --git a/packages/arb-bridge-eth/scripts/genAbi.js b/packages/arb-bridge-eth/scripts/genAbi.js new file mode 100644 index 0000000000..e76db940a7 --- /dev/null +++ b/packages/arb-bridge-eth/scripts/genAbi.js @@ -0,0 +1,57 @@ +const { runTypeChain, glob } = require('typechain') +const { execSync } = require('child_process') +const { unlinkSync } = require('fs') + +const getPackagePath = packageName => { + const path = require.resolve(`${packageName}/package.json`) + return path.substr(0, path.indexOf('package.json')) +} + +async function main() { + const cwd = process.cwd() + + const nitroPath = getPackagePath('@arbitrum/nitro-contracts') + + console.log('Compiling paths.') + + const npmExec = process.env['npm_execpath'] + if (!npmExec || npmExec === '') + throw new Error( + 'No support for npm_execpath env variable in package manager' + ) + + // TODO: use `HARDHAT_ARTIFACT_PATH` to write files to arbitrum sdk instead of the packages themselves. + // this is currently broken since hardhat throws a weird error: + // `Error HH702: Invalid artifact path [...] its correct case-sensitive path is...` + // https://yarnpkg.com/advanced/rulebook#packages-should-never-write-inside-their-own-folder-outside-of-postinstall + // instead of writing in postinstall in each of those packages, we should target a local folder in sdk's postinstall + + console.log('building nitro') + execSync(`${npmExec} run hardhat:prod compile`, { + cwd: nitroPath, + }) + + console.log('Done compiling') + + const allFiles = glob(cwd, [ + `${nitroPath}/build/contracts/!(build-info)/**/+([a-zA-Z0-9_]).json`, + ]) + + // TODO: generate files into different subfolders (ie `/nitro/*`) to avoid overwrite of contracts with the same name + await runTypeChain({ + cwd, + filesToProcess: allFiles, + allFiles: allFiles, + outDir: './build/types/nitro', + target: 'ethers-v5', + }) + + // we delete the index file since it doesn't play well with tree shaking + unlinkSync(`${cwd}/build/types/nitro/index.ts`) + + console.log('Typechain generated') +} + +main() + .then(() => console.log('Done.')) + .catch(console.error) diff --git a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts new file mode 100644 index 0000000000..9e32743870 --- /dev/null +++ b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts @@ -0,0 +1,331 @@ +import { ethers, network } from 'hardhat' +import { expect, assert } from 'chai' +import { CurrentDeployments } from 'arb-upgrades/types' +import { readFileSync, readdirSync } from 'fs' +import { Bridge, NitroMigrator__factory, ProxyAdmin } from '../build/types' +import { BigNumber, constants, Signer } from 'ethers' +import { Provider } from '@ethersproject/providers' +import { Inbox__factory as NitroInbox__factory } from '../build/types/nitro/factories/Inbox__factory' +import { BridgeCreator__factory as NitroBridgeCreator__factory } from '../build/types/nitro/factories/BridgeCreator__factory' +import { Bridge__factory as NitroBridge__factory } from '../build/types/nitro/factories/Bridge__factory' +import { RollupCreator__factory as NitroRollupCreator__factory } from '../build/types/nitro/factories/RollupCreator__factory' +import { RollupCreatedEvent } from '../build/types/nitro/RollupCreator' +import { OneStepProver0__factory as NitroOneStepProver0__factory } from '../build/types/nitro/factories/OneStepProver0__factory' +import { OneStepProverMemory__factory as NitroOneStepProverMemory__factory } from '../build/types/nitro/factories/OneStepProverMemory__factory' +import { OneStepProverMath__factory as NitroOneStepProverMath__factory } from '../build/types/nitro/factories/OneStepProverMath__factory' +import { OneStepProverHostIo__factory as NitroOneStepProverHostIo__factory } from '../build/types/nitro/factories/OneStepProverHostIo__factory' +import { OneStepProofEntry__factory as NitroOneStepProofEntry__factory } from '../build/types/nitro/factories/OneStepProofEntry__factory' +import { ChallengeManager__factory as NitroChallengeManager__factory } from '../build/types/nitro/factories/ChallengeManager__factory' +import { RollupAdminLogic__factory as NitroRollupAdminLogic__factory } from '../build/types/nitro/factories/RollupAdminLogic__factory' +import { RollupUserLogic__factory as NitroRollupUserLogic__factory } from '../build/types/nitro/factories/RollupUserLogic__factory' +import { Interface } from '@ethersproject/abi' +import { NitroMigrationManager } from './nitroMigrationManager' + +describe('Nitro upgrade', () => { + const getDeployments = async (provider: Provider) => { + const chainId = (await provider.getNetwork()).chainId + const deploymentData = readFileSync( + `./_deployments/${chainId}_current_deployment.json` + ) + return JSON.parse(deploymentData.toString()) as CurrentDeployments + } + + it('fails to construct if contracts havent been upgraded', async () => { + try { + const deployments = await getDeployments(ethers.provider) + const nitroMigratorFac = await ethers.getContractFactory('NitroMigrator') + await nitroMigratorFac.deploy( + deployments.contracts.Inbox.proxyAddress, + deployments.contracts.SequencerInbox.proxyAddress, + deployments.contracts.Bridge.proxyAddress, + deployments.contracts.RollupEventBridge.proxyAddress, + (deployments.contracts as any)['OldOutbox'].proxyAddress, + (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here? + deployments.contracts.Rollup.proxyAddress, + constants.AddressZero, + constants.AddressZero, + constants.AddressZero, + constants.AddressZero + ) + + assert.fail('Expected constructor to fail') + } catch {} + + // const delayedInboxAddress = deployments.contracts.Inbox.proxyAddress + + // const delayedInbox = await ethers.getContractAt( + // 'Inbox', + // delayedInboxAddress + // ) + + // const bridge = await ethers.getContractAt( + // 'Bridge', + // await delayedInbox.bridge() + // ) + + // const rollupProxyAddress = await bridge.owner() + // const rollupDispatch = await ethers.getContractAt( + // 'Rollup', + // rollupProxyAddress + // ) + + // const sequencerInboxAddress = await rollupDispatch.sequencerBridge() + // const sequencerInbox = await ethers.getContractAt( + // 'SequencerInbox', + // sequencerInboxAddress + // ) + + // // deploy new logic contracts + // const NewRollupLogic = await ethers.getContractFactory('Rollup') + // const newRollupLogic = await NewRollupLogic.deploy(1) + // await newRollupLogic.deployed() + + // const NewAdminFacet = await ethers.getContractFactory('RollupAdminFacet') + // const newAdminFacet = await NewAdminFacet.deploy() + // await newAdminFacet.deployed() + + // const NewSequencerInbox = await ethers.getContractFactory('SequencerInbox') + // const newSequencerInbox = await NewSequencerInbox.deploy() + // await newSequencerInbox.deployed() + + // // valid previous rollup state + // const iface = new ethers.utils.Interface([ + // `function sequencerInboxMaxDelayBlocks() view returns (uint256)`, + // `function sequencerInboxMaxDelaySeconds() view returns (uint256)`, + // ]) + // const oldRollupInterface = new ethers.Contract(rollupProxyAddress, iface) + // const prevMaxDelayBlocks = await oldRollupInterface + // .connect(ethers.provider.getSigner()) + // .sequencerInboxMaxDelayBlocks() + // const prevMaxDelaySeconds = await oldRollupInterface + // .connect(ethers.provider.getSigner()) + // .sequencerInboxMaxDelaySeconds() + + // // setup for fork test + // const adminStorageSlot = + // '0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103' + // const l1ProxyAdmin = + // '0x' + + // ( + // await ethers.provider.getStorageAt( + // sequencerInbox.address, + // adminStorageSlot + // ) + // ).substr(26) + // const proxyAdmin = await ethers.getContractAt('ProxyAdmin', l1ProxyAdmin) + // const owner = await proxyAdmin.owner() + + // // airdrop + // await network.provider.send('hardhat_setBalance', [ + // owner, + // '0x16189AD417E380000', + // ]) + + // // use owner + // await network.provider.request({ + // method: 'hardhat_impersonateAccount', + // params: [owner], + // }) + + // const ownerSigner = await ethers.provider.getSigner(owner) + + // // upgrade contracts + + // await proxyAdmin + // .connect(ownerSigner) + // .upgrade(sequencerInbox.address, newSequencerInbox.address) + + // const externalCall = + // rollupDispatch.interface.encodeFunctionData('postUpgradeInit') + + // await proxyAdmin + // .connect(ownerSigner) + // .upgradeAndCall(rollupProxyAddress, newRollupLogic.address, externalCall) + + // await network.provider.request({ + // method: 'hardhat_stopImpersonatingAccount', + // params: [owner], + // }) + + // // verify storage was assigned correctly + + // const postMaxDelayBlocks = await sequencerInbox.maxDelayBlocks() + // const postMaxDelaySeconds = await sequencerInbox.maxDelaySeconds() + + // const rollupMaxDelayBlocks = await rollupDispatch.STORAGE_GAP_1() + // const rollupMaxDelaySeconds = await rollupDispatch.STORAGE_GAP_2() + + // expect(prevMaxDelayBlocks).to.equal(postMaxDelayBlocks) + // expect(prevMaxDelaySeconds).to.equal(postMaxDelaySeconds) + + // expect(rollupMaxDelayBlocks).to.equal(0) + // expect(rollupMaxDelaySeconds).to.equal(0) + + // // should not be able to call postUpgradeInit + + // const newerAdminFacet = await NewAdminFacet.deploy() + // await newerAdminFacet.deployed() + + // await expect(rollupDispatch.postUpgradeInit()).to.be.revertedWith( + // 'NOT_FROM_ADMIN' + // ) + }) + + it.only('upgrade and construct', async () => { + const provider = ethers.provider + const deployments = await getDeployments(provider) + + let proxyAdmin = await ethers.getContractAt( + 'ProxyAdmin', + deployments.proxyAdminAddress + ) + const proxyAdminOwner = await proxyAdmin.owner() + + // airdrop + await network.provider.send('hardhat_setBalance', [ + proxyAdminOwner, + '0x16189AD417E380000', + ]) + + // use owner + await network.provider.request({ + method: 'hardhat_impersonateAccount', + params: [proxyAdminOwner], + }) + + const proxyAdminSigner = await provider.getSigner(proxyAdminOwner) + proxyAdmin = proxyAdmin.connect(proxyAdminSigner) + // CHRIS: TODO: should it be possible to reverse each of the steps? or is that going too far? + + // CHRIS: TODO: don't we need to create a new 'deployments' file? + // CHRIS: TODO: shouldnt the bridge be upgraded? no, we're doing a fresh one + + const migrationManager = new NitroMigrationManager(proxyAdminSigner) + + const rollupFac = await ethers.getContractFactory('Rollup') + // lookup params from previous rollup? + // CHRIS: TODO: why do we have a param in the constructor? how is this rollup logic supposed to be deployed? + const prevRollup = await rollupFac.attach( + deployments.contracts.Rollup.proxyAddress + ) + const wasmModuleRoot = + '0x9900000000000000000000000000000000000000000000000000000000000010' + const loserStakeEscrow = constants.AddressZero + + const nitroContracts = await migrationManager.deployNitro({ + confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), + extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), + stakeToken: await prevRollup.stakeToken(), + baseStake: await prevRollup.baseStake(), + wasmModuleRoot: wasmModuleRoot, + // CHRIS: TODO: decide who the owner should be + // CHRIS: TODO: shouldnt it be someone different to the proxy admin? + owner: await prevRollup.owner(), + chainId: (await provider.getNetwork()).chainId, + loserStakeEscrow: loserStakeEscrow, + sequencerInboxMaxTimeVariation: { + // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess + // CHRIS: TODO: make sure these are all the values we want + delayBlocks: (60 * 60 * 24) / 15, + futureBlocks: 12, + delaySeconds: 60 * 60 * 24, + futureSeconds: 60 * 60, + }, + }) + + await migrationManager.upgradeClassicContracts({ + proxyAdminAddr: deployments.proxyAdminAddress, + confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), + inboxAddr: deployments.contracts.Inbox.proxyAddress, + rollupAddr: prevRollup.address, + sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, + }) + + await migrationManager.deployMigrator([ + deployments.contracts.Inbox.proxyAddress, + deployments.contracts.SequencerInbox.proxyAddress, + deployments.contracts.Bridge.proxyAddress, + deployments.contracts.RollupEventBridge.proxyAddress, + (deployments.contracts as any)['OldOutbox'].proxyAddress, + (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here? + deployments.contracts.Rollup.proxyAddress, + // CHRIS: TODO: we could do more in terms of checks + // CHRIS: TODO: we could do a check that all the contracts we care about have been correctly deployed with the correct admins + // CHRIS: TODO: we could also check that the contracts below have expected functions on them? + nitroContracts.bridge, + nitroContracts.inboxTemplate, + nitroContracts.outbox, + nitroContracts.sequencerInbox, + ]) + + await migrationManager.step1( + { + rollupAddr: deployments.contracts.Rollup.proxyAddress, + bridgeAddr: deployments.contracts.Bridge.proxyAddress, + }, + { rollupAddr: nitroContracts.rollup, bridgeAddr: nitroContracts.bridge } + ) + + //////// CHRIS /////// PUT BACK IN + // // CHRIS: TODO: remove this when we remove teh setInbox(true) above + // await ( + // await nitroRollupAdminFacet.setInbox( + // deployments.contracts.Bridge.proxyAddress, + // false + // ) + // ).wait() + + // // step 2 + // // this would normally be the latest created node + // // but we need to confirm all the nodes to ensure that + // // CHRIS: TODO: use the admin to force confirm the nodes between + // // latest created and latest confirmed + // const latestCreated = await rollupAdmin.latestNodeCreated() + // const latestConfirmed = await rollupAdmin.latestConfirmed() + // console.log( + // 'confirmed count', + // latestConfirmed.toNumber(), + // latestCreated.toNumber() + // ) + // const stakerCount = await rollupAdmin.stakerCount() + // console.log('staker count', stakerCount.toNumber()) + + // const beforeB = Date.now() + + // const iFace = new Interface(['event Face(uint length)']) + // console.log('Face topic', iFace.getEventTopic('Face')) + + // const setOwnerData = await rollupAdmin.interface.encodeFunctionData( + // 'setOwner', + // [await proxyAdminSigner.getAddress()] + // ) + // console.log("before exec") + + // await ( + // await nitroMigrator.executeTransaction( + // setOwnerData, + // rollupAdmin.address, + // BigNumber.from(0) + // ) + // ).wait() + // console.log("after exec") + + // const res = await ( + // await rollupAdmin.shutdownForNitro(latestConfirmed) + // ).wait() + + // const res = await (await nitroMigrator.nitroStep2(latestConfirmed, { gasLimit: 3000000})).wait() + // console.log(res.gasUsed.toString()) + // console.log(res.logs) + // console.log(Date.now() - beforeB) + + // console.log('step 2 complete') + + // // step 3 + // await (await nitroMigrator.nitroStep3()).wait() + + // console.log('step 3 complete') + + //////// CHRIS /////// PUT BACK IN + }) +}) diff --git a/packages/arb-bridge-eth/test/nitroMigrationManager.ts b/packages/arb-bridge-eth/test/nitroMigrationManager.ts new file mode 100644 index 0000000000..d21e231eef --- /dev/null +++ b/packages/arb-bridge-eth/test/nitroMigrationManager.ts @@ -0,0 +1,350 @@ +import { RollupCreatedEvent } from '../build/types/nitro/RollupCreator' +import { BridgeCreator__factory as NitroBridgeCreator__factory } from '../build/types/nitro/factories/BridgeCreator__factory' +import { Bridge__factory as NitroBridge__factory } from '../build/types/nitro/factories/Bridge__factory' +import { RollupCreator__factory as NitroRollupCreator__factory } from '../build/types/nitro/factories/RollupCreator__factory' +import { RollupCreator as NitroRollupCreator } from '../build/types/nitro/RollupCreator' +import { OneStepProver0__factory as NitroOneStepProver0__factory } from '../build/types/nitro/factories/OneStepProver0__factory' +import { OneStepProverMemory__factory as NitroOneStepProverMemory__factory } from '../build/types/nitro/factories/OneStepProverMemory__factory' +import { OneStepProverMath__factory as NitroOneStepProverMath__factory } from '../build/types/nitro/factories/OneStepProverMath__factory' +import { OneStepProverHostIo__factory as NitroOneStepProverHostIo__factory } from '../build/types/nitro/factories/OneStepProverHostIo__factory' +import { OneStepProofEntry__factory as NitroOneStepProofEntry__factory } from '../build/types/nitro/factories/OneStepProofEntry__factory' +import { ChallengeManager__factory as NitroChallengeManager__factory } from '../build/types/nitro/factories/ChallengeManager__factory' +import { RollupAdminLogic__factory as NitroRollupAdminLogic__factory } from '../build/types/nitro/factories/RollupAdminLogic__factory' +import { RollupUserLogic__factory as NitroRollupUserLogic__factory } from '../build/types/nitro/factories/RollupUserLogic__factory' +import { BigNumber, constants, Signer } from 'ethers' +import { Provider } from '@ethersproject/providers' +import { getContractAddress } from 'ethers/lib/utils' +import { + Inbox__factory, + NitroMigrator, + NitroMigrator__factory, + ProxyAdmin__factory, + RollupAdminFacet__factory, + RollupUserFacet__factory, + Rollup__factory, + SequencerInbox__factory, +} from '../build/types' + +// CHRIS: TODO: comments up in here +export class NitroMigrationManager { + private readonly provider: Provider + + public constructor(public readonly proxyAdminOwner: Signer) { + if (!proxyAdminOwner.provider) { + throw new Error('No provider attached to deployer signer.') + } + this.provider = proxyAdminOwner.provider + } + + private async deployNitroChallengeContracts(signer: Signer) { + const oneStepProver0Fac = new NitroOneStepProver0__factory(signer) + const oneStepProver0 = await oneStepProver0Fac.deploy() + await oneStepProver0.deployed() + + const oneStepProverMemoryFac = new NitroOneStepProverMemory__factory(signer) + const oneStepProverMemory = await oneStepProverMemoryFac.deploy() + await oneStepProverMemory.deployed() + + const oneStepProverMathFac = new NitroOneStepProverMath__factory(signer) + const oneStepProverMath = await oneStepProverMathFac.deploy() + await oneStepProverMath.deployed() + + const oneStepProverHostIoFac = new NitroOneStepProverHostIo__factory(signer) + const oneStepProverHostIo = await oneStepProverHostIoFac.deploy() + await oneStepProverHostIo.deployed() + + const oneStepProofEntryFac = new NitroOneStepProofEntry__factory(signer) + const oneStepProofEntry = await oneStepProofEntryFac.deploy( + oneStepProver0.address, + oneStepProverMemory.address, + oneStepProverMath.address, + oneStepProverHostIo.address + ) + await oneStepProofEntry.deployed() + + const challengeManagerFac = new NitroChallengeManager__factory(signer) + const challengeManager = await challengeManagerFac.deploy() + await challengeManager.deployed() + + return { + oneStepProver0, + oneStepProverMemory, + oneStepProverMath, + oneStepProverHostIo, + oneStepProofEntry, + challengeManager, + } + } + + // confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), + // extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), + // stakeToken: await prevRollup.stakeToken(), + // baseStake: await prevRollup.baseStake(), + // wasmModuleRoot: wasmModuleRoot, + // // CHRIS: TODO: decide who the owner should be + // // CHRIS: TODO: shouldnt it be someone different to the proxy admin? + // owner: await prevRollup.owner(), + // chainId: (await this.provider.getNetwork()).chainId, + // loserStakeEscrow: loserStakeEscrow, + // sequencerInboxMaxTimeVariation: { + // // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess + // // CHRIS: TODO: make sure these are all the values we want + // delayBlocks: (60 * 60 * 24) / 15, + // futureBlocks: 12, + // delaySeconds: 60 * 60 * 24, + // futureSeconds: 60 * 60, + // }, + // }, + + public async deployNitro( + config: Parameters[0] + ) { + const nitroBridgeCreatorFac = new NitroBridgeCreator__factory( + this.proxyAdminOwner + ) + const nitroBridgeCreator = await nitroBridgeCreatorFac.deploy() + await nitroBridgeCreator.deployed() + + const nitroRollupCreatorFac = new NitroRollupCreator__factory( + this.proxyAdminOwner + ) + const nitroRollupCreator = await nitroRollupCreatorFac.deploy() + await nitroRollupCreator.deployed() + + const nitroRollupAdminLogicFac = new NitroRollupAdminLogic__factory( + this.proxyAdminOwner + ) + const nitroRollupAdminLogic = await nitroRollupAdminLogicFac.deploy() + await nitroRollupAdminLogic.deployed() + + const nitroRollupUserLogicFac = new NitroRollupUserLogic__factory( + this.proxyAdminOwner + ) + const nitroRollupUserLogic = await nitroRollupUserLogicFac.deploy() + await nitroRollupUserLogic.deployed() + + const challengeContracts = await this.deployNitroChallengeContracts( + this.proxyAdminOwner + ) + await ( + await nitroRollupCreator.setTemplates( + nitroBridgeCreator.address, + challengeContracts.oneStepProofEntry.address, + challengeContracts.challengeManager.address, + nitroRollupAdminLogic.address, + nitroRollupUserLogic.address + ) + ).wait() + + const nonce = await this.provider.getTransactionCount( + nitroRollupCreator.address + ) + const expectedRollupAddress = getContractAddress({ + from: nitroRollupCreator.address, + nonce: nonce + 2, + }) + + // lookup params from previous rollup? + // CHRIS: TODO: why do we have a param in the constructor? how is this rollup logic supposed to be deployed? + + // const prevRollup = await rollupFac.attach( + // deployments.contracts.Rollup.proxyAddress + // ) + // const wasmModuleRoot = + // '0x9900000000000000000000000000000000000000000000000000000000000010' + // const loserStakeEscrow = constants.AddressZero + // { + // confirmPeriodBlocks: await config.confirmPeriodBlocks, + // extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), + // stakeToken: await prevRollup.stakeToken(), + // baseStake: await prevRollup.baseStake(), + // wasmModuleRoot: wasmModuleRoot, + // // CHRIS: TODO: decide who the owner should be + // // CHRIS: TODO: shouldnt it be someone different to the proxy admin? + // owner: await prevRollup.owner(), + // chainId: (await this.provider.getNetwork()).chainId, + // loserStakeEscrow: loserStakeEscrow, + // sequencerInboxMaxTimeVariation: { + // // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess + // // CHRIS: TODO: make sure these are all the values we want + // delayBlocks: (60 * 60 * 24) / 15, + // futureBlocks: 12, + // delaySeconds: 60 * 60 * 24, + // futureSeconds: 60 * 60, + // }, + // } + + const createRollupTx = await nitroRollupCreator.createRollup( + config, + expectedRollupAddress + ) + + // CHRIS: TODO: quite a cool idea would be to figure out at compile + // time what possible events could be emitted? is that even possible, + // I guess not. So how could we do it? we can + + // CHRIS: we're deploying a new proxy admin in createRollup + // CHRIS: this will mean we actually have 2 proxy admins in the system post nitro + // CHRIS: we should probably transfer ownership so that they all have the same proxy admin + const createRollupReceipt = await createRollupTx.wait() + const rollupCreatedEventArgs = createRollupReceipt.logs + .filter( + l => + l.topics[0] === + nitroRollupCreator.interface.getEventTopic( + 'RollupCreated(address,address,address,address,address)' + ) + ) + .map( + l => + nitroRollupCreator.interface.parseLog( + l + ) as unknown as RollupCreatedEvent + )[0].args + + const rollupUser = nitroRollupUserLogicFac.attach( + rollupCreatedEventArgs.rollupAddress + ) + + return { + rollup: rollupCreatedEventArgs.rollupAddress, + bridge: rollupCreatedEventArgs.delayedBridge, + inboxTemplate: await nitroBridgeCreator.inboxTemplate(), + outbox: await rollupUser.outbox(), + sequencerInbox: rollupCreatedEventArgs.sequencerInbox, + } + } + + public async upgradeClassicContracts(classicConfig: { + proxyAdminAddr: string + inboxAddr: string + sequencerInboxAddr: string + rollupAddr: string + confirmPeriodBlocks: BigNumber + }) { + const proxyAdminContractFac = new ProxyAdmin__factory(this.proxyAdminOwner) + const proxyAdmin = proxyAdminContractFac.attach( + classicConfig.proxyAdminAddr + ) + + const inboxFac = new Inbox__factory(this.proxyAdminOwner) + const newInboxImp = await inboxFac.deploy() + await newInboxImp.deployed() + await proxyAdmin + // CHRIS: TODO: this should be upgradeAndCall + .upgrade(classicConfig.inboxAddr, newInboxImp.address) + + // -- sequencer inbox + const sequencerInboxFac = new SequencerInbox__factory(this.proxyAdminOwner) + const newSequencerInboxImp = await sequencerInboxFac.deploy() + await newSequencerInboxImp.deployed() + const sequencerInboxPostUpdgrade = + newSequencerInboxImp.interface.encodeFunctionData('postUpgradeInit') + await proxyAdmin.upgradeAndCall( + classicConfig.sequencerInboxAddr, + newSequencerInboxImp.address, + sequencerInboxPostUpdgrade + ) + + // -- rollup + + const rollupFac = new Rollup__factory(this.proxyAdminOwner) + const newRollupImp = await rollupFac.deploy( + classicConfig.confirmPeriodBlocks + ) + await newRollupImp.deployed() + const rollupPostUpgrade = + newRollupImp.interface.encodeFunctionData('postUpgradeInit') + await proxyAdmin.upgradeAndCall( + classicConfig.rollupAddr, + newRollupImp.address, + rollupPostUpgrade + ) + + // -- rollup user + const rollupUserFac = new RollupUserFacet__factory(this.proxyAdminOwner) + const newRollupUserImp = await rollupUserFac.deploy() + await newRollupUserImp.deployed() + + // -- rollup admin + const rollupAdminFac = new RollupAdminFacet__factory(this.proxyAdminOwner) + const newRollupAdminImp = await rollupAdminFac.deploy() + await newRollupAdminImp.deployed() + + const rollupAdmin = rollupAdminFac + .attach(classicConfig.rollupAddr) + .connect(this.proxyAdminOwner) + await ( + await rollupAdmin.setFacets( + newRollupAdminImp.address, + newRollupUserImp.address + ) + ).wait() + } + + // CHRIS: TODO: check for the presence of this everywhere + private nitroMigrator?: NitroMigrator + + public async deployMigrator( + config: Parameters + ) { + const nitroMigratorFac = new NitroMigrator__factory(this.proxyAdminOwner) + this.nitroMigrator = await nitroMigratorFac.deploy(...config) + } + + // CHRIS: TODO: ensure these functions are called in the correct order? + + // CHRIS: TODO: put this classic config in the constructor + public async step1( + classicConfig: { rollupAddr: string; bridgeAddr: string }, + nitroConfig: { rollupAddr: string; bridgeAddr: string } + ) { + if (!this.nitroMigrator) + throw new Error('Step 1 called before migrator deployed.') + + const rollupAdminFac = new RollupAdminFacet__factory(this.proxyAdminOwner) + const rollupAdmin = rollupAdminFac + .attach(classicConfig.rollupAddr) + .connect(this.proxyAdminOwner) + + await ( + await rollupAdmin.transferOwnership( + classicConfig.bridgeAddr, + this.nitroMigrator.address + ) + ).wait() + await (await rollupAdmin.setOwner(this.nitroMigrator.address)).wait() + + // CHRIS: TODO: should nitro contracts be added to dev or prod dependencies? + + // CHRIS: TODO: get the correct address here, dont hard code? + const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' + // CHRIS: TODO: remove this!!!! we only do this whilst we wait for a receive function to be added to the + const nitroRollupAdminLogicFac = new NitroRollupAdminLogic__factory( + this.proxyAdminOwner + ) + const nitroRollupAdminFacet = await nitroRollupAdminLogicFac.attach( + nitroConfig.rollupAddr + ) + // nitro bridge + await ( + await nitroRollupAdminFacet.setInbox(classicConfig.bridgeAddr, true) + ).wait() + + const nitroBridgeFac = new NitroBridge__factory(this.proxyAdminOwner) + const nitroBridge = nitroBridgeFac.attach(nitroConfig.bridgeAddr) + const enqueueDelayedMessage = + await nitroBridge.interface.encodeFunctionData('enqueueDelayedMessage', [ + 0, + this.nitroMigrator.address, + constants.HashZero, + ]) + + await ( + await this.nitroMigrator.functions.nitroStep1( + [mainnetSequencer], + enqueueDelayedMessage + ) + ).wait() + } +} diff --git a/yarn.lock b/yarn.lock index 1846586729..d67334eb6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,15 @@ # yarn lockfile v1 +"@arbitrum/nitro-contracts@1.0.0-beta.5": + version "1.0.0-beta.5" + resolved "https://registry.yarnpkg.com/@arbitrum/nitro-contracts/-/nitro-contracts-1.0.0-beta.5.tgz#b4ca2a8d99b8a108e7dc412f6c2cb74818d5099a" + integrity sha512-hEpRXIL8S6AfTt6dqJsKCa84JufhuXuRgm2BnximdRrhJ8ukqR6Pt/mndYMa4nWRRTBMYkIxy6EA5iYxDwxWAQ== + dependencies: + "@openzeppelin/contracts" "4.5.0" + "@openzeppelin/contracts-upgradeable" "4.5.2" + hardhat "^2.6.6" + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -184,6 +193,14 @@ crc-32 "^1.2.0" ethereumjs-util "^7.1.4" +"@ethereumjs/common@^2.6.4": + version "2.6.4" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.4.tgz#1b3cdd3aa4ee3b0ca366756fc35e4a03022a01cc" + integrity sha512-RDJh/R/EAr+B7ZRg5LfJ0BIpf/1LydFgYdvZEuTraojCbVypO2sQ+QnpP5u2wJf9DASyooKqu8O4FJEWUV6NXw== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.4" + "@ethereumjs/ethash@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@ethereumjs/ethash/-/ethash-1.1.0.tgz#7c5918ffcaa9cb9c1dc7d12f77ef038c11fb83fb" @@ -221,6 +238,24 @@ merkle-patricia-tree "^4.2.4" rustbn.js "~0.2.0" +"@ethereumjs/vm@^5.9.0": + version "5.9.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.9.0.tgz#54e485097c6dbb42554d541ef8d84d06b7ddf12f" + integrity sha512-0IRsj4IuF8lFDWVVLc4mFOImaSX8VWF8CGm3mXHG/LLlQ/Tryy/kKXMw/bU9D+Zw03CdteW+wCGqNFS6+mPjpg== + dependencies: + "@ethereumjs/block" "^3.6.2" + "@ethereumjs/blockchain" "^5.5.2" + "@ethereumjs/common" "^2.6.4" + "@ethereumjs/tx" "^3.5.1" + async-eventemitter "^0.2.4" + core-js-pure "^3.0.1" + debug "^4.3.3" + ethereumjs-util "^7.1.4" + functional-red-black-tree "^1.0.1" + mcl-wasm "^0.7.1" + merkle-patricia-tree "^4.2.4" + rustbn.js "~0.2.0" + "@ethersproject/abi@5.0.0-beta.153": version "5.0.0-beta.153" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" @@ -789,7 +824,8 @@ "@types/sinon-chai" "^3.2.3" "@types/web3" "1.0.19" -"@openzeppelin/contracts-0.8@npm:@openzeppelin/contracts@^4.3.2": +"@openzeppelin/contracts-0.8@npm:@openzeppelin/contracts@^4.3.2", "@openzeppelin/contracts@4.5.0": + name "@openzeppelin/contracts-0.8" version "4.5.0" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.5.0.tgz#3fd75d57de172b3743cdfc1206883f56430409cc" integrity sha512-fdkzKPYMjrRiPK6K4y64e6GzULR7R7RwxSigHS8DDp7aWDeoReqsQI+cxHV1UuhAqX69L1lAaWDxenfP+xiqzA== @@ -799,6 +835,11 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-3.4.2.tgz#2c2a1b0fa748235a1f495b6489349776365c51b3" integrity sha512-mDlBS17ymb2wpaLcrqRYdnBAmP1EwqhOXMvqWk2c5Q1N1pm5TkiCtXM9Xzznh4bYsQBq0aIWEkFFE2+iLSN1Tw== +"@openzeppelin/contracts-upgradeable@4.5.2": + version "4.5.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.5.2.tgz#90d9e47bacfd8693bfad0ac8a394645575528d05" + integrity sha512-xgWZYaPlrEOQo3cBj97Ufiuv79SPd8Brh4GcFYhPgb6WvAq4ppz8dWKL6h+jLAK01rUqMRp/TS9AdXgAeNvCLA== + "@openzeppelin/contracts@3.4.2": version "3.4.2" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2.tgz#d81f786fda2871d1eb8a8c5a73e455753ba53527" @@ -1583,6 +1624,13 @@ aproba@^1.0.3: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== +arbos-precompiles@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arbos-precompiles/-/arbos-precompiles-1.0.2.tgz#7bebd5963aef972cd259eb41f3116ea065013ea6" + integrity sha512-1dOFYFJUN0kKoofh6buZJ8qCqTs+oLGSsGzHI0trA/Pka/TCERflCRsNVxez2lihOvK7MT/a2RA8AepKtBXdPQ== + dependencies: + hardhat "^2.6.4" + are-we-there-yet@~1.1.2: version "1.1.7" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" @@ -5564,6 +5612,60 @@ hardhat@^2.6.1, hardhat@^2.6.4: uuid "^8.3.2" ws "^7.4.6" +hardhat@^2.6.6: + version "2.9.7" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.9.7.tgz#b31302b089486ec1c13c5a3dff18fe71f955f33b" + integrity sha512-PVSgTlM4Mtc4HNEoISpcM6rRNAK3ngqhxUaTmSw9eCtuVmtxTK86Tqnuq4zNPmlrtcuReXry9k3LGEnk2gJgbA== + dependencies: + "@ethereumjs/block" "^3.6.2" + "@ethereumjs/blockchain" "^5.5.2" + "@ethereumjs/common" "^2.6.4" + "@ethereumjs/tx" "^3.5.1" + "@ethereumjs/vm" "^5.9.0" + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" + "@sentry/node" "^5.18.1" + "@solidity-parser/parser" "^0.14.1" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + aggregate-error "^3.0.0" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + ethereum-cryptography "^0.1.2" + ethereumjs-abi "^0.6.8" + ethereumjs-util "^7.1.4" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "7.2.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + lodash "^4.17.11" + merkle-patricia-tree "^4.2.4" + mnemonist "^0.38.0" + mocha "^9.2.0" + p-map "^4.0.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + slash "^3.0.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + "true-case-path" "^2.2.1" + tsort "0.0.1" + undici "^4.14.1" + uuid "^8.3.2" + ws "^7.4.6" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" From 00c5faf69ce4d1759a5893507971a97b0dd99e20 Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Tue, 7 Jun 2022 20:13:02 +0200 Subject: [PATCH 24/86] Added step 1 --- .../arb-bridge-eth/test/nitro-upgrade.fork.ts | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts index 9e32743870..1c2ce25f12 100644 --- a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts +++ b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts @@ -2,7 +2,7 @@ import { ethers, network } from 'hardhat' import { expect, assert } from 'chai' import { CurrentDeployments } from 'arb-upgrades/types' import { readFileSync, readdirSync } from 'fs' -import { Bridge, NitroMigrator__factory, ProxyAdmin } from '../build/types' +import { Bridge, NitroMigrator__factory, ProxyAdmin, RollupAdminFacet__factory } from '../build/types' import { BigNumber, constants, Signer } from 'ethers' import { Provider } from '@ethersproject/providers' import { Inbox__factory as NitroInbox__factory } from '../build/types/nitro/factories/Inbox__factory' @@ -268,20 +268,24 @@ describe('Nitro upgrade', () => { //////// CHRIS /////// PUT BACK IN // // CHRIS: TODO: remove this when we remove teh setInbox(true) above - // await ( - // await nitroRollupAdminFacet.setInbox( - // deployments.contracts.Bridge.proxyAddress, - // false - // ) - // ).wait() + const nitroRollupAdminFac = new NitroRollupAdminLogic__factory(proxyAdminSigner) + const nitroRollupAdminFacet = nitroRollupAdminFac.attach(nitroContracts.rollup) + await ( + await nitroRollupAdminFacet.setInbox( + deployments.contracts.Bridge.proxyAddress, + false + ) + ).wait() // // step 2 // // this would normally be the latest created node // // but we need to confirm all the nodes to ensure that // // CHRIS: TODO: use the admin to force confirm the nodes between // // latest created and latest confirmed + const classicRollupAdminFac = new RollupAdminFacet__factory(proxyAdminSigner) + const rollupAdmin = classicRollupAdminFac.attach(prevRollup.address); // const latestCreated = await rollupAdmin.latestNodeCreated() - // const latestConfirmed = await rollupAdmin.latestConfirmed() + const latestConfirmed = await rollupAdmin.latestConfirmed() // console.log( // 'confirmed count', // latestConfirmed.toNumber(), @@ -310,9 +314,9 @@ describe('Nitro upgrade', () => { // ).wait() // console.log("after exec") - // const res = await ( - // await rollupAdmin.shutdownForNitro(latestConfirmed) - // ).wait() + const res = await ( + await rollupAdmin.shutdownForNitro(latestConfirmed) + ).wait() // const res = await (await nitroMigrator.nitroStep2(latestConfirmed, { gasLimit: 3000000})).wait() // console.log(res.gasUsed.toString()) From 23bc282451d25a4d4166a2e42525ca7c9eb6b40c Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Wed, 8 Jun 2022 11:58:05 +0200 Subject: [PATCH 25/86] Added step2 and 3 --- .../arb-bridge-eth/test/nitro-upgrade.fork.ts | 85 +++++--- .../test/nitroMigrationManager.ts | 206 +++++++++--------- 2 files changed, 158 insertions(+), 133 deletions(-) diff --git a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts index 1c2ce25f12..86492e2f9c 100644 --- a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts +++ b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts @@ -2,7 +2,12 @@ import { ethers, network } from 'hardhat' import { expect, assert } from 'chai' import { CurrentDeployments } from 'arb-upgrades/types' import { readFileSync, readdirSync } from 'fs' -import { Bridge, NitroMigrator__factory, ProxyAdmin, RollupAdminFacet__factory } from '../build/types' +import { + Bridge, + NitroMigrator__factory, + ProxyAdmin, + RollupAdminFacet__factory, +} from '../build/types' import { BigNumber, constants, Signer } from 'ethers' import { Provider } from '@ethersproject/providers' import { Inbox__factory as NitroInbox__factory } from '../build/types/nitro/factories/Inbox__factory' @@ -200,7 +205,17 @@ describe('Nitro upgrade', () => { // CHRIS: TODO: don't we need to create a new 'deployments' file? // CHRIS: TODO: shouldnt the bridge be upgraded? no, we're doing a fresh one - const migrationManager = new NitroMigrationManager(proxyAdminSigner) + const migrationManager = new NitroMigrationManager(proxyAdminSigner, { + proxyAdminAddr: deployments.proxyAdminAddress, + inboxAddr: deployments.contracts.Inbox.proxyAddress, + rollupAddr: deployments.contracts.Rollup.proxyAddress, + sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, + bridgeAddr: deployments.contracts.Bridge.proxyAddress, + outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, + outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, + rollupEventBridgeAddr: + deployments.contracts.RollupEventBridge.proxyAddress, + }) const rollupFac = await ethers.getContractFactory('Rollup') // lookup params from previous rollup? @@ -212,7 +227,7 @@ describe('Nitro upgrade', () => { '0x9900000000000000000000000000000000000000000000000000000000000010' const loserStakeEscrow = constants.AddressZero - const nitroContracts = await migrationManager.deployNitro({ + const nitroContracts = await migrationManager.deployNitroContracts({ confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), stakeToken: await prevRollup.stakeToken(), @@ -233,43 +248,43 @@ describe('Nitro upgrade', () => { }, }) - await migrationManager.upgradeClassicContracts({ - proxyAdminAddr: deployments.proxyAdminAddress, - confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), - inboxAddr: deployments.contracts.Inbox.proxyAddress, - rollupAddr: prevRollup.address, - sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, - }) + await migrationManager.upgradeClassicContracts + // CHRIS: TODO: remove this!!!! we only do this whilst we wait for a receive function to be added to the + const nitroRollupAdminLogicFac = new NitroRollupAdminLogic__factory( + proxyAdminSigner + ) + const nitroRollupAdminFacet = await nitroRollupAdminLogicFac.attach( + nitroContracts.rollup + ) + // nitro bridge + await ( + await nitroRollupAdminFacet.setInbox( + deployments.contracts.Bridge.implAddress, + true + ) + ).wait() + + await migrationManager.upgradeClassicContracts() - await migrationManager.deployMigrator([ - deployments.contracts.Inbox.proxyAddress, - deployments.contracts.SequencerInbox.proxyAddress, - deployments.contracts.Bridge.proxyAddress, - deployments.contracts.RollupEventBridge.proxyAddress, - (deployments.contracts as any)['OldOutbox'].proxyAddress, - (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here? - deployments.contracts.Rollup.proxyAddress, + await migrationManager.deployMigrator({ // CHRIS: TODO: we could do more in terms of checks // CHRIS: TODO: we could do a check that all the contracts we care about have been correctly deployed with the correct admins // CHRIS: TODO: we could also check that the contracts below have expected functions on them? - nitroContracts.bridge, - nitroContracts.inboxTemplate, - nitroContracts.outbox, - nitroContracts.sequencerInbox, - ]) + bridgeAddr: nitroContracts.bridge, + inboxTemplateAddr: nitroContracts.inboxTemplate, + outboxAddr: nitroContracts.outbox, + sequencerInboxAddr: nitroContracts.sequencerInbox, + }) - await migrationManager.step1( - { - rollupAddr: deployments.contracts.Rollup.proxyAddress, - bridgeAddr: deployments.contracts.Bridge.proxyAddress, - }, - { rollupAddr: nitroContracts.rollup, bridgeAddr: nitroContracts.bridge } - ) + // CHRIS: TODO: get the correct address here, dont hard code? + const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' + await migrationManager.step1([mainnetSequencer], { + rollupAddr: nitroContracts.rollup, + bridgeAddr: nitroContracts.bridge, + }) //////// CHRIS /////// PUT BACK IN // // CHRIS: TODO: remove this when we remove teh setInbox(true) above - const nitroRollupAdminFac = new NitroRollupAdminLogic__factory(proxyAdminSigner) - const nitroRollupAdminFacet = nitroRollupAdminFac.attach(nitroContracts.rollup) await ( await nitroRollupAdminFacet.setInbox( deployments.contracts.Bridge.proxyAddress, @@ -282,8 +297,10 @@ describe('Nitro upgrade', () => { // // but we need to confirm all the nodes to ensure that // // CHRIS: TODO: use the admin to force confirm the nodes between // // latest created and latest confirmed - const classicRollupAdminFac = new RollupAdminFacet__factory(proxyAdminSigner) - const rollupAdmin = classicRollupAdminFac.attach(prevRollup.address); + const classicRollupAdminFac = new RollupAdminFacet__factory( + proxyAdminSigner + ) + const rollupAdmin = classicRollupAdminFac.attach(prevRollup.address) // const latestCreated = await rollupAdmin.latestNodeCreated() const latestConfirmed = await rollupAdmin.latestConfirmed() // console.log( diff --git a/packages/arb-bridge-eth/test/nitroMigrationManager.ts b/packages/arb-bridge-eth/test/nitroMigrationManager.ts index d21e231eef..ea88983840 100644 --- a/packages/arb-bridge-eth/test/nitroMigrationManager.ts +++ b/packages/arb-bridge-eth/test/nitroMigrationManager.ts @@ -29,13 +29,58 @@ import { export class NitroMigrationManager { private readonly provider: Provider - public constructor(public readonly proxyAdminOwner: Signer) { + public constructor( + public readonly proxyAdminOwner: Signer, + public readonly classicConfig: { + rollupAddr: string + proxyAdminAddr: string + inboxAddr: string + sequencerInboxAddr: string + bridgeAddr: string + rollupEventBridgeAddr: string + outboxV1: string + outboxV2: string // CHRIS: TODO: v2 here? + } + ) { if (!proxyAdminOwner.provider) { throw new Error('No provider attached to deployer signer.') } this.provider = proxyAdminOwner.provider } + public async run( + classicSequencers: string[], + nitroConfig: Parameters[0] + ) { + const nitroContracts = await this.deployNitroContracts(nitroConfig) + await this.upgradeClassicContracts() + await this.transferClassicOwnership() + await this.deployMigrator({ + bridgeAddr: nitroContracts.bridge, + inboxTemplateAddr: nitroContracts.inboxTemplate, + outboxAddr: nitroContracts.outbox, + sequencerInboxAddr: nitroContracts.sequencerInbox, + }) + await this.step1(classicSequencers, { + rollupAddr: nitroContracts.rollup, + bridgeAddr: nitroContracts.bridge, + }) + + + + const nodeNum = await this.waitForNodeConfirmation() + + await this.step2(nodeNum) + + await this.step3() + + + } + + private async waitForNodeConfirmation(): Promise { + throw new Error("Not implemented."); + } + private async deployNitroChallengeContracts(signer: Signer) { const oneStepProver0Fac = new NitroOneStepProver0__factory(signer) const oneStepProver0 = await oneStepProver0Fac.deploy() @@ -76,27 +121,7 @@ export class NitroMigrationManager { } } - // confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), - // extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), - // stakeToken: await prevRollup.stakeToken(), - // baseStake: await prevRollup.baseStake(), - // wasmModuleRoot: wasmModuleRoot, - // // CHRIS: TODO: decide who the owner should be - // // CHRIS: TODO: shouldnt it be someone different to the proxy admin? - // owner: await prevRollup.owner(), - // chainId: (await this.provider.getNetwork()).chainId, - // loserStakeEscrow: loserStakeEscrow, - // sequencerInboxMaxTimeVariation: { - // // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess - // // CHRIS: TODO: make sure these are all the values we want - // delayBlocks: (60 * 60 * 24) / 15, - // futureBlocks: 12, - // delaySeconds: 60 * 60 * 24, - // futureSeconds: 60 * 60, - // }, - // }, - - public async deployNitro( + public async deployNitroContracts( config: Parameters[0] ) { const nitroBridgeCreatorFac = new NitroBridgeCreator__factory( @@ -144,44 +169,14 @@ export class NitroMigrationManager { nonce: nonce + 2, }) - // lookup params from previous rollup? - // CHRIS: TODO: why do we have a param in the constructor? how is this rollup logic supposed to be deployed? - - // const prevRollup = await rollupFac.attach( - // deployments.contracts.Rollup.proxyAddress - // ) - // const wasmModuleRoot = - // '0x9900000000000000000000000000000000000000000000000000000000000010' - // const loserStakeEscrow = constants.AddressZero - // { - // confirmPeriodBlocks: await config.confirmPeriodBlocks, - // extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), - // stakeToken: await prevRollup.stakeToken(), - // baseStake: await prevRollup.baseStake(), - // wasmModuleRoot: wasmModuleRoot, - // // CHRIS: TODO: decide who the owner should be - // // CHRIS: TODO: shouldnt it be someone different to the proxy admin? - // owner: await prevRollup.owner(), - // chainId: (await this.provider.getNetwork()).chainId, - // loserStakeEscrow: loserStakeEscrow, - // sequencerInboxMaxTimeVariation: { - // // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess - // // CHRIS: TODO: make sure these are all the values we want - // delayBlocks: (60 * 60 * 24) / 15, - // futureBlocks: 12, - // delaySeconds: 60 * 60 * 24, - // futureSeconds: 60 * 60, - // }, - // } - const createRollupTx = await nitroRollupCreator.createRollup( config, expectedRollupAddress ) // CHRIS: TODO: quite a cool idea would be to figure out at compile - // time what possible events could be emitted? is that even possible, - // I guess not. So how could we do it? we can + // time what possible events could be emitted from a given tx? is that even possible, + // I guess not. So how could we do it? we cant // CHRIS: we're deploying a new proxy admin in createRollup // CHRIS: this will mean we actually have 2 proxy admins in the system post nitro @@ -215,16 +210,10 @@ export class NitroMigrationManager { } } - public async upgradeClassicContracts(classicConfig: { - proxyAdminAddr: string - inboxAddr: string - sequencerInboxAddr: string - rollupAddr: string - confirmPeriodBlocks: BigNumber - }) { + public async upgradeClassicContracts() { const proxyAdminContractFac = new ProxyAdmin__factory(this.proxyAdminOwner) const proxyAdmin = proxyAdminContractFac.attach( - classicConfig.proxyAdminAddr + this.classicConfig.proxyAdminAddr ) const inboxFac = new Inbox__factory(this.proxyAdminOwner) @@ -232,7 +221,7 @@ export class NitroMigrationManager { await newInboxImp.deployed() await proxyAdmin // CHRIS: TODO: this should be upgradeAndCall - .upgrade(classicConfig.inboxAddr, newInboxImp.address) + .upgrade(this.classicConfig.inboxAddr, newInboxImp.address) // -- sequencer inbox const sequencerInboxFac = new SequencerInbox__factory(this.proxyAdminOwner) @@ -241,22 +230,21 @@ export class NitroMigrationManager { const sequencerInboxPostUpdgrade = newSequencerInboxImp.interface.encodeFunctionData('postUpgradeInit') await proxyAdmin.upgradeAndCall( - classicConfig.sequencerInboxAddr, + this.classicConfig.sequencerInboxAddr, newSequencerInboxImp.address, sequencerInboxPostUpdgrade ) // -- rollup - const rollupFac = new Rollup__factory(this.proxyAdminOwner) - const newRollupImp = await rollupFac.deploy( - classicConfig.confirmPeriodBlocks - ) + const prevRollup = rollupFac.attach(this.classicConfig.rollupAddr) + const confirmPeriodBlocks = await prevRollup.confirmPeriodBlocks() + const newRollupImp = await rollupFac.deploy(confirmPeriodBlocks) await newRollupImp.deployed() const rollupPostUpgrade = newRollupImp.interface.encodeFunctionData('postUpgradeInit') await proxyAdmin.upgradeAndCall( - classicConfig.rollupAddr, + this.classicConfig.rollupAddr, newRollupImp.address, rollupPostUpgrade ) @@ -272,7 +260,7 @@ export class NitroMigrationManager { await newRollupAdminImp.deployed() const rollupAdmin = rollupAdminFac - .attach(classicConfig.rollupAddr) + .attach(this.classicConfig.rollupAddr) .connect(this.proxyAdminOwner) await ( await rollupAdmin.setFacets( @@ -285,52 +273,58 @@ export class NitroMigrationManager { // CHRIS: TODO: check for the presence of this everywhere private nitroMigrator?: NitroMigrator - public async deployMigrator( - config: Parameters - ) { + public async deployMigrator(nitroConfig: { + bridgeAddr: string + outboxAddr: string + sequencerInboxAddr: string + inboxTemplateAddr: string + }) { const nitroMigratorFac = new NitroMigrator__factory(this.proxyAdminOwner) - this.nitroMigrator = await nitroMigratorFac.deploy(...config) + this.nitroMigrator = await nitroMigratorFac.deploy( + this.classicConfig.inboxAddr, + this.classicConfig.sequencerInboxAddr, + this.classicConfig.bridgeAddr, + this.classicConfig.rollupEventBridgeAddr, + this.classicConfig.outboxV1, + this.classicConfig.outboxV2, + this.classicConfig.rollupAddr, + nitroConfig.bridgeAddr, + nitroConfig.outboxAddr, + nitroConfig.sequencerInboxAddr, + nitroConfig.inboxTemplateAddr + ) } - // CHRIS: TODO: ensure these functions are called in the correct order? - - // CHRIS: TODO: put this classic config in the constructor - public async step1( - classicConfig: { rollupAddr: string; bridgeAddr: string }, - nitroConfig: { rollupAddr: string; bridgeAddr: string } - ) { + public async transferClassicOwnership() { if (!this.nitroMigrator) - throw new Error('Step 1 called before migrator deployed.') + throw new Error('Transfer ownership called before migrator deployed.') const rollupAdminFac = new RollupAdminFacet__factory(this.proxyAdminOwner) const rollupAdmin = rollupAdminFac - .attach(classicConfig.rollupAddr) + .attach(this.classicConfig.rollupAddr) .connect(this.proxyAdminOwner) await ( await rollupAdmin.transferOwnership( - classicConfig.bridgeAddr, + this.classicConfig.bridgeAddr, this.nitroMigrator.address ) ).wait() await (await rollupAdmin.setOwner(this.nitroMigrator.address)).wait() + } - // CHRIS: TODO: should nitro contracts be added to dev or prod dependencies? + // CHRIS: TODO: ensure these functions are called in the correct order? - // CHRIS: TODO: get the correct address here, dont hard code? - const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' - // CHRIS: TODO: remove this!!!! we only do this whilst we wait for a receive function to be added to the - const nitroRollupAdminLogicFac = new NitroRollupAdminLogic__factory( - this.proxyAdminOwner - ) - const nitroRollupAdminFacet = await nitroRollupAdminLogicFac.attach( - nitroConfig.rollupAddr - ) - // nitro bridge - await ( - await nitroRollupAdminFacet.setInbox(classicConfig.bridgeAddr, true) - ).wait() + // CHRIS: TODO: put this classic config in the constructor + public async step1( + classicSequencers: string[], + nitroConfig: { rollupAddr: string; bridgeAddr: string } + ) { + if (!this.nitroMigrator) + throw new Error('Step 1 called before migrator deployed.') + // CHRIS: TODO: should nitro contracts be added to dev or prod dependencies? + const nitroBridgeFac = new NitroBridge__factory(this.proxyAdminOwner) const nitroBridge = nitroBridgeFac.attach(nitroConfig.bridgeAddr) const enqueueDelayedMessage = @@ -342,9 +336,23 @@ export class NitroMigrationManager { await ( await this.nitroMigrator.functions.nitroStep1( - [mainnetSequencer], + classicSequencers, enqueueDelayedMessage ) ).wait() } + + public async step2(finalNodeNum: BigNumber) { + if (!this.nitroMigrator) + throw new Error('Step 2 called before migrator deployed.') + + await this.nitroMigrator.nitroStep2(finalNodeNum) + } + + public async step3() { + if (!this.nitroMigrator) + throw new Error('Step 3 called before migrator deployed.') + + await this.nitroMigrator.nitroStep3() + } } From 5f127cd1b96be98c8e088bda04e7a1e9d7faf740 Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Wed, 8 Jun 2022 12:01:03 +0200 Subject: [PATCH 26/86] Added waits to internal steps --- packages/arb-bridge-eth/test/nitro-upgrade.fork.ts | 4 +--- packages/arb-bridge-eth/test/nitroMigrationManager.ts | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts index 86492e2f9c..85144ebeb8 100644 --- a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts +++ b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts @@ -331,9 +331,7 @@ describe('Nitro upgrade', () => { // ).wait() // console.log("after exec") - const res = await ( - await rollupAdmin.shutdownForNitro(latestConfirmed) - ).wait() + await migrationManager.step2(latestConfirmed) // const res = await (await nitroMigrator.nitroStep2(latestConfirmed, { gasLimit: 3000000})).wait() // console.log(res.gasUsed.toString()) diff --git a/packages/arb-bridge-eth/test/nitroMigrationManager.ts b/packages/arb-bridge-eth/test/nitroMigrationManager.ts index ea88983840..4f3908b3c4 100644 --- a/packages/arb-bridge-eth/test/nitroMigrationManager.ts +++ b/packages/arb-bridge-eth/test/nitroMigrationManager.ts @@ -346,13 +346,13 @@ export class NitroMigrationManager { if (!this.nitroMigrator) throw new Error('Step 2 called before migrator deployed.') - await this.nitroMigrator.nitroStep2(finalNodeNum) + await (await this.nitroMigrator.nitroStep2(finalNodeNum)).wait() } public async step3() { if (!this.nitroMigrator) throw new Error('Step 3 called before migrator deployed.') - await this.nitroMigrator.nitroStep3() + await (await this.nitroMigrator.nitroStep3()).wait() } } From ee9e2b1b63c66e5288b1775d546b5b31ec19f2c9 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Wed, 8 Jun 2022 12:39:00 +0100 Subject: [PATCH 27/86] fix: separate getting all stakers loop from delete stakers loop --- .../contracts/rollup/facets/RollupAdmin.sol | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol index 3ad103b0b6..da283be3ea 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol @@ -361,8 +361,16 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { } uint256 stakerCount = stakerCount(); + address[] memory stakerAddresses = new address[](stakerCount); + + // we separate the loop that gets staker addresses to be different from the loop that withdraw stakers + // since withdrawing stakers has side-effects on the array that is queried in `getStakerAddress`. + for (uint64 i = 0; i < stakerCount; ++i) { + stakerAddresses[i] = getStakerAddress(i); + } + for (uint64 i = 0; i < stakerCount; ++i) { - address stakerAddr = getStakerAddress(i); + address stakerAddr = stakerAddresses[i]; address chall = currentChallenge(stakerAddr); if (chall != address(0)) { From 3724374835166aefb94ca0f23b26b7bb2221728c Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Wed, 8 Jun 2022 14:18:33 +0200 Subject: [PATCH 28/86] Now running step 1 correctly --- .../arb-bridge-eth/test/nitro-upgrade.fork.ts | 340 ++++++++---------- .../test/nitroMigrationManager.ts | 39 +- 2 files changed, 181 insertions(+), 198 deletions(-) diff --git a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts index 85144ebeb8..9fcc29c0f8 100644 --- a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts +++ b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts @@ -23,8 +23,9 @@ import { OneStepProofEntry__factory as NitroOneStepProofEntry__factory } from '. import { ChallengeManager__factory as NitroChallengeManager__factory } from '../build/types/nitro/factories/ChallengeManager__factory' import { RollupAdminLogic__factory as NitroRollupAdminLogic__factory } from '../build/types/nitro/factories/RollupAdminLogic__factory' import { RollupUserLogic__factory as NitroRollupUserLogic__factory } from '../build/types/nitro/factories/RollupUserLogic__factory' -import { Interface } from '@ethersproject/abi' +import { defaultAbiCoder, Interface } from '@ethersproject/abi' import { NitroMigrationManager } from './nitroMigrationManager' +import { arrayify } from '@ethersproject/bytes' describe('Nitro upgrade', () => { const getDeployments = async (provider: Provider) => { @@ -35,171 +36,159 @@ describe('Nitro upgrade', () => { return JSON.parse(deploymentData.toString()) as CurrentDeployments } - it('fails to construct if contracts havent been upgraded', async () => { + const getProxyAdminSigner = async (proxyAdminAddr: string) => { + const proxyAdmin = await ethers.getContractAt('ProxyAdmin', proxyAdminAddr) + const owner = await proxyAdmin.owner() + // airdrop + await network.provider.send('hardhat_setBalance', [ + owner, + '0x16189AD417E380000', + ]) + + // use owner + await network.provider.request({ + method: 'hardhat_impersonateAccount', + params: [owner], + }) + + return await ethers.provider.getSigner(owner) + } + + it('deploy fails if classic contracts havent been upgraded', async () => { try { const deployments = await getDeployments(ethers.provider) - const nitroMigratorFac = await ethers.getContractFactory('NitroMigrator') - await nitroMigratorFac.deploy( - deployments.contracts.Inbox.proxyAddress, - deployments.contracts.SequencerInbox.proxyAddress, - deployments.contracts.Bridge.proxyAddress, - deployments.contracts.RollupEventBridge.proxyAddress, - (deployments.contracts as any)['OldOutbox'].proxyAddress, - (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here? - deployments.contracts.Rollup.proxyAddress, - constants.AddressZero, - constants.AddressZero, - constants.AddressZero, - constants.AddressZero + const proxyAdminSigner = await getProxyAdminSigner( + deployments.proxyAdminAddress ) + const migrationManager = new NitroMigrationManager(proxyAdminSigner, { + proxyAdminAddr: deployments.proxyAdminAddress, + inboxAddr: deployments.contracts.Inbox.proxyAddress, + rollupAddr: deployments.contracts.Rollup.proxyAddress, + sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, + bridgeAddr: deployments.contracts.Bridge.proxyAddress, + outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, + outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, + rollupEventBridgeAddr: + deployments.contracts.RollupEventBridge.proxyAddress, + }) + + await migrationManager.deployMigrator({ + bridgeAddr: constants.AddressZero, + inboxTemplateAddr: constants.AddressZero, + outboxAddr: constants.AddressZero, + sequencerInboxAddr: constants.AddressZero, + }) + assert.fail('Expected constructor to fail') } catch {} + }) - // const delayedInboxAddress = deployments.contracts.Inbox.proxyAddress - - // const delayedInbox = await ethers.getContractAt( - // 'Inbox', - // delayedInboxAddress - // ) - - // const bridge = await ethers.getContractAt( - // 'Bridge', - // await delayedInbox.bridge() - // ) + it('deploy fails if nitro contracts havent been deployed', async () => { + try { + const provider = ethers.provider + const deployments = await getDeployments(provider) + const proxyAdminSigner = await getProxyAdminSigner( + deployments.proxyAdminAddress + ) - // const rollupProxyAddress = await bridge.owner() - // const rollupDispatch = await ethers.getContractAt( - // 'Rollup', - // rollupProxyAddress - // ) + const migrationManager = new NitroMigrationManager(proxyAdminSigner, { + proxyAdminAddr: deployments.proxyAdminAddress, + inboxAddr: deployments.contracts.Inbox.proxyAddress, + rollupAddr: deployments.contracts.Rollup.proxyAddress, + sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, + bridgeAddr: deployments.contracts.Bridge.proxyAddress, + outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, + outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, + rollupEventBridgeAddr: + deployments.contracts.RollupEventBridge.proxyAddress, + }) + + await migrationManager.upgradeClassicContracts() + await migrationManager.deployMigrator({ + bridgeAddr: constants.AddressZero, + inboxTemplateAddr: constants.AddressZero, + outboxAddr: constants.AddressZero, + sequencerInboxAddr: constants.AddressZero, + }) + assert.fail('Expected deploy to fail') + } catch {} + }) - // const sequencerInboxAddress = await rollupDispatch.sequencerBridge() - // const sequencerInbox = await ethers.getContractAt( - // 'SequencerInbox', - // sequencerInboxAddress - // ) + it('step 1 fails if ownership not transferred', async () => { + try { + const provider = ethers.provider + const deployments = await getDeployments(provider) + const proxyAdminSigner = await getProxyAdminSigner( + deployments.proxyAdminAddress + ) - // // deploy new logic contracts - // const NewRollupLogic = await ethers.getContractFactory('Rollup') - // const newRollupLogic = await NewRollupLogic.deploy(1) - // await newRollupLogic.deployed() - - // const NewAdminFacet = await ethers.getContractFactory('RollupAdminFacet') - // const newAdminFacet = await NewAdminFacet.deploy() - // await newAdminFacet.deployed() - - // const NewSequencerInbox = await ethers.getContractFactory('SequencerInbox') - // const newSequencerInbox = await NewSequencerInbox.deploy() - // await newSequencerInbox.deployed() - - // // valid previous rollup state - // const iface = new ethers.utils.Interface([ - // `function sequencerInboxMaxDelayBlocks() view returns (uint256)`, - // `function sequencerInboxMaxDelaySeconds() view returns (uint256)`, - // ]) - // const oldRollupInterface = new ethers.Contract(rollupProxyAddress, iface) - // const prevMaxDelayBlocks = await oldRollupInterface - // .connect(ethers.provider.getSigner()) - // .sequencerInboxMaxDelayBlocks() - // const prevMaxDelaySeconds = await oldRollupInterface - // .connect(ethers.provider.getSigner()) - // .sequencerInboxMaxDelaySeconds() - - // // setup for fork test - // const adminStorageSlot = - // '0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103' - // const l1ProxyAdmin = - // '0x' + - // ( - // await ethers.provider.getStorageAt( - // sequencerInbox.address, - // adminStorageSlot - // ) - // ).substr(26) - // const proxyAdmin = await ethers.getContractAt('ProxyAdmin', l1ProxyAdmin) - // const owner = await proxyAdmin.owner() - - // // airdrop - // await network.provider.send('hardhat_setBalance', [ - // owner, - // '0x16189AD417E380000', - // ]) - - // // use owner - // await network.provider.request({ - // method: 'hardhat_impersonateAccount', - // params: [owner], - // }) - - // const ownerSigner = await ethers.provider.getSigner(owner) - - // // upgrade contracts - - // await proxyAdmin - // .connect(ownerSigner) - // .upgrade(sequencerInbox.address, newSequencerInbox.address) - - // const externalCall = - // rollupDispatch.interface.encodeFunctionData('postUpgradeInit') - - // await proxyAdmin - // .connect(ownerSigner) - // .upgradeAndCall(rollupProxyAddress, newRollupLogic.address, externalCall) - - // await network.provider.request({ - // method: 'hardhat_stopImpersonatingAccount', - // params: [owner], - // }) - - // // verify storage was assigned correctly - - // const postMaxDelayBlocks = await sequencerInbox.maxDelayBlocks() - // const postMaxDelaySeconds = await sequencerInbox.maxDelaySeconds() - - // const rollupMaxDelayBlocks = await rollupDispatch.STORAGE_GAP_1() - // const rollupMaxDelaySeconds = await rollupDispatch.STORAGE_GAP_2() - - // expect(prevMaxDelayBlocks).to.equal(postMaxDelayBlocks) - // expect(prevMaxDelaySeconds).to.equal(postMaxDelaySeconds) - - // expect(rollupMaxDelayBlocks).to.equal(0) - // expect(rollupMaxDelaySeconds).to.equal(0) - - // // should not be able to call postUpgradeInit - - // const newerAdminFacet = await NewAdminFacet.deploy() - // await newerAdminFacet.deployed() - - // await expect(rollupDispatch.postUpgradeInit()).to.be.revertedWith( - // 'NOT_FROM_ADMIN' - // ) + const migrationManager = new NitroMigrationManager(proxyAdminSigner, { + proxyAdminAddr: deployments.proxyAdminAddress, + inboxAddr: deployments.contracts.Inbox.proxyAddress, + rollupAddr: deployments.contracts.Rollup.proxyAddress, + sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, + bridgeAddr: deployments.contracts.Bridge.proxyAddress, + outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, + outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, + rollupEventBridgeAddr: + deployments.contracts.RollupEventBridge.proxyAddress, + }) + + await migrationManager.upgradeClassicContracts() + + const rollupFac = await ethers.getContractFactory('Rollup') + const prevRollup = await rollupFac.attach( + deployments.contracts.Rollup.proxyAddress + ) + const wasmModuleRoot = + '0x9900000000000000000000000000000000000000000000000000000000000010' + const loserStakeEscrow = constants.AddressZero + const nitroContracts = await migrationManager.deployNitroContracts({ + confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), + extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), + stakeToken: await prevRollup.stakeToken(), + baseStake: await prevRollup.baseStake(), + wasmModuleRoot: wasmModuleRoot, + // CHRIS: TODO: decide who the owner should be + // CHRIS: TODO: shouldnt it be someone different to the proxy admin? + owner: await prevRollup.owner(), + chainId: (await provider.getNetwork()).chainId, + loserStakeEscrow: loserStakeEscrow, + sequencerInboxMaxTimeVariation: { + // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess + // CHRIS: TODO: make sure these are all the values we want + delayBlocks: (60 * 60 * 24) / 15, + futureBlocks: 12, + delaySeconds: 60 * 60 * 24, + futureSeconds: 60 * 60, + }, + }) + + await migrationManager.deployMigrator({ + bridgeAddr: nitroContracts.bridge, + inboxTemplateAddr: nitroContracts.inboxTemplate, + outboxAddr: nitroContracts.outbox, + sequencerInboxAddr: nitroContracts.sequencerInbox, + }) + + const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' + await migrationManager.step1([mainnetSequencer], { + bridgeAddr: nitroContracts.bridge, + rollupAddr: nitroContracts.rollup, + }) + + assert.fail('Expected step 1 to fail') + } catch {} }) it.only('upgrade and construct', async () => { const provider = ethers.provider const deployments = await getDeployments(provider) - - let proxyAdmin = await ethers.getContractAt( - 'ProxyAdmin', + const proxyAdminSigner = await getProxyAdminSigner( deployments.proxyAdminAddress ) - const proxyAdminOwner = await proxyAdmin.owner() - - // airdrop - await network.provider.send('hardhat_setBalance', [ - proxyAdminOwner, - '0x16189AD417E380000', - ]) - // use owner - await network.provider.request({ - method: 'hardhat_impersonateAccount', - params: [proxyAdminOwner], - }) - - const proxyAdminSigner = await provider.getSigner(proxyAdminOwner) - proxyAdmin = proxyAdmin.connect(proxyAdminSigner) // CHRIS: TODO: should it be possible to reverse each of the steps? or is that going too far? // CHRIS: TODO: don't we need to create a new 'deployments' file? @@ -247,8 +236,22 @@ describe('Nitro upgrade', () => { futureSeconds: 60 * 60, }, }) + console.log(nitroContracts) + + await migrationManager.upgradeClassicContracts() + + const nitroMigrator = await migrationManager.deployMigrator({ + // CHRIS: TODO: we could do more in terms of checks + // CHRIS: TODO: we could do a check that all the contracts we care about have been correctly deployed with the correct admins + // CHRIS: TODO: we could also check that the contracts below have expected functions on them? + bridgeAddr: nitroContracts.bridge, + inboxTemplateAddr: nitroContracts.inboxTemplate, + outboxAddr: nitroContracts.outbox, + sequencerInboxAddr: nitroContracts.sequencerInbox, + }) + + await migrationManager.transferClassicOwnership() - await migrationManager.upgradeClassicContracts // CHRIS: TODO: remove this!!!! we only do this whilst we wait for a receive function to be added to the const nitroRollupAdminLogicFac = new NitroRollupAdminLogic__factory( proxyAdminSigner @@ -257,26 +260,17 @@ describe('Nitro upgrade', () => { nitroContracts.rollup ) // nitro bridge + console.log(deployments.contracts.Bridge.proxyAddress) + await ( await nitroRollupAdminFacet.setInbox( - deployments.contracts.Bridge.implAddress, + deployments.contracts.Bridge.proxyAddress, true ) ).wait() - await migrationManager.upgradeClassicContracts() - await migrationManager.deployMigrator({ - // CHRIS: TODO: we could do more in terms of checks - // CHRIS: TODO: we could do a check that all the contracts we care about have been correctly deployed with the correct admins - // CHRIS: TODO: we could also check that the contracts below have expected functions on them? - bridgeAddr: nitroContracts.bridge, - inboxTemplateAddr: nitroContracts.inboxTemplate, - outboxAddr: nitroContracts.outbox, - sequencerInboxAddr: nitroContracts.sequencerInbox, - }) - - // CHRIS: TODO: get the correct address here, dont hard code? + // CHRIS: TODO: get the correct address here, dont hard code? const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' await migrationManager.step1([mainnetSequencer], { rollupAddr: nitroContracts.rollup, @@ -311,27 +305,7 @@ describe('Nitro upgrade', () => { // const stakerCount = await rollupAdmin.stakerCount() // console.log('staker count', stakerCount.toNumber()) - // const beforeB = Date.now() - - // const iFace = new Interface(['event Face(uint length)']) - // console.log('Face topic', iFace.getEventTopic('Face')) - - // const setOwnerData = await rollupAdmin.interface.encodeFunctionData( - // 'setOwner', - // [await proxyAdminSigner.getAddress()] - // ) - // console.log("before exec") - - // await ( - // await nitroMigrator.executeTransaction( - // setOwnerData, - // rollupAdmin.address, - // BigNumber.from(0) - // ) - // ).wait() - // console.log("after exec") - - await migrationManager.step2(latestConfirmed) + await migrationManager.step2(latestConfirmed, true, true) // const res = await (await nitroMigrator.nitroStep2(latestConfirmed, { gasLimit: 3000000})).wait() // console.log(res.gasUsed.toString()) diff --git a/packages/arb-bridge-eth/test/nitroMigrationManager.ts b/packages/arb-bridge-eth/test/nitroMigrationManager.ts index 4f3908b3c4..2436d4d9f3 100644 --- a/packages/arb-bridge-eth/test/nitroMigrationManager.ts +++ b/packages/arb-bridge-eth/test/nitroMigrationManager.ts @@ -50,35 +50,33 @@ export class NitroMigrationManager { public async run( classicSequencers: string[], - nitroConfig: Parameters[0] + nitroConfig: Parameters[0], + destroyAlternatives: boolean, + destroyChallenges: boolean ) { const nitroContracts = await this.deployNitroContracts(nitroConfig) await this.upgradeClassicContracts() - await this.transferClassicOwnership() await this.deployMigrator({ - bridgeAddr: nitroContracts.bridge, - inboxTemplateAddr: nitroContracts.inboxTemplate, - outboxAddr: nitroContracts.outbox, - sequencerInboxAddr: nitroContracts.sequencerInbox, + bridgeAddr: nitroContracts.bridge, + inboxTemplateAddr: nitroContracts.inboxTemplate, + outboxAddr: nitroContracts.outbox, + sequencerInboxAddr: nitroContracts.sequencerInbox, }) + await this.transferClassicOwnership() await this.step1(classicSequencers, { rollupAddr: nitroContracts.rollup, bridgeAddr: nitroContracts.bridge, }) - - const nodeNum = await this.waitForNodeConfirmation() - await this.step2(nodeNum) + await this.step2(nodeNum, destroyAlternatives, destroyChallenges) await this.step3() - - } private async waitForNodeConfirmation(): Promise { - throw new Error("Not implemented."); + throw new Error('Not implemented.') } private async deployNitroChallengeContracts(signer: Signer) { @@ -268,6 +266,14 @@ export class NitroMigrationManager { newRollupUserImp.address ) ).wait() + + return { + inbox: inboxFac.attach(this.classicConfig.inboxAddr), + sequencerInbox: sequencerInboxFac.attach( + this.classicConfig.sequencerInboxAddr + ), + rollupAdmin: rollupAdminFac.attach(this.classicConfig.rollupAddr), + } } // CHRIS: TODO: check for the presence of this everywhere @@ -293,6 +299,8 @@ export class NitroMigrationManager { nitroConfig.sequencerInboxAddr, nitroConfig.inboxTemplateAddr ) + + return this.nitroMigrator; } public async transferClassicOwnership() { @@ -324,7 +332,7 @@ export class NitroMigrationManager { throw new Error('Step 1 called before migrator deployed.') // CHRIS: TODO: should nitro contracts be added to dev or prod dependencies? - + const nitroBridgeFac = new NitroBridge__factory(this.proxyAdminOwner) const nitroBridge = nitroBridgeFac.attach(nitroConfig.bridgeAddr) const enqueueDelayedMessage = @@ -342,11 +350,12 @@ export class NitroMigrationManager { ).wait() } - public async step2(finalNodeNum: BigNumber) { + public async step2(finalNodeNum: BigNumber, destroyAlternatives: boolean, destroyChallenges: boolean) { if (!this.nitroMigrator) throw new Error('Step 2 called before migrator deployed.') - await (await this.nitroMigrator.nitroStep2(finalNodeNum)).wait() + // CHRIS: TODO: pass these args through + await (await this.nitroMigrator.nitroStep2(finalNodeNum, destroyAlternatives, destroyChallenges)).wait() } public async step3() { From 05524eb8d3d73c3f644f246573bd0d08a0756549 Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Wed, 8 Jun 2022 15:20:45 +0200 Subject: [PATCH 29/86] DTidying --- .../arb-bridge-eth/test/nitro-upgrade.fork.ts | 34 +++++--------- .../test/nitroMigrationManager.ts | 46 +++++++++++++++---- 2 files changed, 47 insertions(+), 33 deletions(-) diff --git a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts index 9fcc29c0f8..7a48c5c383 100644 --- a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts +++ b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts @@ -236,11 +236,9 @@ describe('Nitro upgrade', () => { futureSeconds: 60 * 60, }, }) - console.log(nitroContracts) - await migrationManager.upgradeClassicContracts() - const nitroMigrator = await migrationManager.deployMigrator({ + await migrationManager.deployMigrator({ // CHRIS: TODO: we could do more in terms of checks // CHRIS: TODO: we could do a check that all the contracts we care about have been correctly deployed with the correct admins // CHRIS: TODO: we could also check that the contracts below have expected functions on them? @@ -253,24 +251,14 @@ describe('Nitro upgrade', () => { await migrationManager.transferClassicOwnership() // CHRIS: TODO: remove this!!!! we only do this whilst we wait for a receive function to be added to the - const nitroRollupAdminLogicFac = new NitroRollupAdminLogic__factory( - proxyAdminSigner - ) - const nitroRollupAdminFacet = await nitroRollupAdminLogicFac.attach( - nitroContracts.rollup - ) - // nitro bridge - console.log(deployments.contracts.Bridge.proxyAddress) - + // set the classic bridge as a inbox on the nitro bridge await ( - await nitroRollupAdminFacet.setInbox( - deployments.contracts.Bridge.proxyAddress, - true - ) + await new NitroRollupAdminLogic__factory(proxyAdminSigner) + .attach(nitroContracts.rollup) + .setInbox(deployments.contracts.Bridge.proxyAddress, true) ).wait() - - // CHRIS: TODO: get the correct address here, dont hard code? + // CHRIS: TODO: get the correct address here, dont hard code? const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' await migrationManager.step1([mainnetSequencer], { rollupAddr: nitroContracts.rollup, @@ -278,12 +266,12 @@ describe('Nitro upgrade', () => { }) //////// CHRIS /////// PUT BACK IN + // rest the bridge // // CHRIS: TODO: remove this when we remove teh setInbox(true) above await ( - await nitroRollupAdminFacet.setInbox( - deployments.contracts.Bridge.proxyAddress, - false - ) + await await new NitroRollupAdminLogic__factory(proxyAdminSigner) + .attach(nitroContracts.rollup) + .setInbox(deployments.contracts.Bridge.proxyAddress, false) ).wait() // // step 2 @@ -315,7 +303,7 @@ describe('Nitro upgrade', () => { // console.log('step 2 complete') // // step 3 - // await (await nitroMigrator.nitroStep3()).wait() + await migrationManager.step3() // console.log('step 3 complete') diff --git a/packages/arb-bridge-eth/test/nitroMigrationManager.ts b/packages/arb-bridge-eth/test/nitroMigrationManager.ts index 2436d4d9f3..d16ee9db0b 100644 --- a/packages/arb-bridge-eth/test/nitroMigrationManager.ts +++ b/packages/arb-bridge-eth/test/nitroMigrationManager.ts @@ -57,10 +57,10 @@ export class NitroMigrationManager { const nitroContracts = await this.deployNitroContracts(nitroConfig) await this.upgradeClassicContracts() await this.deployMigrator({ - bridgeAddr: nitroContracts.bridge, - inboxTemplateAddr: nitroContracts.inboxTemplate, - outboxAddr: nitroContracts.outbox, - sequencerInboxAddr: nitroContracts.sequencerInbox, + bridgeAddr: nitroContracts.bridge, + inboxTemplateAddr: nitroContracts.inboxTemplate, + outboxAddr: nitroContracts.outbox, + sequencerInboxAddr: nitroContracts.sequencerInbox, }) await this.transferClassicOwnership() await this.step1(classicSequencers, { @@ -68,14 +68,30 @@ export class NitroMigrationManager { bridgeAddr: nitroContracts.bridge, }) - const nodeNum = await this.waitForNodeConfirmation() + const nodeNum = await this.step1point5() await this.step2(nodeNum, destroyAlternatives, destroyChallenges) + await this.step2point5() + await this.step3() } - private async waitForNodeConfirmation(): Promise { + private async step2point5() { + // Step 2.5: check for lingering stuff + + // - Do we have any unexecuted exits? + // - Probably. They should be easy to handle + // - Jason (data science) joining can analyse the number of L2 to L1 txs not executed + // - Check no ongoing challenges + throw new Error('Not implemented.') + } + + private async step1point5(): Promise { + // Step 1.5: check for lingering stuff + + // - Do we have any unredeemed retryables? + // - Probably. They will get copied over throw new Error('Not implemented.') } @@ -300,7 +316,7 @@ export class NitroMigrationManager { nitroConfig.inboxTemplateAddr ) - return this.nitroMigrator; + return this.nitroMigrator } public async transferClassicOwnership() { @@ -350,12 +366,22 @@ export class NitroMigrationManager { ).wait() } - public async step2(finalNodeNum: BigNumber, destroyAlternatives: boolean, destroyChallenges: boolean) { + public async step2( + finalNodeNum: BigNumber, + destroyAlternatives: boolean, + destroyChallenges: boolean + ) { if (!this.nitroMigrator) throw new Error('Step 2 called before migrator deployed.') - // CHRIS: TODO: pass these args through - await (await this.nitroMigrator.nitroStep2(finalNodeNum, destroyAlternatives, destroyChallenges)).wait() + // CHRIS: TODO: pass these args through + await ( + await this.nitroMigrator.nitroStep2( + finalNodeNum, + destroyAlternatives, + destroyChallenges + ) + ).wait() } public async step3() { From d7a53409851e2683593421f6f538e456c96abdab Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Wed, 8 Jun 2022 15:41:49 +0200 Subject: [PATCH 30/86] Added intermediary steps --- .../arb-bridge-eth/test/nitro-upgrade.fork.ts | 74 ++++++++++++++----- .../test/nitroMigrationManager.ts | 58 +++++++++------ 2 files changed, 93 insertions(+), 39 deletions(-) diff --git a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts index 7a48c5c383..147c4b42fe 100644 --- a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts +++ b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts @@ -182,7 +182,7 @@ describe('Nitro upgrade', () => { } catch {} }) - it.only('upgrade and construct', async () => { + it('upgrade and construct', async () => { const provider = ethers.provider const deployments = await getDeployments(provider) const proxyAdminSigner = await getProxyAdminSigner( @@ -248,15 +248,8 @@ describe('Nitro upgrade', () => { sequencerInboxAddr: nitroContracts.sequencerInbox, }) - await migrationManager.transferClassicOwnership() + await migrationManager.step0point5() - // CHRIS: TODO: remove this!!!! we only do this whilst we wait for a receive function to be added to the - // set the classic bridge as a inbox on the nitro bridge - await ( - await new NitroRollupAdminLogic__factory(proxyAdminSigner) - .attach(nitroContracts.rollup) - .setInbox(deployments.contracts.Bridge.proxyAddress, true) - ).wait() // CHRIS: TODO: get the correct address here, dont hard code? const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' @@ -265,14 +258,6 @@ describe('Nitro upgrade', () => { bridgeAddr: nitroContracts.bridge, }) - //////// CHRIS /////// PUT BACK IN - // rest the bridge - // // CHRIS: TODO: remove this when we remove teh setInbox(true) above - await ( - await await new NitroRollupAdminLogic__factory(proxyAdminSigner) - .attach(nitroContracts.rollup) - .setInbox(deployments.contracts.Bridge.proxyAddress, false) - ).wait() // // step 2 // // this would normally be the latest created node @@ -309,4 +294,59 @@ describe('Nitro upgrade', () => { //////// CHRIS /////// PUT BACK IN }) + + it.only('run succeeds', async () => { + const provider = ethers.provider + const deployments = await getDeployments(provider) + const proxyAdminSigner = await getProxyAdminSigner( + deployments.proxyAdminAddress + ) + const migrationManager = new NitroMigrationManager(proxyAdminSigner, { + proxyAdminAddr: deployments.proxyAdminAddress, + inboxAddr: deployments.contracts.Inbox.proxyAddress, + rollupAddr: deployments.contracts.Rollup.proxyAddress, + sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, + bridgeAddr: deployments.contracts.Bridge.proxyAddress, + outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, + outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, + rollupEventBridgeAddr: + deployments.contracts.RollupEventBridge.proxyAddress, + }) + + const rollupFac = await ethers.getContractFactory('Rollup') + // lookup params from previous rollup? + // CHRIS: TODO: why do we have a param in the constructor? how is this rollup logic supposed to be deployed? + const prevRollup = await rollupFac.attach( + deployments.contracts.Rollup.proxyAddress + ) + const wasmModuleRoot = + '0x9900000000000000000000000000000000000000000000000000000000000010' + const loserStakeEscrow = constants.AddressZero + const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' + await migrationManager.run( + [mainnetSequencer], + { + confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), + extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), + stakeToken: await prevRollup.stakeToken(), + baseStake: await prevRollup.baseStake(), + wasmModuleRoot: wasmModuleRoot, + // CHRIS: TODO: decide who the owner should be + // CHRIS: TODO: shouldnt it be someone different to the proxy admin? + owner: await prevRollup.owner(), + chainId: (await provider.getNetwork()).chainId, + loserStakeEscrow: loserStakeEscrow, + sequencerInboxMaxTimeVariation: { + // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess + // CHRIS: TODO: make sure these are all the values we want + delayBlocks: (60 * 60 * 24) / 15, + futureBlocks: 12, + delaySeconds: 60 * 60 * 24, + futureSeconds: 60 * 60, + }, + }, + true, + true + ) + }) }) diff --git a/packages/arb-bridge-eth/test/nitroMigrationManager.ts b/packages/arb-bridge-eth/test/nitroMigrationManager.ts index d16ee9db0b..9fa89f6577 100644 --- a/packages/arb-bridge-eth/test/nitroMigrationManager.ts +++ b/packages/arb-bridge-eth/test/nitroMigrationManager.ts @@ -62,39 +62,20 @@ export class NitroMigrationManager { outboxAddr: nitroContracts.outbox, sequencerInboxAddr: nitroContracts.sequencerInbox, }) - await this.transferClassicOwnership() + await this.step0point5() + await this.step1(classicSequencers, { rollupAddr: nitroContracts.rollup, bridgeAddr: nitroContracts.bridge, }) - const nodeNum = await this.step1point5() await this.step2(nodeNum, destroyAlternatives, destroyChallenges) - await this.step2point5() await this.step3() } - private async step2point5() { - // Step 2.5: check for lingering stuff - - // - Do we have any unexecuted exits? - // - Probably. They should be easy to handle - // - Jason (data science) joining can analyse the number of L2 to L1 txs not executed - // - Check no ongoing challenges - throw new Error('Not implemented.') - } - - private async step1point5(): Promise { - // Step 1.5: check for lingering stuff - - // - Do we have any unredeemed retryables? - // - Probably. They will get copied over - throw new Error('Not implemented.') - } - private async deployNitroChallengeContracts(signer: Signer) { const oneStepProver0Fac = new NitroOneStepProver0__factory(signer) const oneStepProver0 = await oneStepProver0Fac.deploy() @@ -319,7 +300,7 @@ export class NitroMigrationManager { return this.nitroMigrator } - public async transferClassicOwnership() { + public async step0point5() { if (!this.nitroMigrator) throw new Error('Transfer ownership called before migrator deployed.') @@ -358,12 +339,35 @@ export class NitroMigrationManager { constants.HashZero, ]) + // CHRIS: TODO: remove this!!!! we only do this whilst we wait for a receive function to be added to the + // set the classic bridge as a inbox on the nitro bridge + const nitroRollupAdmin = new NitroRollupAdminLogic__factory( + this.proxyAdminOwner + ).attach(nitroConfig.rollupAddr) + await ( + await nitroRollupAdmin.setInbox(this.classicConfig.bridgeAddr, true) + ).wait() + await ( await this.nitroMigrator.functions.nitroStep1( classicSequencers, enqueueDelayedMessage ) ).wait() + + // reset the bridge + // // CHRIS: TODO: remove this when we remove teh setInbox(true) above + await ( + await nitroRollupAdmin.setInbox(this.classicConfig.bridgeAddr, false) + ).wait() + } + + public async step1point5(): Promise { + // Step 1.5: check for lingering stuff + + // - Do we have any unredeemed retryables? + // - Probably. They will get copied over + throw new Error('Not implemented.') } public async step2( @@ -384,6 +388,16 @@ export class NitroMigrationManager { ).wait() } + public async step2point5() { + // Step 2.5: check for lingering stuff + + // - Do we have any unexecuted exits? + // - Probably. They should be easy to handle + // - Jason (data science) joining can analyse the number of L2 to L1 txs not executed + // - Check no ongoing challenges + throw new Error('Not implemented.') + } + public async step3() { if (!this.nitroMigrator) throw new Error('Step 3 called before migrator deployed.') From 4f848f16312c517b4e48a97ddea52777f59be073 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Fri, 1 Jul 2022 18:55:30 -0500 Subject: [PATCH 31/86] Add configure-migration hardhat task --- .../contracts/bridge/NitroMigrator.sol | 51 ++++++++++--------- .../arb-bridge-eth/deploy/NitroMigrator.ts | 16 ++++++ packages/arb-bridge-eth/hardhat.dev-config.ts | 6 +++ packages/arb-upgrades/ethBridgeTasks.ts | 26 ++++++++++ 4 files changed, 76 insertions(+), 23 deletions(-) create mode 100644 packages/arb-bridge-eth/deploy/NitroMigrator.ts diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index bdc3ce997e..05dfcb185d 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -33,22 +33,21 @@ pragma solidity ^0.6.11; contract NitroMigrator is Ownable { uint8 internal constant L1MessageType_shutdownForNitro = 128; - Inbox public immutable inbox; - SequencerInbox public immutable sequencerInbox; - Bridge public immutable bridge; - RollupEventBridge public immutable rollupEventBridge; - OldOutbox public immutable outboxV1; - Outbox public immutable outboxV2; + Inbox public inbox; + SequencerInbox public sequencerInbox; + Bridge public bridge; + RollupEventBridge public rollupEventBridge; + OldOutbox public outboxV1; + Outbox public outboxV2; // assumed this contract is now the rollup admin - RollupAdminFacet public immutable rollup; + RollupAdminFacet public rollup; - address public immutable nitroBridge; - address public immutable nitroOutbox; - address public immutable nitroSequencerInbox; - address public immutable nitroInboxLogic; + address public nitroBridge; /// @dev The nitro migration includes various steps. /// + /// > Uninitialized is before the rollup contract addresses have been set. + /// /// > Step0 is setup with contract deployments and integrity checks /// /// This is the setup for the upgrade, where all contracts are deployed but the upgrade migration hasn't started yet. @@ -65,6 +64,7 @@ contract NitroMigrator is Ownable { /// /// > Step3 is enabling the nitro chain from the state settled in Step1 and Step2. enum NitroMigrationSteps { + Uninitialized, Step0, Step1, Step2, @@ -72,7 +72,11 @@ contract NitroMigrator is Ownable { } NitroMigrationSteps public latestCompleteStep; - constructor( + constructor() public Ownable() { + latestCompleteStep = NitroMigrationSteps.Uninitialized; + } + + function configureDeployment( Inbox _inbox, SequencerInbox _sequencerInbox, Bridge _bridge, @@ -80,11 +84,10 @@ contract NitroMigrator is Ownable { OldOutbox _outboxV1, Outbox _outboxV2, RollupAdminFacet _rollup, - address _nitroBridge, - address _nitroOutbox, - address _nitroSequencerInbox, - address _nitroInboxLogic - ) public Ownable() { + address _nitroBridge + ) external onlyOwner { + require(latestCompleteStep == NitroMigrationSteps.Uninitialized, "WRONG_STEP"); + inbox = _inbox; sequencerInbox = _sequencerInbox; bridge = _bridge; @@ -110,14 +113,8 @@ contract NitroMigrator is Ownable { // we check that the new contracts that will receive permissions are actually contracts require(Address.isContract(_nitroBridge), "NITRO_BRIDGE_NOT_CONTRACT"); - require(Address.isContract(_nitroOutbox), "NITRO_OUTBOX_NOT_CONTRACT"); - require(Address.isContract(_nitroSequencerInbox), "NITRO_SEQINBOX_NOT_CONTRACT"); - require(Address.isContract(_nitroInboxLogic), "NITRO_INBOX_NOT_CONTRACT"); nitroBridge = _nitroBridge; - nitroOutbox = _nitroOutbox; - nitroSequencerInbox = _nitroSequencerInbox; - nitroInboxLogic = _nitroInboxLogic; latestCompleteStep = NitroMigrationSteps.Step0; } @@ -214,4 +211,12 @@ contract NitroMigrator is Ownable { } } } + + function transferOtherContractOwnership(Ownable ownable, address newOwner) + external + payable + onlyOwner + { + ownable.transferOwnership(newOwner); + } } diff --git a/packages/arb-bridge-eth/deploy/NitroMigrator.ts b/packages/arb-bridge-eth/deploy/NitroMigrator.ts new file mode 100644 index 0000000000..c4d8986381 --- /dev/null +++ b/packages/arb-bridge-eth/deploy/NitroMigrator.ts @@ -0,0 +1,16 @@ +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre + const { deploy } = deployments + const { deployer } = await getNamedAccounts() + + await deploy('NitroMigrator', { + from: deployer, + args: [], + }) +} + +module.exports = func +module.exports.tags = ['NitroMigrator', 'live'] diff --git a/packages/arb-bridge-eth/hardhat.dev-config.ts b/packages/arb-bridge-eth/hardhat.dev-config.ts index e5af0f0e16..fbf896f948 100644 --- a/packages/arb-bridge-eth/hardhat.dev-config.ts +++ b/packages/arb-bridge-eth/hardhat.dev-config.ts @@ -56,6 +56,12 @@ const config = { fork: { url: 'http://127.0.0.1:8545/', }, + shadowfork: { + url: 'http://127.0.0.1:8545/', + accounts: process.env['SHADOWFORK_PRIVKEY'] + ? [process.env['SHADOWFORK_PRIVKEY']] + : [], + }, arbitrum1: { url: 'https://arb1.arbitrum.io/rpc', accounts: process.env['MAINNET_PRIVKEY'] diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index 96dded068c..911ac9a538 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -146,3 +146,29 @@ task('set-outbox', 'deploy and set a new outbox') console.log('Outbox set', setRollupRec) console.log('all set 👍') }) + +task('configure-migration', 'configure nitro migrator contract') + .addParam('migrator', '') + .addParam('oldoutboxproxy', '') + .addParam('nitrobridgeproxy', '') + + .setAction(async (args, hre) => { + const { getDeployments } = initUpgrades(hre, process.cwd()) + const { data } = await getDeployments() + + const Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) + .attach(args.migrator) + .connect(hre.ethers.provider) + const initializeRes = await Migrator.configureDeployment( + data.contracts.Inbox.proxyAddress, + data.contracts.SequencerInbox.proxyAddress, + data.contracts.Bridge.proxyAddress, + data.contracts.RollupEventBridge.proxyAddress, + args.oldoutboxproxy, + data.contracts.Outbox.proxyAddress, + data.contracts.Rollup.proxyAddress, + args.nitrobridgeproxy, + ) + const initializeRec = await initializeRes.wait() + console.log('Nitro migrator configured', initializeRec) + }) From 6bd9a81f7b2b5dac9fbc0cb5e21b808f4220ea5a Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Fri, 1 Jul 2022 21:58:16 -0500 Subject: [PATCH 32/86] Handle inbox migration --- .../contracts/bridge/NitroMigrator.sol | 54 +++++++++++++++---- packages/arb-upgrades/ethBridgeTasks.ts | 4 +- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 05dfcb185d..fd2bdfe5df 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -27,9 +27,26 @@ import "../rollup/RollupLib.sol"; import "../libraries/NitroReadyQuery.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; +import "@openzeppelin/contracts/proxy/ProxyAdmin.sol"; pragma solidity ^0.6.11; +interface INitroBridge is IBridge { + function acceptFundsFromOldBridge() external payable; +} + +interface INitroInbox is IInbox { + function postUpgradeInit(INitroBridge) external; +} + +interface INitroRollup { + function bridge() external view returns (INitroBridge); + + function inbox() external view returns (INitroInbox); + + function setInbox(IInbox newInbox) external; +} + contract NitroMigrator is Ownable { uint8 internal constant L1MessageType_shutdownForNitro = 128; @@ -42,7 +59,7 @@ contract NitroMigrator is Ownable { // assumed this contract is now the rollup admin RollupAdminFacet public rollup; - address public nitroBridge; + INitroBridge public nitroBridge; /// @dev The nitro migration includes various steps. /// @@ -84,7 +101,8 @@ contract NitroMigrator is Ownable { OldOutbox _outboxV1, Outbox _outboxV2, RollupAdminFacet _rollup, - address _nitroBridge + INitroRollup nitroRollup, + ProxyAdmin proxyAdmin ) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Uninitialized, "WRONG_STEP"); @@ -96,6 +114,8 @@ contract NitroMigrator is Ownable { outboxV1 = _outboxV1; outboxV2 = _outboxV2; + nitroBridge = nitroRollup.bridge(); + { // this contract is the rollup admin, and we want to check if the user facet is upgraded // so we deploy a new contract to ensure the query is dispatched to the user facet, not the admin @@ -112,9 +132,21 @@ contract NitroMigrator is Ownable { require(_sequencerInbox.isNitroReady() == uint8(0xa4b1), "SEQINBOX_NOT_UPGRADED"); // we check that the new contracts that will receive permissions are actually contracts - require(Address.isContract(_nitroBridge), "NITRO_BRIDGE_NOT_CONTRACT"); + require(Address.isContract(address(nitroBridge)), "NITRO_BRIDGE_NOT_CONTRACT"); - nitroBridge = _nitroBridge; + // Upgrade the classic inbox to the nitro inbox's impl, + // and configure nitro to use the classic inbox's address. + INitroInbox oldNitroInbox = nitroRollup.inbox(); + address nitroInboxImpl = proxyAdmin.getProxyImplementation( + TransparentUpgradeableProxy(payable(address(oldNitroInbox))) + ); + nitroBridge.setInbox(address(oldNitroInbox), false); + proxyAdmin.upgradeAndCall( + TransparentUpgradeableProxy(payable(address(inbox))), + nitroInboxImpl, + abi.encodeWithSelector(INitroInbox.postUpgradeInit.selector, nitroBridge) + ); + nitroRollup.setInbox(inbox); latestCompleteStep = NitroMigrationSteps.Step0; } @@ -141,7 +173,11 @@ contract NitroMigrator is Ownable { { uint256 bal = address(bridge).balance; - (bool success, ) = bridge.executeCall(nitroBridge, bal, ""); + (bool success, ) = bridge.executeCall( + address(nitroBridge), + bal, + abi.encodeWithSelector(INitroBridge.acceptFundsFromOldBridge.selector) + ); require(success, "ESCROW_TRANSFER_FAIL"); } @@ -172,6 +208,7 @@ contract NitroMigrator is Ownable { ) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step1, "WRONG_STEP"); rollup.shutdownForNitro(finalNodeNum, destroyAlternatives, destroyChallenges); + bridge.setInbox(address(rollupEventBridge), false); latestCompleteStep = NitroMigrationSteps.Step2; } @@ -181,11 +218,10 @@ contract NitroMigrator is Ownable { rollup.latestConfirmed() == rollup.latestNodeCreated(), "ROLLUP_SHUTDOWN_NOT_COMPLETE" ); - bridge.setInbox(address(rollupEventBridge), false); - // enable new Bridge with funds (ie set old outboxes) - // TODO: enable new elements of nitro chain (ie bridge, inbox, outbox, rollup, etc) - // TODO: trigger inbox upgrade to new logic + nitroBridge.setInbox(address(inbox), true); + nitroBridge.setOutbox(address(outboxV1), true); + nitroBridge.setOutbox(address(outboxV2), true); latestCompleteStep = NitroMigrationSteps.Step3; } diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index 911ac9a538..9996953b8c 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -150,7 +150,7 @@ task('set-outbox', 'deploy and set a new outbox') task('configure-migration', 'configure nitro migrator contract') .addParam('migrator', '') .addParam('oldoutboxproxy', '') - .addParam('nitrobridgeproxy', '') + .addParam('nitrorollupproxy', '') .setAction(async (args, hre) => { const { getDeployments } = initUpgrades(hre, process.cwd()) @@ -167,7 +167,7 @@ task('configure-migration', 'configure nitro migrator contract') args.oldoutboxproxy, data.contracts.Outbox.proxyAddress, data.contracts.Rollup.proxyAddress, - args.nitrobridgeproxy, + args.nitrorollupproxy, ) const initializeRec = await initializeRes.wait() console.log('Nitro migrator configured', initializeRec) From 8fc10b8b0490c1126cd7e9716d117fa174c65254 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Fri, 1 Jul 2022 22:06:35 -0500 Subject: [PATCH 33/86] Update configure-migration script to get proxy admin --- packages/arb-upgrades/ethBridgeTasks.ts | 11 ++++++++++- packages/arb-upgrades/index.ts | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index 9996953b8c..4cf5cf738f 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -1,6 +1,6 @@ import { task } from 'hardhat/config' import { HardhatRuntimeEnvironment } from 'hardhat/types' -import { initUpgrades } from './index' +import { initUpgrades, getAdminFromProxyStorage } from './index' const handleFork = async (hre: HardhatRuntimeEnvironment) => { const network = hre.network @@ -156,6 +156,14 @@ task('configure-migration', 'configure nitro migrator contract') const { getDeployments } = initUpgrades(hre, process.cwd()) const { data } = await getDeployments() + const proxyAdmin = await getAdminFromProxyStorage(hre, data.contracts.Inbox.proxyAddress) + const newProxyAdmin = await getAdminFromProxyStorage(hre, args.nitrorollupproxy.proxyAddress) + if (proxyAdmin != newProxyAdmin) { + throw new Error( + 'Classic proxy admin ' + proxyAdmin + ' differs from nitro proxy admin ' + newProxyAdmin + ) + } + const Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) .attach(args.migrator) .connect(hre.ethers.provider) @@ -168,6 +176,7 @@ task('configure-migration', 'configure nitro migrator contract') data.contracts.Outbox.proxyAddress, data.contracts.Rollup.proxyAddress, args.nitrorollupproxy, + proxyAdmin, ) const initializeRec = await initializeRes.wait() console.log('Nitro migrator configured', initializeRec) diff --git a/packages/arb-upgrades/index.ts b/packages/arb-upgrades/index.ts index 9dc5b79ff1..714abef327 100644 --- a/packages/arb-upgrades/index.ts +++ b/packages/arb-upgrades/index.ts @@ -23,7 +23,7 @@ const IMPLEMENTATION_SLOT = '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' const ROLLUP_CONSTRUCTOR_VAL = 42161 -const getAdminFromProxyStorage = async ( +export const getAdminFromProxyStorage = async ( hre: HardhatRuntimeEnvironment, proxyAddress: string ) => { From b1eec0854be5e914c619449d9913402abd4a4ff7 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Wed, 6 Jul 2022 10:27:22 +0100 Subject: [PATCH 34/86] minor changes after merge --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index d0fa00aadc..07e8f55f6d 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -164,10 +164,6 @@ contract NitroMigrator is Ownable { // check that ownership of the bridge and rollup has been transferred require(rollup.owner() == address(this), "ROLLUP_OWNER_NOT_SET"); require(bridge.owner() == address(this), "BRIDGE_OWNER_NOT_SET"); - // we can only check whether the admin contract is ready when we are the owner of it, - // which is why we do it here rather than in the constructor like the other checks. - // this returns a different magic value so we can differentiate the user and admin facets - require(rollup.isNitroReady() == uint8(0xa4b2), "ADMIN_ROLLUP_NOT_NITRO_READY"); uint256 delayedMessageCount = inbox.shutdownForNitro(); @@ -186,6 +182,7 @@ contract NitroMigrator is Ownable { { uint256 bal = address(bridge).balance; + // TODO: import nitro contracts and use interface (bool success, ) = bridge.executeCall( address(nitroBridge), bal, From 3b3fc597fc796816997a6f98511fe607cce66e7a Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Wed, 6 Jul 2022 12:30:44 +0100 Subject: [PATCH 35/86] use latest nitro package --- .../contracts/bridge/NitroMigrator.sol | 34 ++++++++----------- packages/arb-bridge-eth/package.json | 2 +- yarn.lock | 14 ++------ 3 files changed, 18 insertions(+), 32 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 07e8f55f6d..63d4a5a11c 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -28,21 +28,15 @@ import "../libraries/NitroReadyQuery.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/proxy/ProxyAdmin.sol"; +import "@arbitrum/nitro-contracts/src/bridge/IBridgeNoErrors.sol" as INitroBridge; +import "@arbitrum/nitro-contracts/src/bridge/IInboxNoErrors.sol" as INitroInbox; pragma solidity ^0.6.11; -interface INitroBridge is IBridge { - function acceptFundsFromOldBridge() external payable; -} - -interface INitroInbox is IInbox { - function postUpgradeInit(INitroBridge) external; -} - interface INitroRollup { - function bridge() external view returns (INitroBridge); + function bridge() external view returns (INitroBridge.IBridge); - function inbox() external view returns (INitroInbox); + function inbox() external view returns (INitroInbox.IInbox); function setInbox(IInbox newInbox) external; } @@ -59,7 +53,7 @@ contract NitroMigrator is Ownable { // assumed this contract is now the rollup admin RollupAdminFacet public rollup; - INitroBridge public nitroBridge; + INitroBridge.IBridge public nitroBridge; /// @dev The nitro migration includes various steps. /// @@ -135,15 +129,16 @@ contract NitroMigrator is Ownable { // Upgrade the classic inbox to the nitro inbox's impl, // and configure nitro to use the classic inbox's address. - INitroInbox oldNitroInbox = nitroRollup.inbox(); + INitroInbox.IInbox oldNitroInbox = nitroRollup.inbox(); address nitroInboxImpl = proxyAdmin.getProxyImplementation( TransparentUpgradeableProxy(payable(address(oldNitroInbox))) ); - nitroBridge.setInbox(address(oldNitroInbox), false); + // TODO: shouldn't this already be set to false by default? + nitroBridge.setDelayedInbox(address(oldNitroInbox), false); proxyAdmin.upgradeAndCall( TransparentUpgradeableProxy(payable(address(inbox))), nitroInboxImpl, - abi.encodeWithSelector(INitroInbox.postUpgradeInit.selector, nitroBridge) + abi.encodeWithSelector(INitroInbox.IInbox.postUpgradeInit.selector, nitroBridge) ); nitroRollup.setInbox(inbox); @@ -155,10 +150,7 @@ contract NitroMigrator is Ownable { /// it is assumed that at this point the sequencer has stopped receiving txs and has posted its final batch on-chain /// Before this step the ownership of the Rollup and Bridge must have been transferred to this contract // CHRIS: TODO: remove bridge data - function nitroStep1(address[] calldata seqAddresses, bytes calldata bridgeData) - external - onlyOwner - { + function nitroStep1(address[] calldata seqAddresses) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step0, "WRONG_STEP"); // check that ownership of the bridge and rollup has been transferred @@ -186,7 +178,7 @@ contract NitroMigrator is Ownable { (bool success, ) = bridge.executeCall( address(nitroBridge), bal, - abi.encodeWithSelector(INitroBridge.acceptFundsFromOldBridge.selector) + abi.encodeWithSelector(INitroBridge.IBridge.acceptFundsFromOldBridge.selector) ); require(success, "ESCROW_TRANSFER_FAIL"); } @@ -230,7 +222,9 @@ contract NitroMigrator is Ownable { "ROLLUP_SHUTDOWN_NOT_COMPLETE" ); - nitroBridge.setInbox(address(inbox), true); + // TODO: enable sequencer inbox in nitro bridge + // TODO: will there be a rollup event bridge for nitro? + nitroBridge.setDelayedInbox(address(inbox), true); nitroBridge.setOutbox(address(outboxV1), true); nitroBridge.setOutbox(address(outboxV2), true); diff --git a/packages/arb-bridge-eth/package.json b/packages/arb-bridge-eth/package.json index 7ee46722a2..40ac322691 100644 --- a/packages/arb-bridge-eth/package.json +++ b/packages/arb-bridge-eth/package.json @@ -45,7 +45,7 @@ "hardhat": "hardhat --config hardhat.config.ts" }, "dependencies": { - "@arbitrum/nitro-contracts": "1.0.0-beta.5", + "@arbitrum/nitro-contracts": "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?678866136ca917ed20dd3f0ee23176bb7bb7bd49", "@openzeppelin/contracts": "3.4.2", "@openzeppelin/contracts-0.8": "npm:@openzeppelin/contracts@^4.3.2", "@openzeppelin/contracts-upgradeable": "3.4.2", diff --git a/yarn.lock b/yarn.lock index d67334eb6c..6d0e26cd0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,9 @@ # yarn lockfile v1 -"@arbitrum/nitro-contracts@1.0.0-beta.5": - version "1.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@arbitrum/nitro-contracts/-/nitro-contracts-1.0.0-beta.5.tgz#b4ca2a8d99b8a108e7dc412f6c2cb74818d5099a" - integrity sha512-hEpRXIL8S6AfTt6dqJsKCa84JufhuXuRgm2BnximdRrhJ8ukqR6Pt/mndYMa4nWRRTBMYkIxy6EA5iYxDwxWAQ== +"@arbitrum/nitro-contracts@https://gitpkg.now.sh/OffchainLabs/nitro/contracts?678866136ca917ed20dd3f0ee23176bb7bb7bd49": + version "1.0.0-beta.8" + resolved "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?678866136ca917ed20dd3f0ee23176bb7bb7bd49#ccacdf6e00feb1a8af23c0938b2f00ead2ee69fd" dependencies: "@openzeppelin/contracts" "4.5.0" "@openzeppelin/contracts-upgradeable" "4.5.2" @@ -1624,13 +1623,6 @@ aproba@^1.0.3: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -arbos-precompiles@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/arbos-precompiles/-/arbos-precompiles-1.0.2.tgz#7bebd5963aef972cd259eb41f3116ea065013ea6" - integrity sha512-1dOFYFJUN0kKoofh6buZJ8qCqTs+oLGSsGzHI0trA/Pka/TCERflCRsNVxez2lihOvK7MT/a2RA8AepKtBXdPQ== - dependencies: - hardhat "^2.6.4" - are-we-there-yet@~1.1.2: version "1.1.7" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" From aa5079e54a1680b0a8443aab9b6d0767bc21b11d Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Fri, 8 Jul 2022 17:17:52 +0100 Subject: [PATCH 36/86] address PR comments --- .../arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 63d4a5a11c..870a0568bf 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -130,11 +130,12 @@ contract NitroMigrator is Ownable { // Upgrade the classic inbox to the nitro inbox's impl, // and configure nitro to use the classic inbox's address. INitroInbox.IInbox oldNitroInbox = nitroRollup.inbox(); + // The nitro deployment script already configured a delayed inbox, so we disable it here + nitroBridge.setDelayedInbox(address(oldNitroInbox), false); + // TODO: we want to initialise this to a paused state address nitroInboxImpl = proxyAdmin.getProxyImplementation( TransparentUpgradeableProxy(payable(address(oldNitroInbox))) ); - // TODO: shouldn't this already be set to false by default? - nitroBridge.setDelayedInbox(address(oldNitroInbox), false); proxyAdmin.upgradeAndCall( TransparentUpgradeableProxy(payable(address(inbox))), nitroInboxImpl, @@ -149,7 +150,6 @@ contract NitroMigrator is Ownable { /// this will create the final input in the inbox, but there won't be the final assertion available yet. /// it is assumed that at this point the sequencer has stopped receiving txs and has posted its final batch on-chain /// Before this step the ownership of the Rollup and Bridge must have been transferred to this contract - // CHRIS: TODO: remove bridge data function nitroStep1(address[] calldata seqAddresses) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step0, "WRONG_STEP"); @@ -198,7 +198,7 @@ contract NitroMigrator is Ownable { // this speeds up the process allowing validators to post assertions more frequently rollup.setMinimumAssertionPeriod(4); - // TODO: remove permissions from gas refunder to current sequencer inbox + // we don't remove permissions from gas refunder to current sequencer inbox as that can be handled independently from the upgrade latestCompleteStep = NitroMigrationSteps.Step1; } @@ -222,8 +222,7 @@ contract NitroMigrator is Ownable { "ROLLUP_SHUTDOWN_NOT_COMPLETE" ); - // TODO: enable sequencer inbox in nitro bridge - // TODO: will there be a rollup event bridge for nitro? + // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); nitroBridge.setOutbox(address(outboxV1), true); nitroBridge.setOutbox(address(outboxV2), true); From df4e8352cdda8eea2435f4a330ede90c97e9bcf3 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Fri, 8 Jul 2022 17:46:30 +0100 Subject: [PATCH 37/86] update inbox comment --- .../arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 2 +- packages/arb-bridge-eth/package.json | 2 +- yarn.lock | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 870a0568bf..99d2bb1e04 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -132,7 +132,7 @@ contract NitroMigrator is Ownable { INitroInbox.IInbox oldNitroInbox = nitroRollup.inbox(); // The nitro deployment script already configured a delayed inbox, so we disable it here nitroBridge.setDelayedInbox(address(oldNitroInbox), false); - // TODO: we want to initialise this to a paused state + // the nitro inbox is initialised to a paused state so users can't post txs address nitroInboxImpl = proxyAdmin.getProxyImplementation( TransparentUpgradeableProxy(payable(address(oldNitroInbox))) ); diff --git a/packages/arb-bridge-eth/package.json b/packages/arb-bridge-eth/package.json index 40ac322691..ea0eebe3d5 100644 --- a/packages/arb-bridge-eth/package.json +++ b/packages/arb-bridge-eth/package.json @@ -45,7 +45,7 @@ "hardhat": "hardhat --config hardhat.config.ts" }, "dependencies": { - "@arbitrum/nitro-contracts": "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?678866136ca917ed20dd3f0ee23176bb7bb7bd49", + "@arbitrum/nitro-contracts": "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?b705200c4d9ca90e82579057e1b155c3913562db", "@openzeppelin/contracts": "3.4.2", "@openzeppelin/contracts-0.8": "npm:@openzeppelin/contracts@^4.3.2", "@openzeppelin/contracts-upgradeable": "3.4.2", diff --git a/yarn.lock b/yarn.lock index 6d0e26cd0e..0b9b1cf265 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,6 +10,14 @@ "@openzeppelin/contracts-upgradeable" "4.5.2" hardhat "^2.6.6" +"@arbitrum/nitro-contracts@https://gitpkg.now.sh/OffchainLabs/nitro/contracts?b705200c4d9ca90e82579057e1b155c3913562db": + version "1.0.0-beta.8" + resolved "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?b705200c4d9ca90e82579057e1b155c3913562db#388f31134598b44d9265b08b9129341e42a0c70b" + dependencies: + "@openzeppelin/contracts" "4.5.0" + "@openzeppelin/contracts-upgradeable" "4.5.2" + hardhat "^2.6.6" + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" From 32c5fce029fdaddefc1bfe1a6632e6187ce0e5e4 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Fri, 8 Jul 2022 15:21:26 -0500 Subject: [PATCH 38/86] Migrator changes to get deployment configuration working --- .../contracts/bridge/NitroMigrator.sol | 7 +-- .../contracts/rollup/facets/IRollupFacets.sol | 5 ++ packages/arb-upgrades/ethBridgeTasks.ts | 51 +++++++++++++++---- 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 99d2bb1e04..dffc8cd527 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -94,8 +94,9 @@ contract NitroMigrator is Ownable { OldOutbox _outboxV1, Outbox _outboxV2, RollupAdminFacet _rollup, + ProxyAdmin oldProxyAdmin, INitroRollup nitroRollup, - ProxyAdmin proxyAdmin + ProxyAdmin newProxyAdmin ) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Uninitialized, "WRONG_STEP"); @@ -133,10 +134,10 @@ contract NitroMigrator is Ownable { // The nitro deployment script already configured a delayed inbox, so we disable it here nitroBridge.setDelayedInbox(address(oldNitroInbox), false); // the nitro inbox is initialised to a paused state so users can't post txs - address nitroInboxImpl = proxyAdmin.getProxyImplementation( + address nitroInboxImpl = newProxyAdmin.getProxyImplementation( TransparentUpgradeableProxy(payable(address(oldNitroInbox))) ); - proxyAdmin.upgradeAndCall( + oldProxyAdmin.upgradeAndCall( TransparentUpgradeableProxy(payable(address(inbox))), nitroInboxImpl, abi.encodeWithSelector(INitroInbox.IInbox.postUpgradeInit.selector, nitroBridge) diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/IRollupFacets.sol b/packages/arb-bridge-eth/contracts/rollup/facets/IRollupFacets.sol index 94b539b5dc..2a00b68e98 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/IRollupFacets.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/IRollupFacets.sol @@ -208,3 +208,8 @@ interface IRollupAdmin { uint256 afterLogCount ) external; } + +interface INitroRollupCore { + function inbox() external view returns (address); + function owner() external view returns (address); +} diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index 4cf5cf738f..6951e0e7ed 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -156,17 +156,49 @@ task('configure-migration', 'configure nitro migrator contract') const { getDeployments } = initUpgrades(hre, process.cwd()) const { data } = await getDeployments() - const proxyAdmin = await getAdminFromProxyStorage(hre, data.contracts.Inbox.proxyAddress) - const newProxyAdmin = await getAdminFromProxyStorage(hre, args.nitrorollupproxy.proxyAddress) - if (proxyAdmin != newProxyAdmin) { - throw new Error( - 'Classic proxy admin ' + proxyAdmin + ' differs from nitro proxy admin ' + newProxyAdmin - ) - } + const NewRollupUser = (await hre.ethers.getContractAt('INitroRollupCore', args.nitrorollupproxy)) + .connect('0x1111111111111111111111111111111111111111'); + const replacingInbox = await NewRollupUser.inbox(); + + const oldProxyAdmin = await getAdminFromProxyStorage(hre, data.contracts.Inbox.proxyAddress) + const newProxyAdmin = await getAdminFromProxyStorage(hre, replacingInbox) + + const NewProxyAdmin = (await hre.ethers.getContractFactory('ProxyAdmin')) + .attach(newProxyAdmin) + .connect(hre.ethers.provider) + const owner = await NewProxyAdmin.owner(); const Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) .attach(args.migrator) - .connect(hre.ethers.provider) + .connect(hre.ethers.provider.getSigner(owner)) + const migratorOwner = await Migrator.owner() + if (migratorOwner != owner) { + throw new Error('Migrator has wrong owner. Expected ' + owner + ' but got ' + migratorOwner) + } + + const OldProxyAdmin = (await hre.ethers.getContractFactory('ProxyAdmin')) + .attach(oldProxyAdmin) + .connect(hre.ethers.provider.getSigner(owner)) + const OldRollup = (await hre.ethers.getContractFactory('RollupAdminFacet')) + .attach(data.contracts.Rollup.proxyAddress) + .connect(hre.ethers.provider.getSigner(owner)) + const NewRollup = (await hre.ethers.getContractFactory('RollupAdminFacet')) + .attach(args.nitrorollupproxy) + .connect(hre.ethers.provider.getSigner(owner)) + if (await OldProxyAdmin.owner() != Migrator.address) { + console.log('Transferring ownership of old proxy admin') + await (await OldProxyAdmin.transferOwnership(args.migrator)).wait() + } + if (await OldRollup.owner() != Migrator.address) { + console.log('Transferring ownership of classic rollup') + await (await OldRollup.setOwner(args.migrator)).wait() + } + if (await NewRollupUser.owner() != Migrator.address) { + console.log('Transferring ownership of nitro rollup') + await (await NewRollup.setOwner(args.migrator)).wait() + } + + console.log('Configuring deployment on nitro migrator') const initializeRes = await Migrator.configureDeployment( data.contracts.Inbox.proxyAddress, data.contracts.SequencerInbox.proxyAddress, @@ -175,8 +207,9 @@ task('configure-migration', 'configure nitro migrator contract') args.oldoutboxproxy, data.contracts.Outbox.proxyAddress, data.contracts.Rollup.proxyAddress, + oldProxyAdmin, args.nitrorollupproxy, - proxyAdmin, + newProxyAdmin, ) const initializeRec = await initializeRes.wait() console.log('Nitro migrator configured', initializeRec) From 9d8336c1a1559b2a43c21dcffeb5f7281996d2d4 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Fri, 8 Jul 2022 16:00:14 -0500 Subject: [PATCH 39/86] Add NonDelegatingProxy to take over classic bridge --- .../contracts/bridge/NitroMigrator.sol | 18 ++++++-- .../contracts/bridge/NonDelegatingProxy.sol | 43 +++++++++++++++++++ packages/arb-upgrades/ethBridgeTasks.ts | 21 ++++++++- 3 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 packages/arb-bridge-eth/contracts/bridge/NonDelegatingProxy.sol diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index dffc8cd527..ef482fd046 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -20,6 +20,7 @@ import "./Bridge.sol"; import "./Outbox.sol"; import "./Inbox.sol"; import "./SequencerInbox.sol"; +import "./NonDelegatingProxy.sol"; import "./Old_Outbox/OldOutbox.sol"; import "../rollup/facets/RollupAdmin.sol"; import "../rollup/RollupEventBridge.sol"; @@ -52,6 +53,7 @@ contract NitroMigrator is Ownable { Outbox public outboxV2; // assumed this contract is now the rollup admin RollupAdminFacet public rollup; + ProxyAdmin public classicProxyAdmin; INitroBridge.IBridge public nitroBridge; @@ -94,7 +96,7 @@ contract NitroMigrator is Ownable { OldOutbox _outboxV1, Outbox _outboxV2, RollupAdminFacet _rollup, - ProxyAdmin oldProxyAdmin, + ProxyAdmin _classicProxyAdmin, INitroRollup nitroRollup, ProxyAdmin newProxyAdmin ) external onlyOwner { @@ -107,6 +109,7 @@ contract NitroMigrator is Ownable { rollup = _rollup; outboxV1 = _outboxV1; outboxV2 = _outboxV2; + classicProxyAdmin = _classicProxyAdmin; nitroBridge = nitroRollup.bridge(); @@ -137,7 +140,7 @@ contract NitroMigrator is Ownable { address nitroInboxImpl = newProxyAdmin.getProxyImplementation( TransparentUpgradeableProxy(payable(address(oldNitroInbox))) ); - oldProxyAdmin.upgradeAndCall( + classicProxyAdmin.upgradeAndCall( TransparentUpgradeableProxy(payable(address(inbox))), nitroInboxImpl, abi.encodeWithSelector(INitroInbox.IInbox.postUpgradeInit.selector, nitroBridge) @@ -156,7 +159,9 @@ contract NitroMigrator is Ownable { // check that ownership of the bridge and rollup has been transferred require(rollup.owner() == address(this), "ROLLUP_OWNER_NOT_SET"); - require(bridge.owner() == address(this), "BRIDGE_OWNER_NOT_SET"); + if (bridge.owner() == address(rollup)) { + rollup.transferOwnership(Ownable(address(bridge)), address(this)); + } uint256 delayedMessageCount = inbox.shutdownForNitro(); @@ -228,6 +233,13 @@ contract NitroMigrator is Ownable { nitroBridge.setOutbox(address(outboxV1), true); nitroBridge.setOutbox(address(outboxV2), true); + // set the classic bridge to proxy view only calls to the nitro bridge + classicProxyAdmin.upgradeAndCall( + TransparentUpgradeableProxy(payable(address(bridge))), + address(new NonDelegatingProxy()), + abi.encodeWithSelector(NonDelegatingProxy.postUpgradeInit.selector, nitroBridge) + ); + latestCompleteStep = NitroMigrationSteps.Step3; } diff --git a/packages/arb-bridge-eth/contracts/bridge/NonDelegatingProxy.sol b/packages/arb-bridge-eth/contracts/bridge/NonDelegatingProxy.sol new file mode 100644 index 0000000000..95fb40892f --- /dev/null +++ b/packages/arb-bridge-eth/contracts/bridge/NonDelegatingProxy.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// Licensed under OpenZeppelin's license: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/8b778fa20d6d76340c5fac1ed66c80273f05b95a/LICENSE + +import "../libraries/ProxyUtil.sol"; + +pragma solidity ^0.6.11; + +contract NonDelegatingProxy { + address private proxyTarget; + + function postUpgradeInit(address newProxyTarget) external { + require(msg.sender == ProxyUtil.getProxyAdmin(), "NOT_PROXY_ADMIN"); + proxyTarget = newProxyTarget; + } + + fallback() external { + address target = proxyTarget; + // Taken from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/8b778fa20d6d76340c5fac1ed66c80273f05b95a/contracts/proxy/Proxy.sol + // Modified to use staticcall instead of delegatecall + assembly { + // Copy msg.data. We take full control of memory in this inline assembly + // block because it will not return to Solidity code. We overwrite the + // Solidity scratch pad at memory position 0. + calldatacopy(0, 0, calldatasize()) + + // Call the implementation. + // out and outsize are 0 because we don't know the size yet. + let result := staticcall(gas(), target, 0, calldatasize(), 0, 0) + + // Copy the returned data. + returndatacopy(0, 0, returndatasize()) + + switch result + // staticcall returns 0 on error. + case 0 { + revert(0, returndatasize()) + } + default { + return(0, returndatasize()) + } + } + } +} diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index 6951e0e7ed..3015ca1988 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -212,5 +212,24 @@ task('configure-migration', 'configure nitro migrator contract') newProxyAdmin, ) const initializeRec = await initializeRes.wait() - console.log('Nitro migrator configured', initializeRec) + console.log('Nitro migrator configured:', initializeRec) + }) + +task('migration-step-1', 'run migration step 1') + .addParam('migrator', '') + .addVariadicPositionalParam('sequenceraddresses') + + .setAction(async (args, hre) => { + const { getDeployments } = initUpgrades(hre, process.cwd()) + const { data } = await getDeployments() + + let Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) + .attach(args.migrator) + .connect(hre.ethers.provider) + const owner = await Migrator.owner() + Migrator = Migrator.connect(hre.ethers.provider.getSigner(owner)) + + console.log('Running migration stage 1') + const receipt = await (await Migrator.nitroStep1(args.sequenceraddresses)).wait() + console.log('Ran migration stage 1:', receipt) }) From d751b5097ac982786547e338d44c8cf67f5c1766 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Fri, 8 Jul 2022 19:29:43 -0500 Subject: [PATCH 40/86] Fix inbox upgrade timing and automate old outbox discovery --- .../contracts/bridge/NitroMigrator.sol | 38 +++++++++++-------- packages/arb-upgrades/ethBridgeTasks.ts | 6 +-- packages/arb-upgrades/types.ts | 1 + 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index ef482fd046..f1da9edcc2 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -55,7 +55,9 @@ contract NitroMigrator is Ownable { RollupAdminFacet public rollup; ProxyAdmin public classicProxyAdmin; + INitroRollup public nitroRollup; INitroBridge.IBridge public nitroBridge; + ProxyAdmin public nitroProxyAdmin; /// @dev The nitro migration includes various steps. /// @@ -97,8 +99,8 @@ contract NitroMigrator is Ownable { Outbox _outboxV2, RollupAdminFacet _rollup, ProxyAdmin _classicProxyAdmin, - INitroRollup nitroRollup, - ProxyAdmin newProxyAdmin + INitroRollup _nitroRollup, + ProxyAdmin _nitroProxyAdmin ) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Uninitialized, "WRONG_STEP"); @@ -111,7 +113,9 @@ contract NitroMigrator is Ownable { outboxV2 = _outboxV2; classicProxyAdmin = _classicProxyAdmin; + nitroRollup = _nitroRollup; nitroBridge = nitroRollup.bridge(); + nitroProxyAdmin = _nitroProxyAdmin; { // this contract is the rollup admin, and we want to check if the user facet is upgraded @@ -131,21 +135,9 @@ contract NitroMigrator is Ownable { // we check that the new contracts that will receive permissions are actually contracts require(Address.isContract(address(nitroBridge)), "NITRO_BRIDGE_NOT_CONTRACT"); - // Upgrade the classic inbox to the nitro inbox's impl, - // and configure nitro to use the classic inbox's address. - INitroInbox.IInbox oldNitroInbox = nitroRollup.inbox(); // The nitro deployment script already configured a delayed inbox, so we disable it here + INitroInbox.IInbox oldNitroInbox = nitroRollup.inbox(); nitroBridge.setDelayedInbox(address(oldNitroInbox), false); - // the nitro inbox is initialised to a paused state so users can't post txs - address nitroInboxImpl = newProxyAdmin.getProxyImplementation( - TransparentUpgradeableProxy(payable(address(oldNitroInbox))) - ); - classicProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy(payable(address(inbox))), - nitroInboxImpl, - abi.encodeWithSelector(INitroInbox.IInbox.postUpgradeInit.selector, nitroBridge) - ); - nitroRollup.setInbox(inbox); latestCompleteStep = NitroMigrationSteps.Step0; } @@ -159,7 +151,7 @@ contract NitroMigrator is Ownable { // check that ownership of the bridge and rollup has been transferred require(rollup.owner() == address(this), "ROLLUP_OWNER_NOT_SET"); - if (bridge.owner() == address(rollup)) { + if (bridge.owner() != address(this)) { rollup.transferOwnership(Ownable(address(bridge)), address(this)); } @@ -176,6 +168,20 @@ contract NitroMigrator is Ownable { // the rollup event bridge will still add messages to the Bridge's accumulator, but these will never be included into the sequencer inbox // it is not a problem that these messages will be lost, as long as classic shutdown and nitro boot are deterministic + // Upgrade the classic inbox to the nitro inbox's impl, + // and configure nitro to use the classic inbox's address. + // Right now the inbox isn't authorized on the nitro bridge, so users can't post txs. + INitroInbox.IInbox oldNitroInbox = nitroRollup.inbox(); + address nitroInboxImpl = nitroProxyAdmin.getProxyImplementation( + TransparentUpgradeableProxy(payable(address(oldNitroInbox))) + ); + classicProxyAdmin.upgradeAndCall( + TransparentUpgradeableProxy(payable(address(inbox))), + nitroInboxImpl, + abi.encodeWithSelector(INitroInbox.IInbox.postUpgradeInit.selector, nitroBridge) + ); + nitroRollup.setInbox(inbox); + bridge.setOutbox(address(this), true); { diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index 3015ca1988..8d65f0ef76 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -149,7 +149,6 @@ task('set-outbox', 'deploy and set a new outbox') task('configure-migration', 'configure nitro migrator contract') .addParam('migrator', '') - .addParam('oldoutboxproxy', '') .addParam('nitrorollupproxy', '') .setAction(async (args, hre) => { @@ -204,7 +203,7 @@ task('configure-migration', 'configure nitro migrator contract') data.contracts.SequencerInbox.proxyAddress, data.contracts.Bridge.proxyAddress, data.contracts.RollupEventBridge.proxyAddress, - args.oldoutboxproxy, + data.contracts.OldOutbox.proxyAddress, data.contracts.Outbox.proxyAddress, data.contracts.Rollup.proxyAddress, oldProxyAdmin, @@ -220,9 +219,6 @@ task('migration-step-1', 'run migration step 1') .addVariadicPositionalParam('sequenceraddresses') .setAction(async (args, hre) => { - const { getDeployments } = initUpgrades(hre, process.cwd()) - const { data } = await getDeployments() - let Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) .attach(args.migrator) .connect(hre.ethers.provider) diff --git a/packages/arb-upgrades/types.ts b/packages/arb-upgrades/types.ts index 7640ff3626..29d6c28c14 100644 --- a/packages/arb-upgrades/types.ts +++ b/packages/arb-upgrades/types.ts @@ -48,6 +48,7 @@ export enum ContractNames { Bridge = 'Bridge', SequencerInbox = 'SequencerInbox', Outbox = 'Outbox', + OldOutbox = 'OldOutbox', OutboxEntry = 'OutboxEntry', } From 01a6fbf8565482e6e5d5f1a2c61a55fc3e9c410c Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Fri, 8 Jul 2022 20:15:56 -0500 Subject: [PATCH 41/86] Add migration steps 2 and 3 to ethBridgeTasks --- packages/arb-upgrades/ethBridgeTasks.ts | 49 ++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index 8d65f0ef76..aa071927f8 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -225,7 +225,52 @@ task('migration-step-1', 'run migration step 1') const owner = await Migrator.owner() Migrator = Migrator.connect(hre.ethers.provider.getSigner(owner)) - console.log('Running migration stage 1') + console.log('Running migration step 1') const receipt = await (await Migrator.nitroStep1(args.sequenceraddresses)).wait() - console.log('Ran migration stage 1:', receipt) + console.log('Ran migration step 1:', receipt) + }) + +task('migration-step-2', 'run migration step 2') + .addParam('migrator', '') + .addOptionalParam('finalNodeNum') + .addFlag('destroyAlternatives') + .addFlag('destroyChallenges') + + .setAction(async (args, hre) => { + const { getDeployments } = initUpgrades(hre, process.cwd()) + const { data } = await getDeployments() + + let Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) + .attach(args.migrator) + .connect(hre.ethers.provider) + const owner = await Migrator.owner() + Migrator = Migrator.connect(hre.ethers.provider.getSigner(owner)) + + let finalNodeNum: any = parseInt(args.finalNodeNum) + if (!finalNodeNum) { + const Rollup = (await hre.ethers.getContractFactory('RollupUserFacet')) + .attach(data.contracts.Rollup.proxyAddress) + .connect(hre.ethers.provider) + finalNodeNum = await Rollup.latestNodeCreated(); + console.log('Resolved final node number', finalNodeNum) + } + + console.log('Running migration step 2') + const receipt = await (await Migrator.nitroStep2(finalNodeNum, args.destroyAlternatives, args.destroyChallenges)).wait() + console.log('Ran migration step 2:', receipt) + }) + +task('migration-step-3', 'run migration step 3') + .addParam('migrator', '') + + .setAction(async (args, hre) => { + let Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) + .attach(args.migrator) + .connect(hre.ethers.provider) + const owner = await Migrator.owner() + Migrator = Migrator.connect(hre.ethers.provider.getSigner(owner)) + + console.log('Running migration step 3') + const receipt = await (await Migrator.nitroStep3()).wait() + console.log('Ran migration step 3:', receipt) }) From 6391ef8107c431e6fd9059f3ef4feac697b4481c Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Sat, 9 Jul 2022 20:42:12 -0500 Subject: [PATCH 42/86] Fix ternary conditional in deadlineBlock for nitro shutdown --- packages/arb-bridge-eth/contracts/rollup/Node.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/rollup/Node.sol b/packages/arb-bridge-eth/contracts/rollup/Node.sol index c928daca50..526b0dcf8a 100644 --- a/packages/arb-bridge-eth/contracts/rollup/Node.sol +++ b/packages/arb-bridge-eth/contracts/rollup/Node.sol @@ -67,7 +67,7 @@ contract Node is Cloneable, INode { /// @dev nodes can be confirmed instantly after shutdownForNitroBlock function deadlineBlock() public view override returns (uint256) { uint256 shutdownForNitroBlock = Rollup(payable(rollup)).shutdownForNitroBlock(); - return shutdownForNitroBlock >= block.number ? shutdownForNitroBlock : deadlineBlock_; + return block.number >= shutdownForNitroBlock ? shutdownForNitroBlock : deadlineBlock_; } /** From 0fb0e152956549a0aae3e6be97e1eadd0310d7e1 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Sat, 9 Jul 2022 21:04:54 -0500 Subject: [PATCH 43/86] Add CLIs to transfer ownership of contracts owned by migrator --- packages/arb-upgrades/ethBridgeTasks.ts | 41 +++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index aa071927f8..d5bee21a89 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -214,7 +214,7 @@ task('configure-migration', 'configure nitro migrator contract') console.log('Nitro migrator configured:', initializeRec) }) -task('migration-step-1', 'run migration step 1') +task('migration-step-1', 'run nitro migration step 1') .addParam('migrator', '') .addVariadicPositionalParam('sequenceraddresses') @@ -230,7 +230,7 @@ task('migration-step-1', 'run migration step 1') console.log('Ran migration step 1:', receipt) }) -task('migration-step-2', 'run migration step 2') +task('migration-step-2', 'run nitro migration step 2') .addParam('migrator', '') .addOptionalParam('finalNodeNum') .addFlag('destroyAlternatives') @@ -260,7 +260,7 @@ task('migration-step-2', 'run migration step 2') console.log('Ran migration step 2:', receipt) }) -task('migration-step-3', 'run migration step 3') +task('migration-step-3', 'run nitro migration step 3') .addParam('migrator', '') .setAction(async (args, hre) => { @@ -274,3 +274,38 @@ task('migration-step-3', 'run migration step 3') const receipt = await (await Migrator.nitroStep3()).wait() console.log('Ran migration step 3:', receipt) }) + +task('migrator-transfer-child-ownership', 'transfer the ownership of a contract owned by the nitro migrator') + .addParam('migrator', '') + .addParam('child', '') + .addParam('newowner', '') + + .setAction(async (args, hre) => { + let Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) + .attach(args.migrator) + .connect(hre.ethers.provider) + const owner = await Migrator.owner() + Migrator = Migrator.connect(hre.ethers.provider.getSigner(owner)) + + const receipt = await (await Migrator.transferOtherContractOwnership(args.child, args.newowner)).wait() + console.log('Transferred ownership:', receipt) + }) + +task('migrator-transfer-rollup-ownership', 'transfer the ownership a rollup owned by the nitro migrator') + .addParam('migrator', '') + .addParam('rollup', '') + .addParam('newowner', '') + + .setAction(async (args, hre) => { + let Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) + .attach(args.migrator) + .connect(hre.ethers.provider) + const owner = await Migrator.owner() + Migrator = Migrator.connect(hre.ethers.provider.getSigner(owner)) + + const setOwnerData = (await hre.ethers.getContractFactory('RollupAdminFacet')) + .interface + .encodeFunctionData("setOwner", [args.newowner]); + const receipt = await (await Migrator.executeTransaction(setOwnerData, args.rollup, 0)).wait() + console.log('Transferred ownership:', receipt) + }) From 880086232e4519699c4635cf00364dd13431ed6d Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Sun, 10 Jul 2022 07:57:44 -0500 Subject: [PATCH 44/86] Disable force include when shutting down for nitro --- .../contracts/bridge/NitroMigrator.sol | 5 +-- .../contracts/bridge/SequencerInbox.sol | 37 ++++++++++--------- packages/arb-upgrades/ethBridgeTasks.ts | 3 +- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index f1da9edcc2..50f4a8e9c7 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -146,7 +146,7 @@ contract NitroMigrator is Ownable { /// this will create the final input in the inbox, but there won't be the final assertion available yet. /// it is assumed that at this point the sequencer has stopped receiving txs and has posted its final batch on-chain /// Before this step the ownership of the Rollup and Bridge must have been transferred to this contract - function nitroStep1(address[] calldata seqAddresses) external onlyOwner { + function nitroStep1() external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step0, "WRONG_STEP"); // check that ownership of the bridge and rollup has been transferred @@ -203,8 +203,7 @@ contract NitroMigrator is Ownable { // `nitroStep2` will only enforce inclusion of assertions that read up to this current point. sequencerInbox.shutdownForNitro( delayedMessageCount, - bridge.inboxAccs(delayedMessageCount - 1), - seqAddresses + bridge.inboxAccs(delayedMessageCount - 1) ); // this speeds up the process allowing validators to post assertions more frequently diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index 4dcd8448a1..a0f3309ea4 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -47,11 +47,19 @@ contract SequencerInbox is ISequencerInbox, Cloneable { address private deprecatedSequencer; address public rollup; mapping(address => bool) public override isSequencer; + bool public isShutdownForNitro; // Window in which only the Sequencer can update the Inbox; this delay is what allows the Sequencer to give receipts with sub-blocktime latency. uint256 public override maxDelayBlocks; uint256 public override maxDelaySeconds; + string internal constant SHUTDOWN_FOR_NITRO = "SHUTDOWN_FOR_NITRO"; + + modifier whenNotShutdownForNitro() { + require(!isShutdownForNitro, SHUTDOWN_FOR_NITRO); + _; + } + function initialize( IBridge _delayedInbox, address _sequencer, @@ -105,7 +113,7 @@ contract SequencerInbox is ISequencerInbox, Cloneable { address sender, bytes32 messageDataHash, bytes32 delayedAcc - ) external { + ) external whenNotShutdownForNitro { { bytes32 messageHash = Messages.messageHash( kind, @@ -137,9 +145,8 @@ contract SequencerInbox is ISequencerInbox, Cloneable { /// @dev this function is intended to force include the delayed inbox a final time in the nitro migration function shutdownForNitro( uint256 _totalDelayedMessagesRead, - bytes32 delayedAcc, - address[] calldata seqAddresses - ) external { + bytes32 delayedAcc + ) external whenNotShutdownForNitro { // no delay on force inclusion, triggered only by rollup's owner require(Rollup(payable(rollup)).owner() == msg.sender, "ONLY_ROLLUP_OWNER"); @@ -150,19 +157,13 @@ contract SequencerInbox is ISequencerInbox, Cloneable { forceInclusionImpl(_totalDelayedMessagesRead, delayedAcc); } - // the delayed inbox has all inboxes disabled, so state won't progress there. - // if there are no delayed inboxes and no sequencer addresses, the state can't progress anymore. - for (uint64 i = 0; i < seqAddresses.length; ++i) { - require(isSequencer[seqAddresses[i]], "UNKNOWN_SEQUENCER"); - isSequencer[seqAddresses[i]] = false; - } - deprecatedSequencer = address(0); + isShutdownForNitro = true; } - /// @dev allows anyone to disable sequencer addresses from the inbox in case the addresses provided in `shutdownForNitro` weren't exhaustive - function disableSequencer(address seqAddress) external { - require(deprecatedSequencer == address(0), "ONLY_AFTER_NITRO_SHUTDOWN"); - isSequencer[seqAddress] = false; + function undoShutdownForNitro() external { + require(Rollup(payable(rollup)).owner() == msg.sender, "ONLY_ROLLUP_OWNER"); + require(isShutdownForNitro, "NOT_SHUTDOWN"); + isShutdownForNitro = false; } function forceInclusionImpl(uint256 _totalDelayedMessagesRead, bytes32 delayedAcc) internal { @@ -199,7 +200,7 @@ contract SequencerInbox is ISequencerInbox, Cloneable { uint256[] calldata lengths, uint256[] calldata sectionsMetadata, bytes32 afterAcc - ) external { + ) external whenNotShutdownForNitro { // solhint-disable-next-line avoid-tx-origin require(msg.sender == tx.origin, "origin only"); uint256 startNum = messageCount; @@ -224,7 +225,7 @@ contract SequencerInbox is ISequencerInbox, Cloneable { uint256[] calldata sectionsMetadata, bytes32 afterAcc, IGasRefunder gasRefunder - ) external { + ) external whenNotShutdownForNitro { // solhint-disable-next-line avoid-tx-origin require(msg.sender == tx.origin, "origin only"); @@ -267,7 +268,7 @@ contract SequencerInbox is ISequencerInbox, Cloneable { uint256[] calldata lengths, uint256[] calldata sectionsMetadata, bytes32 afterAcc - ) external { + ) external whenNotShutdownForNitro { uint256 startNum = messageCount; bytes32 beforeAcc = addSequencerL2BatchImpl( transactions, diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index d5bee21a89..526e340745 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -216,7 +216,6 @@ task('configure-migration', 'configure nitro migrator contract') task('migration-step-1', 'run nitro migration step 1') .addParam('migrator', '') - .addVariadicPositionalParam('sequenceraddresses') .setAction(async (args, hre) => { let Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) @@ -226,7 +225,7 @@ task('migration-step-1', 'run nitro migration step 1') Migrator = Migrator.connect(hre.ethers.provider.getSigner(owner)) console.log('Running migration step 1') - const receipt = await (await Migrator.nitroStep1(args.sequenceraddresses)).wait() + const receipt = await (await Migrator.nitroStep1()).wait() console.log('Ran migration step 1:', receipt) }) From e9db8eba10db56953e552fd427bf722317934659 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Sun, 10 Jul 2022 08:32:07 -0500 Subject: [PATCH 45/86] Add NitroMigrator addArbosOwner shadow fork only function --- .../contracts/bridge/NitroMigrator.sol | 43 ++++++++++++++++--- packages/arb-upgrades/ethBridgeTasks.ts | 15 +++++++ 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 50f4a8e9c7..7e7fcefcc9 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -42,7 +42,11 @@ interface INitroRollup { function setInbox(IInbox newInbox) external; } -contract NitroMigrator is Ownable { +interface IArbOwner { + function addChainOwner(address newOwner) external; +} + +contract NitroMigrator is Ownable, IMessageProvider { uint8 internal constant L1MessageType_shutdownForNitro = 128; Inbox public inbox; @@ -270,11 +274,38 @@ contract NitroMigrator is Ownable { } } - function transferOtherContractOwnership(Ownable ownable, address newOwner) - external - payable - onlyOwner - { + function transferOtherContractOwnership(Ownable ownable, address newOwner) external onlyOwner { ownable.transferOwnership(newOwner); } + + uint8 internal constant L2_MSG = 3; + uint8 internal constant L2MessageType_unsignedContractTx = 1; + + function addArbosOwner(address newOwner) external onlyOwner { + require(latestCompleteStep != NitroMigrationSteps.Uninitialized, "UNINITIALIZED"); + uint256 chainId; + assembly { + chainId := chainid() + } + require(chainId > 100, "SHADOW_FORKS_ONLY"); + address bridgeOwner = bridge.owner(); + if (bridgeOwner != address(this)) { + rollup.transferOwnership(Ownable(address(bridge)), address(this)); + } + bridge.setInbox(address(this), true); + bytes memory msgData = abi.encodePacked( + L2MessageType_unsignedContractTx, + uint256(1000000), + uint256(2000000000), + uint256(0x6B), // ArbOwner + uint256(0), + abi.encodeWithSelector(IArbOwner.addChainOwner.selector, newOwner) + ); + uint256 seqNum = bridge.deliverMessageToInbox(L2_MSG, address(0), keccak256(msgData)); + emit InboxMessageDelivered(seqNum, msgData); + bridge.setInbox(address(this), false); + if (bridgeOwner != address(this)) { + bridge.transferOwnership(bridgeOwner); + } + } } diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index 526e340745..ab9a4b26e6 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -308,3 +308,18 @@ task('migrator-transfer-rollup-ownership', 'transfer the ownership a rollup owne const receipt = await (await Migrator.executeTransaction(setOwnerData, args.rollup, 0)).wait() console.log('Transferred ownership:', receipt) }) + +task('migrator-add-arbos-owner', 'adds an ArbOS chain owner via the nitro migrator') + .addParam('migrator', '') + .addParam('newowner', '') + + .setAction(async (args, hre) => { + let Migrator = (await hre.ethers.getContractFactory('NitroMigrator')) + .attach(args.migrator) + .connect(hre.ethers.provider) + const owner = await Migrator.owner() + Migrator = Migrator.connect(hre.ethers.provider.getSigner(owner)) + + const receipt = await (await Migrator.addArbosOwner(args.newowner)).wait() + console.log('Added owner:', receipt) + }) From 753e5f55346a628eaf44f48c6f0313e77983a5ae Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Sun, 10 Jul 2022 14:17:38 -0500 Subject: [PATCH 46/86] Fix sequencer inbox storage layout --- packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index a0f3309ea4..d24d8faf0c 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -47,12 +47,13 @@ contract SequencerInbox is ISequencerInbox, Cloneable { address private deprecatedSequencer; address public rollup; mapping(address => bool) public override isSequencer; - bool public isShutdownForNitro; // Window in which only the Sequencer can update the Inbox; this delay is what allows the Sequencer to give receipts with sub-blocktime latency. uint256 public override maxDelayBlocks; uint256 public override maxDelaySeconds; + bool public isShutdownForNitro; + string internal constant SHUTDOWN_FOR_NITRO = "SHUTDOWN_FOR_NITRO"; modifier whenNotShutdownForNitro() { From 397ed835eb461e4f1b16599bb210382d5b2640a8 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Sun, 10 Jul 2022 21:18:18 -0500 Subject: [PATCH 47/86] Allow removeOldZombies in shutdownForNitroMode --- .../arb-bridge-eth/contracts/rollup/facets/RollupUser.sol | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index 5cf8cdcd77..430546083c 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -414,7 +414,11 @@ abstract contract AbsRollupUserFacet is RollupBase, IRollupUser { * @notice Remove any zombies whose latest stake is earlier than the first unresolved node * @param startIndex Index in the zombie list to start removing zombies from (to limit the cost of this transaction) */ - function removeOldZombies(uint256 startIndex) public onlyValidator whenNotPaused { + function removeOldZombies(uint256 startIndex) + public + onlyValidator + whenInShutdownModeOrNotPaused + { uint256 currentZombieCount = zombieCount(); uint256 firstUnresolved = firstUnresolvedNode(); for (uint256 i = startIndex; i < currentZombieCount; i++) { From 559893bba43eeb2f0ad7894379c22168819859dc Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Sun, 10 Jul 2022 21:25:18 -0500 Subject: [PATCH 48/86] Move disabling the rollup event bridge to step 3 --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 7e7fcefcc9..a3c2385687 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -225,7 +225,6 @@ contract NitroMigrator is Ownable, IMessageProvider { ) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step1, "WRONG_STEP"); rollup.shutdownForNitro(finalNodeNum, destroyAlternatives, destroyChallenges); - bridge.setInbox(address(rollupEventBridge), false); latestCompleteStep = NitroMigrationSteps.Step2; } @@ -236,6 +235,7 @@ contract NitroMigrator is Ownable, IMessageProvider { rollup.latestConfirmed() == rollup.latestNodeCreated(), "ROLLUP_SHUTDOWN_NOT_COMPLETE" ); + bridge.setInbox(address(rollupEventBridge), false); // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); From 018489a190c8f6c3ddf41337f2e11f2009b2bf5d Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Mon, 11 Jul 2022 12:33:11 -0500 Subject: [PATCH 49/86] Selectively forward calls for classic bridge --- .../contracts/bridge/Bridge.sol | 30 +++++++++++-- .../contracts/bridge/NitroMigrator.sol | 44 ++++++++----------- .../contracts/bridge/NonDelegatingProxy.sol | 43 ------------------ .../contracts/bridge/interfaces/IBridge.sol | 2 + 4 files changed, 47 insertions(+), 72 deletions(-) delete mode 100644 packages/arb-bridge-eth/contracts/bridge/NonDelegatingProxy.sol diff --git a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol index bb2b41ad1c..fddd7be71e 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol @@ -38,11 +38,15 @@ contract Bridge is OwnableUpgradeable, IBridge { address[] public allowedInboxList; address[] public allowedOutboxList; - address public override activeOutbox; + address internal localActiveOutbox; // Accumulator for delayed inbox; tail represents hash of the current state; each element represents the inclusion of a new message. bytes32[] public override inboxAccs; + // Set during the nitro transition to the nitro bridge. + // `activeOutbox` will be forwarded to this bridge if set. + IBridge public replacementBridge; + function initialize() external initializer { __Ownable_init(); } @@ -52,6 +56,9 @@ contract Bridge is OwnableUpgradeable, IBridge { } function allowedOutboxes(address outbox) external view override returns (bool) { + if (replacementBridge != address(0)) { + return replacementBridge.allowedOutboxes(outbox); + } return allowedOutboxesMap[outbox].allowed; } @@ -105,12 +112,15 @@ contract Bridge is OwnableUpgradeable, IBridge { bytes calldata data ) external override returns (bool success, bytes memory returnData) { require(allowedOutboxesMap[msg.sender].allowed, "NOT_FROM_OUTBOX"); + if (replacementBridge != address(0)) { + return replacementBridge.executeCall(destAddr, amount, data); + } if (data.length > 0) require(destAddr.isContract(), "NO_CODE_AT_DEST"); - address currentOutbox = activeOutbox; - activeOutbox = msg.sender; + address currentOutbox = localActiveOutbox; + localActiveOutbox = msg.sender; // We set and reset active outbox around external call so activeOutbox remains valid during call (success, returnData) = destAddr.call{ value: amount }(data); - activeOutbox = currentOutbox; + localActiveOutbox = currentOutbox; emit BridgeCallTriggered(msg.sender, destAddr, amount, data); } @@ -153,4 +163,16 @@ contract Bridge is OwnableUpgradeable, IBridge { function messageCount() external view override returns (uint256) { return inboxAccs.length; } + + function activeOutbox() external view override returns (address) { + if (replacementBridge == address(0)) { + return localActiveOutbox; + } else { + return replacementBridge.activeOutbox(); + } + } + + function setReplacementBridge(address newReplacementBridge) external override onlyOwner { + replacementBridge = newReplacementBridge; + } } diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index a3c2385687..39351372ac 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -165,8 +165,6 @@ contract NitroMigrator is Ownable, IMessageProvider { // the rollup event bridge will update the delayed accumulator after the final rollup shutdown events, but this // shouldn't be an issue bridge.setInbox(address(inbox), false); - bridge.setOutbox(address(outboxV1), false); - bridge.setOutbox(address(outboxV2), false); // we disable the rollupEventBridge later since its needed in order to create/confirm assertions // the rollup event bridge will still add messages to the Bridge's accumulator, but these will never be included into the sequencer inbox @@ -186,21 +184,6 @@ contract NitroMigrator is Ownable, IMessageProvider { ); nitroRollup.setInbox(inbox); - bridge.setOutbox(address(this), true); - - { - uint256 bal = address(bridge).balance; - // TODO: import nitro contracts and use interface - (bool success, ) = bridge.executeCall( - address(nitroBridge), - bal, - abi.encodeWithSelector(INitroBridge.IBridge.acceptFundsFromOldBridge.selector) - ); - require(success, "ESCROW_TRANSFER_FAIL"); - } - - bridge.setOutbox(address(this), false); - // if the sequencer posted its final batch and was shutdown before `nitroStep1` there shouldn't be any reorgs // even though we remove the seqAddr from the sequencer inbox with `shutdownForNitro` this wouldnt stop a reorg from // the sequencer accepting txs in the RPC interface without posting a batch. @@ -237,17 +220,28 @@ contract NitroMigrator is Ownable, IMessageProvider { ); bridge.setInbox(address(rollupEventBridge), false); + // Move the classic bridge funds to the nitro bridge + bridge.setOutbox(address(this), true); + { + uint256 bal = address(bridge).balance; + // TODO: import nitro contracts and use interface + (bool success, ) = bridge.executeCall( + address(nitroBridge), + bal, + abi.encodeWithSelector(INitroBridge.IBridge.acceptFundsFromOldBridge.selector) + ); + require(success, "ESCROW_TRANSFER_FAIL"); + } + bridge.setOutbox(address(this), false); + + // the bridge will proxy executeCall calls from the classic outboxes + nitroBridge.setOutbox(address(bridge), true); + bridge.setReplacementBridge(nitroBridge); + // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); - nitroBridge.setOutbox(address(outboxV1), true); - nitroBridge.setOutbox(address(outboxV2), true); - // set the classic bridge to proxy view only calls to the nitro bridge - classicProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy(payable(address(bridge))), - address(new NonDelegatingProxy()), - abi.encodeWithSelector(NonDelegatingProxy.postUpgradeInit.selector, nitroBridge) - ); + // TODO: set the genesis block hash of the nitro rollup latestCompleteStep = NitroMigrationSteps.Step3; } diff --git a/packages/arb-bridge-eth/contracts/bridge/NonDelegatingProxy.sol b/packages/arb-bridge-eth/contracts/bridge/NonDelegatingProxy.sol deleted file mode 100644 index 95fb40892f..0000000000 --- a/packages/arb-bridge-eth/contracts/bridge/NonDelegatingProxy.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -// Licensed under OpenZeppelin's license: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/8b778fa20d6d76340c5fac1ed66c80273f05b95a/LICENSE - -import "../libraries/ProxyUtil.sol"; - -pragma solidity ^0.6.11; - -contract NonDelegatingProxy { - address private proxyTarget; - - function postUpgradeInit(address newProxyTarget) external { - require(msg.sender == ProxyUtil.getProxyAdmin(), "NOT_PROXY_ADMIN"); - proxyTarget = newProxyTarget; - } - - fallback() external { - address target = proxyTarget; - // Taken from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/8b778fa20d6d76340c5fac1ed66c80273f05b95a/contracts/proxy/Proxy.sol - // Modified to use staticcall instead of delegatecall - assembly { - // Copy msg.data. We take full control of memory in this inline assembly - // block because it will not return to Solidity code. We overwrite the - // Solidity scratch pad at memory position 0. - calldatacopy(0, 0, calldatasize()) - - // Call the implementation. - // out and outsize are 0 because we don't know the size yet. - let result := staticcall(gas(), target, 0, calldatasize(), 0, 0) - - // Copy the returned data. - returndatacopy(0, 0, returndatasize()) - - switch result - // staticcall returns 0 on error. - case 0 { - revert(0, returndatasize()) - } - default { - return(0, returndatasize()) - } - } - } -} diff --git a/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol b/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol index 86d15831c7..7791ce206f 100644 --- a/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol @@ -56,6 +56,8 @@ interface IBridge { function setOutbox(address inbox, bool enabled) external; + function setReplacementBridge(address newReplacementBridge) external; + // View functions function activeOutbox() external view returns (address); From ed395fd27610f68d9c79bdc7a23abc5d738ddbb8 Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Thu, 14 Jul 2022 10:49:12 +0200 Subject: [PATCH 50/86] Updated nitro migration manager --- .../contracts/bridge/Bridge.sol | 8 +- .../contracts/bridge/NitroMigrator.sol | 21 +- .../contracts/test_only/BridgeMock.sol | 2 +- .../arb-bridge-eth/test/nitro-upgrade.fork.ts | 336 ++--------- .../test/nitroMigrationManager.ts | 545 ++++++++++++------ packages/arb-upgrades/ethBridgeTasks.ts | 2 +- 6 files changed, 435 insertions(+), 479 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol index fddd7be71e..a655a48faf 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol @@ -56,7 +56,7 @@ contract Bridge is OwnableUpgradeable, IBridge { } function allowedOutboxes(address outbox) external view override returns (bool) { - if (replacementBridge != address(0)) { + if (address(replacementBridge) != address(0)) { return replacementBridge.allowedOutboxes(outbox); } return allowedOutboxesMap[outbox].allowed; @@ -112,7 +112,7 @@ contract Bridge is OwnableUpgradeable, IBridge { bytes calldata data ) external override returns (bool success, bytes memory returnData) { require(allowedOutboxesMap[msg.sender].allowed, "NOT_FROM_OUTBOX"); - if (replacementBridge != address(0)) { + if (address(replacementBridge) != address(0)) { return replacementBridge.executeCall(destAddr, amount, data); } if (data.length > 0) require(destAddr.isContract(), "NO_CODE_AT_DEST"); @@ -165,7 +165,7 @@ contract Bridge is OwnableUpgradeable, IBridge { } function activeOutbox() external view override returns (address) { - if (replacementBridge == address(0)) { + if (address(replacementBridge) == address(0)) { return localActiveOutbox; } else { return replacementBridge.activeOutbox(); @@ -173,6 +173,6 @@ contract Bridge is OwnableUpgradeable, IBridge { } function setReplacementBridge(address newReplacementBridge) external override onlyOwner { - replacementBridge = newReplacementBridge; + replacementBridge = IBridge(newReplacementBridge); } } diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 39351372ac..35df68b4a7 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -20,7 +20,6 @@ import "./Bridge.sol"; import "./Outbox.sol"; import "./Inbox.sol"; import "./SequencerInbox.sol"; -import "./NonDelegatingProxy.sol"; import "./Old_Outbox/OldOutbox.sol"; import "../rollup/facets/RollupAdmin.sol"; import "../rollup/RollupEventBridge.sol"; @@ -40,6 +39,8 @@ interface INitroRollup { function inbox() external view returns (INitroInbox.IInbox); function setInbox(IInbox newInbox) external; + + function setOwner(address newOwner) external; } interface IArbOwner { @@ -132,7 +133,7 @@ contract NitroMigrator is Ownable, IMessageProvider { } // this returns a different magic value so we can differentiate the user and admin facets require(_rollup.isNitroReady() == uint8(0xa4b2), "ADMIN_ROLLUP_NOT_NITRO_READY"); - + require(_inbox.isNitroReady() == uint8(0xa4b1), "INBOX_NOT_UPGRADED"); require(_sequencerInbox.isNitroReady() == uint8(0xa4b1), "SEQINBOX_NOT_UPGRADED"); @@ -211,20 +212,21 @@ contract NitroMigrator is Ownable, IMessageProvider { latestCompleteStep = NitroMigrationSteps.Step2; } - function nitroStep3() external onlyOwner { + // CHRIS: TODO: remove skipCheck + function nitroStep3(bool skipCheck) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step2, "WRONG_STEP"); // CHRIS: TODO: destroying the node in the previous steps does not reset latestConfirmed/latestNodeCreated require( - rollup.latestConfirmed() == rollup.latestNodeCreated(), + skipCheck || rollup.latestConfirmed() == rollup.latestNodeCreated(), "ROLLUP_SHUTDOWN_NOT_COMPLETE" ); + bridge.setInbox(address(rollupEventBridge), false); // Move the classic bridge funds to the nitro bridge bridge.setOutbox(address(this), true); { uint256 bal = address(bridge).balance; - // TODO: import nitro contracts and use interface (bool success, ) = bridge.executeCall( address(nitroBridge), bal, @@ -236,13 +238,20 @@ contract NitroMigrator is Ownable, IMessageProvider { // the bridge will proxy executeCall calls from the classic outboxes nitroBridge.setOutbox(address(bridge), true); - bridge.setReplacementBridge(nitroBridge); + bridge.setReplacementBridge(address(nitroBridge)); // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); // TODO: set the genesis block hash of the nitro rollup + // the migration is complete, relinquish ownership back to the + // nitro proxy admin owner + address nitroProxyAdminOwner = nitroProxyAdmin.owner(); + rollup.setOwner(nitroProxyAdminOwner); + classicProxyAdmin.transferOwnership(nitroProxyAdminOwner); + nitroRollup.setOwner(address(nitroProxyAdmin)); + latestCompleteStep = NitroMigrationSteps.Step3; } diff --git a/packages/arb-bridge-eth/contracts/test_only/BridgeMock.sol b/packages/arb-bridge-eth/contracts/test_only/BridgeMock.sol index a7ef9d956d..1d96a85d39 100644 --- a/packages/arb-bridge-eth/contracts/test_only/BridgeMock.sol +++ b/packages/arb-bridge-eth/contracts/test_only/BridgeMock.sol @@ -22,7 +22,7 @@ import "../bridge/Bridge.sol"; contract BridgeMock is Bridge { constructor() public { - activeOutbox = msg.sender; + localActiveOutbox = msg.sender; } function deliverMessageToInboxTest( diff --git a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts index 147c4b42fe..97a18fe677 100644 --- a/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts +++ b/packages/arb-bridge-eth/test/nitro-upgrade.fork.ts @@ -1,31 +1,9 @@ import { ethers, network } from 'hardhat' -import { expect, assert } from 'chai' import { CurrentDeployments } from 'arb-upgrades/types' -import { readFileSync, readdirSync } from 'fs' -import { - Bridge, - NitroMigrator__factory, - ProxyAdmin, - RollupAdminFacet__factory, -} from '../build/types' -import { BigNumber, constants, Signer } from 'ethers' +import { readFileSync } from 'fs' +import { constants, Wallet } from 'ethers' import { Provider } from '@ethersproject/providers' -import { Inbox__factory as NitroInbox__factory } from '../build/types/nitro/factories/Inbox__factory' -import { BridgeCreator__factory as NitroBridgeCreator__factory } from '../build/types/nitro/factories/BridgeCreator__factory' -import { Bridge__factory as NitroBridge__factory } from '../build/types/nitro/factories/Bridge__factory' -import { RollupCreator__factory as NitroRollupCreator__factory } from '../build/types/nitro/factories/RollupCreator__factory' -import { RollupCreatedEvent } from '../build/types/nitro/RollupCreator' -import { OneStepProver0__factory as NitroOneStepProver0__factory } from '../build/types/nitro/factories/OneStepProver0__factory' -import { OneStepProverMemory__factory as NitroOneStepProverMemory__factory } from '../build/types/nitro/factories/OneStepProverMemory__factory' -import { OneStepProverMath__factory as NitroOneStepProverMath__factory } from '../build/types/nitro/factories/OneStepProverMath__factory' -import { OneStepProverHostIo__factory as NitroOneStepProverHostIo__factory } from '../build/types/nitro/factories/OneStepProverHostIo__factory' -import { OneStepProofEntry__factory as NitroOneStepProofEntry__factory } from '../build/types/nitro/factories/OneStepProofEntry__factory' -import { ChallengeManager__factory as NitroChallengeManager__factory } from '../build/types/nitro/factories/ChallengeManager__factory' -import { RollupAdminLogic__factory as NitroRollupAdminLogic__factory } from '../build/types/nitro/factories/RollupAdminLogic__factory' -import { RollupUserLogic__factory as NitroRollupUserLogic__factory } from '../build/types/nitro/factories/RollupUserLogic__factory' -import { defaultAbiCoder, Interface } from '@ethersproject/abi' import { NitroMigrationManager } from './nitroMigrationManager' -import { arrayify } from '@ethersproject/bytes' describe('Nitro upgrade', () => { const getDeployments = async (provider: Provider) => { @@ -33,7 +11,19 @@ describe('Nitro upgrade', () => { const deploymentData = readFileSync( `./_deployments/${chainId}_current_deployment.json` ) - return JSON.parse(deploymentData.toString()) as CurrentDeployments + const deployments = JSON.parse( + deploymentData.toString() + ) as CurrentDeployments + + return deployments.contracts.Outbox + ? deployments + : { + ...deployments, + contracts: { + ...deployments.contracts, + Outbox: deployments.contracts.OldOutbox, + }, + } } const getProxyAdminSigner = async (proxyAdminAddr: string) => { @@ -54,246 +44,49 @@ describe('Nitro upgrade', () => { return await ethers.provider.getSigner(owner) } - it('deploy fails if classic contracts havent been upgraded', async () => { - try { - const deployments = await getDeployments(ethers.provider) - const proxyAdminSigner = await getProxyAdminSigner( - deployments.proxyAdminAddress - ) - - const migrationManager = new NitroMigrationManager(proxyAdminSigner, { - proxyAdminAddr: deployments.proxyAdminAddress, - inboxAddr: deployments.contracts.Inbox.proxyAddress, - rollupAddr: deployments.contracts.Rollup.proxyAddress, - sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, - bridgeAddr: deployments.contracts.Bridge.proxyAddress, - outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, - outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, - rollupEventBridgeAddr: - deployments.contracts.RollupEventBridge.proxyAddress, - }) - - await migrationManager.deployMigrator({ - bridgeAddr: constants.AddressZero, - inboxTemplateAddr: constants.AddressZero, - outboxAddr: constants.AddressZero, - sequencerInboxAddr: constants.AddressZero, - }) - - assert.fail('Expected constructor to fail') - } catch {} - }) - - it('deploy fails if nitro contracts havent been deployed', async () => { - try { - const provider = ethers.provider - const deployments = await getDeployments(provider) - const proxyAdminSigner = await getProxyAdminSigner( - deployments.proxyAdminAddress - ) - - const migrationManager = new NitroMigrationManager(proxyAdminSigner, { - proxyAdminAddr: deployments.proxyAdminAddress, - inboxAddr: deployments.contracts.Inbox.proxyAddress, - rollupAddr: deployments.contracts.Rollup.proxyAddress, - sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, - bridgeAddr: deployments.contracts.Bridge.proxyAddress, - outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, - outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, - rollupEventBridgeAddr: - deployments.contracts.RollupEventBridge.proxyAddress, - }) - - await migrationManager.upgradeClassicContracts() - await migrationManager.deployMigrator({ - bridgeAddr: constants.AddressZero, - inboxTemplateAddr: constants.AddressZero, - outboxAddr: constants.AddressZero, - sequencerInboxAddr: constants.AddressZero, - }) - assert.fail('Expected deploy to fail') - } catch {} - }) - - it('step 1 fails if ownership not transferred', async () => { - try { - const provider = ethers.provider - const deployments = await getDeployments(provider) - const proxyAdminSigner = await getProxyAdminSigner( - deployments.proxyAdminAddress - ) - - const migrationManager = new NitroMigrationManager(proxyAdminSigner, { - proxyAdminAddr: deployments.proxyAdminAddress, - inboxAddr: deployments.contracts.Inbox.proxyAddress, - rollupAddr: deployments.contracts.Rollup.proxyAddress, - sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, - bridgeAddr: deployments.contracts.Bridge.proxyAddress, - outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, - outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, - rollupEventBridgeAddr: - deployments.contracts.RollupEventBridge.proxyAddress, - }) - - await migrationManager.upgradeClassicContracts() - - const rollupFac = await ethers.getContractFactory('Rollup') - const prevRollup = await rollupFac.attach( - deployments.contracts.Rollup.proxyAddress - ) - const wasmModuleRoot = - '0x9900000000000000000000000000000000000000000000000000000000000010' - const loserStakeEscrow = constants.AddressZero - const nitroContracts = await migrationManager.deployNitroContracts({ - confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), - extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), - stakeToken: await prevRollup.stakeToken(), - baseStake: await prevRollup.baseStake(), - wasmModuleRoot: wasmModuleRoot, - // CHRIS: TODO: decide who the owner should be - // CHRIS: TODO: shouldnt it be someone different to the proxy admin? - owner: await prevRollup.owner(), - chainId: (await provider.getNetwork()).chainId, - loserStakeEscrow: loserStakeEscrow, - sequencerInboxMaxTimeVariation: { - // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess - // CHRIS: TODO: make sure these are all the values we want - delayBlocks: (60 * 60 * 24) / 15, - futureBlocks: 12, - delaySeconds: 60 * 60 * 24, - futureSeconds: 60 * 60, - }, - }) - - await migrationManager.deployMigrator({ - bridgeAddr: nitroContracts.bridge, - inboxTemplateAddr: nitroContracts.inboxTemplate, - outboxAddr: nitroContracts.outbox, - sequencerInboxAddr: nitroContracts.sequencerInbox, - }) - - const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' - await migrationManager.step1([mainnetSequencer], { - bridgeAddr: nitroContracts.bridge, - rollupAddr: nitroContracts.rollup, - }) + const getNewFundedSigner = async () => { + const wallet = Wallet.createRandom().connect(ethers.provider) + await network.provider.send('hardhat_setBalance', [ + wallet.address, + '0x16189AD417E380000', + ]) + return wallet + } - assert.fail('Expected step 1 to fail') - } catch {} + const deploymentsToClassicConfig = (deployments: CurrentDeployments) => ({ + proxyAdminAddr: deployments.proxyAdminAddress, + inboxAddr: deployments.contracts.Inbox.proxyAddress, + rollupAddr: deployments.contracts.Rollup.proxyAddress, + sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, + bridgeAddr: deployments.contracts.Bridge.proxyAddress, + outboxV1: deployments.contracts.OldOutbox.proxyAddress, + outboxV2: deployments.contracts.Outbox.proxyAddress, + rollupEventBridgeAddr: deployments.contracts.RollupEventBridge.proxyAddress, }) - it('upgrade and construct', async () => { + const getNitroConfig = async (rollupAddr: string) => { const provider = ethers.provider - const deployments = await getDeployments(provider) - const proxyAdminSigner = await getProxyAdminSigner( - deployments.proxyAdminAddress - ) - - // CHRIS: TODO: should it be possible to reverse each of the steps? or is that going too far? - - // CHRIS: TODO: don't we need to create a new 'deployments' file? - // CHRIS: TODO: shouldnt the bridge be upgraded? no, we're doing a fresh one - - const migrationManager = new NitroMigrationManager(proxyAdminSigner, { - proxyAdminAddr: deployments.proxyAdminAddress, - inboxAddr: deployments.contracts.Inbox.proxyAddress, - rollupAddr: deployments.contracts.Rollup.proxyAddress, - sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, - bridgeAddr: deployments.contracts.Bridge.proxyAddress, - outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, - outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, - rollupEventBridgeAddr: - deployments.contracts.RollupEventBridge.proxyAddress, - }) - const rollupFac = await ethers.getContractFactory('Rollup') - // lookup params from previous rollup? - // CHRIS: TODO: why do we have a param in the constructor? how is this rollup logic supposed to be deployed? - const prevRollup = await rollupFac.attach( - deployments.contracts.Rollup.proxyAddress - ) + const prevRollup = await rollupFac.attach(rollupAddr) const wasmModuleRoot = '0x9900000000000000000000000000000000000000000000000000000000000010' const loserStakeEscrow = constants.AddressZero - - const nitroContracts = await migrationManager.deployNitroContracts({ + return { confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), stakeToken: await prevRollup.stakeToken(), baseStake: await prevRollup.baseStake(), wasmModuleRoot: wasmModuleRoot, - // CHRIS: TODO: decide who the owner should be - // CHRIS: TODO: shouldnt it be someone different to the proxy admin? - owner: await prevRollup.owner(), chainId: (await provider.getNetwork()).chainId, loserStakeEscrow: loserStakeEscrow, sequencerInboxMaxTimeVariation: { - // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess - // CHRIS: TODO: make sure these are all the values we want delayBlocks: (60 * 60 * 24) / 15, futureBlocks: 12, delaySeconds: 60 * 60 * 24, futureSeconds: 60 * 60, }, - }) - await migrationManager.upgradeClassicContracts() - - await migrationManager.deployMigrator({ - // CHRIS: TODO: we could do more in terms of checks - // CHRIS: TODO: we could do a check that all the contracts we care about have been correctly deployed with the correct admins - // CHRIS: TODO: we could also check that the contracts below have expected functions on them? - bridgeAddr: nitroContracts.bridge, - inboxTemplateAddr: nitroContracts.inboxTemplate, - outboxAddr: nitroContracts.outbox, - sequencerInboxAddr: nitroContracts.sequencerInbox, - }) - - await migrationManager.step0point5() - - - // CHRIS: TODO: get the correct address here, dont hard code? - const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' - await migrationManager.step1([mainnetSequencer], { - rollupAddr: nitroContracts.rollup, - bridgeAddr: nitroContracts.bridge, - }) - - - // // step 2 - // // this would normally be the latest created node - // // but we need to confirm all the nodes to ensure that - // // CHRIS: TODO: use the admin to force confirm the nodes between - // // latest created and latest confirmed - const classicRollupAdminFac = new RollupAdminFacet__factory( - proxyAdminSigner - ) - const rollupAdmin = classicRollupAdminFac.attach(prevRollup.address) - // const latestCreated = await rollupAdmin.latestNodeCreated() - const latestConfirmed = await rollupAdmin.latestConfirmed() - // console.log( - // 'confirmed count', - // latestConfirmed.toNumber(), - // latestCreated.toNumber() - // ) - // const stakerCount = await rollupAdmin.stakerCount() - // console.log('staker count', stakerCount.toNumber()) - - await migrationManager.step2(latestConfirmed, true, true) - - // const res = await (await nitroMigrator.nitroStep2(latestConfirmed, { gasLimit: 3000000})).wait() - // console.log(res.gasUsed.toString()) - // console.log(res.logs) - // console.log(Date.now() - beforeB) - - // console.log('step 2 complete') - - // // step 3 - await migrationManager.step3() - - // console.log('step 3 complete') - - //////// CHRIS /////// PUT BACK IN - }) + } + } it.only('run succeeds', async () => { const provider = ethers.provider @@ -301,50 +94,23 @@ describe('Nitro upgrade', () => { const proxyAdminSigner = await getProxyAdminSigner( deployments.proxyAdminAddress ) - const migrationManager = new NitroMigrationManager(proxyAdminSigner, { - proxyAdminAddr: deployments.proxyAdminAddress, - inboxAddr: deployments.contracts.Inbox.proxyAddress, - rollupAddr: deployments.contracts.Rollup.proxyAddress, - sequencerInboxAddr: deployments.contracts.SequencerInbox.proxyAddress, - bridgeAddr: deployments.contracts.Bridge.proxyAddress, - outboxV1: (deployments.contracts as any)['OldOutbox'].proxyAddress, - outboxV2: (deployments.contracts as any)['OldOutbox'].proxyAddress, // CHRIS: TODO: v2 here?, - rollupEventBridgeAddr: - deployments.contracts.RollupEventBridge.proxyAddress, - }) - - const rollupFac = await ethers.getContractFactory('Rollup') - // lookup params from previous rollup? - // CHRIS: TODO: why do we have a param in the constructor? how is this rollup logic supposed to be deployed? - const prevRollup = await rollupFac.attach( + const nitroDeployer = await getNewFundedSigner() + const classicConfig = deploymentsToClassicConfig(deployments) + const nitroConfig = await getNitroConfig( deployments.contracts.Rollup.proxyAddress ) - const wasmModuleRoot = - '0x9900000000000000000000000000000000000000000000000000000000000010' - const loserStakeEscrow = constants.AddressZero - const mainnetSequencer = '0xa4b10ac61E79Ea1e150DF70B8dda53391928fD14' + + const migrationManager = await NitroMigrationManager.deploy( + nitroDeployer, + true, + true + ) + await migrationManager.run( - [mainnetSequencer], - { - confirmPeriodBlocks: await prevRollup.confirmPeriodBlocks(), - extraChallengeTimeBlocks: await prevRollup.extraChallengeTimeBlocks(), - stakeToken: await prevRollup.stakeToken(), - baseStake: await prevRollup.baseStake(), - wasmModuleRoot: wasmModuleRoot, - // CHRIS: TODO: decide who the owner should be - // CHRIS: TODO: shouldnt it be someone different to the proxy admin? - owner: await prevRollup.owner(), - chainId: (await provider.getNetwork()).chainId, - loserStakeEscrow: loserStakeEscrow, - sequencerInboxMaxTimeVariation: { - // CHRIS: TODO: should we change this to the exact POS seconds? probably not yet, we can update it later i guess - // CHRIS: TODO: make sure these are all the values we want - delayBlocks: (60 * 60 * 24) / 15, - futureBlocks: 12, - delaySeconds: 60 * 60 * 24, - futureSeconds: 60 * 60, - }, - }, + nitroDeployer, + proxyAdminSigner, + nitroConfig, + classicConfig, true, true ) diff --git a/packages/arb-bridge-eth/test/nitroMigrationManager.ts b/packages/arb-bridge-eth/test/nitroMigrationManager.ts index 9fa89f6577..5a52d1d316 100644 --- a/packages/arb-bridge-eth/test/nitroMigrationManager.ts +++ b/packages/arb-bridge-eth/test/nitroMigrationManager.ts @@ -1,6 +1,5 @@ import { RollupCreatedEvent } from '../build/types/nitro/RollupCreator' import { BridgeCreator__factory as NitroBridgeCreator__factory } from '../build/types/nitro/factories/BridgeCreator__factory' -import { Bridge__factory as NitroBridge__factory } from '../build/types/nitro/factories/Bridge__factory' import { RollupCreator__factory as NitroRollupCreator__factory } from '../build/types/nitro/factories/RollupCreator__factory' import { RollupCreator as NitroRollupCreator } from '../build/types/nitro/RollupCreator' import { OneStepProver0__factory as NitroOneStepProver0__factory } from '../build/types/nitro/factories/OneStepProver0__factory' @@ -11,10 +10,13 @@ import { OneStepProofEntry__factory as NitroOneStepProofEntry__factory } from '. import { ChallengeManager__factory as NitroChallengeManager__factory } from '../build/types/nitro/factories/ChallengeManager__factory' import { RollupAdminLogic__factory as NitroRollupAdminLogic__factory } from '../build/types/nitro/factories/RollupAdminLogic__factory' import { RollupUserLogic__factory as NitroRollupUserLogic__factory } from '../build/types/nitro/factories/RollupUserLogic__factory' -import { BigNumber, constants, Signer } from 'ethers' +import { ValidatorUtils__factory as NitroValidatorUtils__factory } from '../build/types/nitro/factories/ValidatorUtils__factory' +import { ValidatorWalletCreator__factory as NitroValidatorWalletCreator__factory } from '../build/types/nitro/factories/ValidatorWalletCreator__factory' +import { BigNumber, Signer } from 'ethers' import { Provider } from '@ethersproject/providers' -import { getContractAddress } from 'ethers/lib/utils' +import { getAddress, getContractAddress } from 'ethers/lib/utils' import { + Bridge__factory, Inbox__factory, NitroMigrator, NitroMigrator__factory, @@ -25,73 +27,113 @@ import { SequencerInbox__factory, } from '../build/types' -// CHRIS: TODO: comments up in here +const wait = (ms: number) => + new Promise((resolve, _) => setTimeout(resolve, ms)) + +interface ClassicConfig { + rollupAddr: string + proxyAdminAddr: string + inboxAddr: string + sequencerInboxAddr: string + bridgeAddr: string + rollupEventBridgeAddr: string + outboxV1: string + outboxV2: string +} + export class NitroMigrationManager { private readonly provider: Provider + public static async deploy( + nitroDeployer: Signer, + log: boolean = true, + skipStep3Check: boolean = false + ) { + if (log) + console.log(`Proxy admin owner: ${await nitroDeployer.getAddress()}`) + const nitroMigratorFac = new NitroMigrator__factory(nitroDeployer) + const nitroMigrator = await nitroMigratorFac.deploy() + await nitroMigrator.deployed() + if (log) console.log(`Nitro migrator: ${nitroMigrator.address}`) + return new NitroMigrationManager(nitroMigrator, log, skipStep3Check) + } + public constructor( - public readonly proxyAdminOwner: Signer, - public readonly classicConfig: { - rollupAddr: string - proxyAdminAddr: string - inboxAddr: string - sequencerInboxAddr: string - bridgeAddr: string - rollupEventBridgeAddr: string - outboxV1: string - outboxV2: string // CHRIS: TODO: v2 here? - } + public readonly migrator: NitroMigrator, + public readonly log = true, + public readonly skipStep3Check: boolean = false ) { - if (!proxyAdminOwner.provider) { - throw new Error('No provider attached to deployer signer.') + if (!migrator.provider) { + throw new Error('No provider attached to migrator.') } - this.provider = proxyAdminOwner.provider + + this.provider = migrator.provider } public async run( - classicSequencers: string[], - nitroConfig: Parameters[0], + nitroDeployer: Signer, + classicProxyAdminOwner: Signer, + nitroConfig: Omit< + Parameters[0], + 'owner' + >, + classicConfig: ClassicConfig, destroyAlternatives: boolean, destroyChallenges: boolean ) { - const nitroContracts = await this.deployNitroContracts(nitroConfig) - await this.upgradeClassicContracts() - await this.deployMigrator({ - bridgeAddr: nitroContracts.bridge, - inboxTemplateAddr: nitroContracts.inboxTemplate, - outboxAddr: nitroContracts.outbox, - sequencerInboxAddr: nitroContracts.sequencerInbox, - }) - await this.step0point5() + if (this.log) console.log('Beginning migration') - await this.step1(classicSequencers, { - rollupAddr: nitroContracts.rollup, - bridgeAddr: nitroContracts.bridge, - }) - const nodeNum = await this.step1point5() + const nitroContracts = await this.deployNitroContracts( + nitroDeployer, + nitroConfig + ) + await this.upgradeClassicContracts(classicProxyAdminOwner, classicConfig) + + await this.configureDeployment( + classicProxyAdminOwner, + nitroDeployer, + classicConfig, + nitroContracts.rollup, + nitroContracts.proxyAdmin + ) + + await this.step1() + const nodeNum = await this.getFinalNodeNum() await this.step2(nodeNum, destroyAlternatives, destroyChallenges) - await this.step2point5() - await this.step3() + await this.waitForConfirmedEqualLatest() + await this.step3(nitroDeployer) } private async deployNitroChallengeContracts(signer: Signer) { + if (this.log) console.log(`Deploying nitro challenge contracts`) const oneStepProver0Fac = new NitroOneStepProver0__factory(signer) const oneStepProver0 = await oneStepProver0Fac.deploy() - await oneStepProver0.deployed() const oneStepProverMemoryFac = new NitroOneStepProverMemory__factory(signer) const oneStepProverMemory = await oneStepProverMemoryFac.deploy() - await oneStepProverMemory.deployed() const oneStepProverMathFac = new NitroOneStepProverMath__factory(signer) const oneStepProverMath = await oneStepProverMathFac.deploy() - await oneStepProverMath.deployed() const oneStepProverHostIoFac = new NitroOneStepProverHostIo__factory(signer) const oneStepProverHostIo = await oneStepProverHostIoFac.deploy() + + await oneStepProver0.deployed() + await oneStepProverMemory.deployed() + await oneStepProverMath.deployed() await oneStepProverHostIo.deployed() + if (this.log) { + console.log(`Nitro one step prover 0: ${oneStepProver0.address}`) + console.log( + `Nitro one step prover memory: ${oneStepProverMemory.address}` + ) + console.log(`Nitro one step prover math: ${oneStepProverMath.address}`) + console.log( + `Nitro one step prover host io: ${oneStepProverHostIo.address}` + ) + } const oneStepProofEntryFac = new NitroOneStepProofEntry__factory(signer) const oneStepProofEntry = await oneStepProofEntryFac.deploy( @@ -100,11 +142,18 @@ export class NitroMigrationManager { oneStepProverMath.address, oneStepProverHostIo.address ) - await oneStepProofEntry.deployed() const challengeManagerFac = new NitroChallengeManager__factory(signer) const challengeManager = await challengeManagerFac.deploy() + + await oneStepProofEntry.deployed() await challengeManager.deployed() + if (this.log) { + console.log(`Nitro one step prover entry: ${oneStepProofEntry.address}`) + console.log(`Nitro challenge manager: ${challengeManager.address}`) + } + + if (this.log) console.log(`Deploying nitro challenge contracts complete`) return { oneStepProver0, @@ -117,34 +166,71 @@ export class NitroMigrationManager { } public async deployNitroContracts( - config: Parameters[0] + nitroDeployer: Signer, + config: Omit[0], 'owner'> ) { - const nitroBridgeCreatorFac = new NitroBridgeCreator__factory( - this.proxyAdminOwner + if (this.log) console.log('Deploying nitro contracts') + // the owner should always be our nitro deployer + const ownerConfig = { + ...config, + owner: await nitroDeployer.getAddress(), + } + + // quick check that the owner of the migrator is also the account we'll + // use for deploying here + const migratorOwner = await this.migrator.owner() + const nitroDeployerAddr = await nitroDeployer.getAddress() + if (migratorOwner !== nitroDeployerAddr) { + throw new Error( + `Incorrect owner. Trying to deploy nitro contracts with different owner to migrator owner. ${migratorOwner}:${nitroDeployerAddr}` + ) + } + + const nitroValidatorUtilsFac = new NitroValidatorUtils__factory( + nitroDeployer ) + const nitroValidatorUtils = await nitroValidatorUtilsFac.deploy() + + const nitroValidatorWalletCreatorFac = + new NitroValidatorWalletCreator__factory(nitroDeployer) + const nitroValidatorWalletCreator = + await nitroValidatorWalletCreatorFac.deploy() + + const nitroBridgeCreatorFac = new NitroBridgeCreator__factory(nitroDeployer) const nitroBridgeCreator = await nitroBridgeCreatorFac.deploy() - await nitroBridgeCreator.deployed() - const nitroRollupCreatorFac = new NitroRollupCreator__factory( - this.proxyAdminOwner - ) + const nitroRollupCreatorFac = new NitroRollupCreator__factory(nitroDeployer) const nitroRollupCreator = await nitroRollupCreatorFac.deploy() - await nitroRollupCreator.deployed() const nitroRollupAdminLogicFac = new NitroRollupAdminLogic__factory( - this.proxyAdminOwner + nitroDeployer ) const nitroRollupAdminLogic = await nitroRollupAdminLogicFac.deploy() - await nitroRollupAdminLogic.deployed() const nitroRollupUserLogicFac = new NitroRollupUserLogic__factory( - this.proxyAdminOwner + nitroDeployer ) const nitroRollupUserLogic = await nitroRollupUserLogicFac.deploy() + + await nitroValidatorUtils.deployed() + await nitroValidatorWalletCreator.deployed() + await nitroBridgeCreator.deployed() + await nitroRollupCreator.deployed() + await nitroRollupAdminLogic.deployed() await nitroRollupUserLogic.deployed() + if (this.log) { + console.log(`Nitro validator utils: ${nitroValidatorUtils.address}`) + console.log( + `Nitro validator wallet creator: ${nitroValidatorWalletCreator.address}` + ) + console.log(`Nitro bridge creator: ${nitroBridgeCreator.address}`) + console.log(`Nitro rollup creator: ${nitroRollupCreator.address}`) + console.log(`Nitro rollup admin logic: ${nitroRollupAdminLogic.address}`) + console.log(`Nitro rollup user logic: ${nitroRollupUserLogic.address}`) + } const challengeContracts = await this.deployNitroChallengeContracts( - this.proxyAdminOwner + nitroDeployer ) await ( await nitroRollupCreator.setTemplates( @@ -152,9 +238,12 @@ export class NitroMigrationManager { challengeContracts.oneStepProofEntry.address, challengeContracts.challengeManager.address, nitroRollupAdminLogic.address, - nitroRollupUserLogic.address + nitroRollupUserLogic.address, + nitroValidatorUtils.address, + nitroValidatorWalletCreator.address ) ).wait() + if (this.log) console.log(`Nitro templates set`) const nonce = await this.provider.getTransactionCount( nitroRollupCreator.address @@ -165,24 +254,17 @@ export class NitroMigrationManager { }) const createRollupTx = await nitroRollupCreator.createRollup( - config, + ownerConfig, expectedRollupAddress ) - // CHRIS: TODO: quite a cool idea would be to figure out at compile - // time what possible events could be emitted from a given tx? is that even possible, - // I guess not. So how could we do it? we cant - - // CHRIS: we're deploying a new proxy admin in createRollup - // CHRIS: this will mean we actually have 2 proxy admins in the system post nitro - // CHRIS: we should probably transfer ownership so that they all have the same proxy admin const createRollupReceipt = await createRollupTx.wait() const rollupCreatedEventArgs = createRollupReceipt.logs .filter( l => l.topics[0] === nitroRollupCreator.interface.getEventTopic( - 'RollupCreated(address,address,address,address,address)' + 'RollupCreated(address indexed,address,address,address,address)' ) ) .map( @@ -196,178 +278,220 @@ export class NitroMigrationManager { rollupCreatedEventArgs.rollupAddress ) + if (this.log) { + console.log(`Nitro rollup created`) + console.log(`Nitro inbox: ${rollupCreatedEventArgs.inboxAddress}`) + console.log(`Nitro rollup: ${rollupCreatedEventArgs.rollupAddress}`) + console.log(`Nitro bridge ${rollupCreatedEventArgs.bridge}`) + console.log( + `Nitro inbox template: ${await nitroBridgeCreator.inboxTemplate()}` + ) + console.log(`Nitro outbox: ${await rollupUser.outbox()}`) + console.log( + `Nitro sequencer inbox: ${rollupCreatedEventArgs.sequencerInbox}` + ) + console.log(`Nitro proxy admin: ${rollupCreatedEventArgs.adminProxy}`) + } + + if (this.log) console.log('Deploying nitro contracts complete') + return { + inbox: rollupCreatedEventArgs.inboxAddress, rollup: rollupCreatedEventArgs.rollupAddress, - bridge: rollupCreatedEventArgs.delayedBridge, + bridge: rollupCreatedEventArgs.bridge, inboxTemplate: await nitroBridgeCreator.inboxTemplate(), outbox: await rollupUser.outbox(), sequencerInbox: rollupCreatedEventArgs.sequencerInbox, + proxyAdmin: rollupCreatedEventArgs.adminProxy, } } - public async upgradeClassicContracts() { - const proxyAdminContractFac = new ProxyAdmin__factory(this.proxyAdminOwner) - const proxyAdmin = proxyAdminContractFac.attach( - this.classicConfig.proxyAdminAddr + public async upgradeClassicContracts( + classicProxyAdminOwner: Signer, + classicConfig: { + proxyAdminAddr: string + inboxAddr: string + bridgeAddr: string + sequencerInboxAddr: string + rollupAddr: string + } + ) { + if (this.log) console.log(`Upgrading classic contracts`) + const proxyAdmin = ProxyAdmin__factory.connect( + classicConfig.proxyAdminAddr, + classicProxyAdminOwner ) - const inboxFac = new Inbox__factory(this.proxyAdminOwner) + const inboxFac = new Inbox__factory(classicProxyAdminOwner) const newInboxImp = await inboxFac.deploy() await newInboxImp.deployed() - await proxyAdmin - // CHRIS: TODO: this should be upgradeAndCall - .upgrade(this.classicConfig.inboxAddr, newInboxImp.address) + await proxyAdmin.upgrade(classicConfig.inboxAddr, newInboxImp.address) + if (this.log) + console.log(`Classic inbox upgraded: ${classicConfig.inboxAddr}`) + + const bridgeFac = new Bridge__factory(classicProxyAdminOwner) + const newBridgeImp = await bridgeFac.deploy() + await newBridgeImp.deployed() + await proxyAdmin.upgrade(classicConfig.bridgeAddr, newBridgeImp.address) + if (this.log) + console.log(`Classic bridge upgraded: ${classicConfig.bridgeAddr}`) // -- sequencer inbox - const sequencerInboxFac = new SequencerInbox__factory(this.proxyAdminOwner) + const sequencerInboxFac = new SequencerInbox__factory( + classicProxyAdminOwner + ) const newSequencerInboxImp = await sequencerInboxFac.deploy() await newSequencerInboxImp.deployed() const sequencerInboxPostUpdgrade = newSequencerInboxImp.interface.encodeFunctionData('postUpgradeInit') await proxyAdmin.upgradeAndCall( - this.classicConfig.sequencerInboxAddr, + classicConfig.sequencerInboxAddr, newSequencerInboxImp.address, sequencerInboxPostUpdgrade ) + if (this.log) + console.log( + `Classic sequencer inbox upgraded: ${classicConfig.sequencerInboxAddr}` + ) // -- rollup - const rollupFac = new Rollup__factory(this.proxyAdminOwner) - const prevRollup = rollupFac.attach(this.classicConfig.rollupAddr) + const rollupFac = new Rollup__factory(classicProxyAdminOwner) + const prevRollup = rollupFac.attach(classicConfig.rollupAddr) const confirmPeriodBlocks = await prevRollup.confirmPeriodBlocks() const newRollupImp = await rollupFac.deploy(confirmPeriodBlocks) await newRollupImp.deployed() const rollupPostUpgrade = newRollupImp.interface.encodeFunctionData('postUpgradeInit') await proxyAdmin.upgradeAndCall( - this.classicConfig.rollupAddr, + classicConfig.rollupAddr, newRollupImp.address, rollupPostUpgrade ) + if (this.log) + console.log(`Classic rollup upgraded: ${classicConfig.rollupAddr}`) // -- rollup user - const rollupUserFac = new RollupUserFacet__factory(this.proxyAdminOwner) + const rollupUserFac = new RollupUserFacet__factory(classicProxyAdminOwner) const newRollupUserImp = await rollupUserFac.deploy() await newRollupUserImp.deployed() + if (this.log) + console.log( + `Classic rollup user logic deployed: ${newRollupUserImp.address}` + ) // -- rollup admin - const rollupAdminFac = new RollupAdminFacet__factory(this.proxyAdminOwner) + const rollupAdminFac = new RollupAdminFacet__factory(classicProxyAdminOwner) const newRollupAdminImp = await rollupAdminFac.deploy() await newRollupAdminImp.deployed() + if (this.log) + console.log( + `Classic rollup admin logic deployed: ${newRollupAdminImp.address}` + ) const rollupAdmin = rollupAdminFac - .attach(this.classicConfig.rollupAddr) - .connect(this.proxyAdminOwner) + .attach(classicConfig.rollupAddr) + .connect(classicProxyAdminOwner) await ( await rollupAdmin.setFacets( newRollupAdminImp.address, newRollupUserImp.address ) ).wait() + if (this.log) console.log(`Classic rollup facets set`) + if (this.log) console.log(`Upgrading classic contracts complete`) return { - inbox: inboxFac.attach(this.classicConfig.inboxAddr), sequencerInbox: sequencerInboxFac.attach( - this.classicConfig.sequencerInboxAddr + classicConfig.sequencerInboxAddr ), - rollupAdmin: rollupAdminFac.attach(this.classicConfig.rollupAddr), + rollupAdmin: rollupAdminFac.attach(classicConfig.rollupAddr), } } - // CHRIS: TODO: check for the presence of this everywhere - private nitroMigrator?: NitroMigrator - - public async deployMigrator(nitroConfig: { - bridgeAddr: string - outboxAddr: string - sequencerInboxAddr: string - inboxTemplateAddr: string - }) { - const nitroMigratorFac = new NitroMigrator__factory(this.proxyAdminOwner) - this.nitroMigrator = await nitroMigratorFac.deploy( - this.classicConfig.inboxAddr, - this.classicConfig.sequencerInboxAddr, - this.classicConfig.bridgeAddr, - this.classicConfig.rollupEventBridgeAddr, - this.classicConfig.outboxV1, - this.classicConfig.outboxV2, - this.classicConfig.rollupAddr, - nitroConfig.bridgeAddr, - nitroConfig.outboxAddr, - nitroConfig.sequencerInboxAddr, - nitroConfig.inboxTemplateAddr - ) + public async configureDeployment( + classicProxyAdminOwner: Signer, + nitroDeployer: Signer, + classicConfig: ClassicConfig, + nitroRollupAddr: string, + nitroProxyAdmin: string + ) { + this.provider + if ( + (await this.provider.getCode(nitroRollupAddr)).length <= 2 || + (await this.provider.getCode(nitroProxyAdmin)).length <= 2 + ) { + throw new Error( + 'Could not configure deployment. Nitro contracts not deployed.' + ) + } + if (this.log) console.log('Configuring deployment') - return this.nitroMigrator - } + const classicRollupAdmin = RollupAdminFacet__factory.connect( + classicConfig.rollupAddr, + classicProxyAdminOwner + ) + if ((await classicRollupAdmin.owner()) != this.migrator.address) { + if (this.log) console.log('Classic rollup, setting owner to migrator') + await (await classicRollupAdmin.setOwner(this.migrator.address)).wait() + } - public async step0point5() { - if (!this.nitroMigrator) - throw new Error('Transfer ownership called before migrator deployed.') + const classicProxyAdmin = ProxyAdmin__factory.connect( + classicConfig.proxyAdminAddr, + classicProxyAdminOwner + ) + if ((await classicProxyAdmin.owner()) != this.migrator.address) { + if (this.log) + console.log('Classic proxy admin, setting owner to migrator') + await ( + await classicProxyAdmin.transferOwnership(this.migrator.address) + ).wait() + } - const rollupAdminFac = new RollupAdminFacet__factory(this.proxyAdminOwner) - const rollupAdmin = rollupAdminFac - .attach(this.classicConfig.rollupAddr) - .connect(this.proxyAdminOwner) + const nitroRollupAdmin = NitroRollupAdminLogic__factory.connect( + nitroRollupAddr, + nitroDeployer + ) + const nitroRollupAdminOwner = await this.getProxyAdmin(nitroRollupAddr) + if (nitroRollupAdminOwner != this.migrator.address) { + if (this.log) console.log('Nitro rollup, setting owner to migrator') + await (await nitroRollupAdmin.setOwner(this.migrator.address)).wait() + } await ( - await rollupAdmin.transferOwnership( - this.classicConfig.bridgeAddr, - this.nitroMigrator.address + await this.migrator.configureDeployment( + classicConfig.inboxAddr, + classicConfig.sequencerInboxAddr, + classicConfig.bridgeAddr, + classicConfig.rollupEventBridgeAddr, + classicConfig.outboxV1, + classicConfig.outboxV2, + classicConfig.rollupAddr, + classicConfig.proxyAdminAddr, + nitroRollupAddr, + nitroProxyAdmin ) ).wait() - await (await rollupAdmin.setOwner(this.nitroMigrator.address)).wait() + if (this.log) console.log('Configure deployment complete') } - // CHRIS: TODO: ensure these functions are called in the correct order? - - // CHRIS: TODO: put this classic config in the constructor - public async step1( - classicSequencers: string[], - nitroConfig: { rollupAddr: string; bridgeAddr: string } - ) { - if (!this.nitroMigrator) - throw new Error('Step 1 called before migrator deployed.') - - // CHRIS: TODO: should nitro contracts be added to dev or prod dependencies? - - const nitroBridgeFac = new NitroBridge__factory(this.proxyAdminOwner) - const nitroBridge = nitroBridgeFac.attach(nitroConfig.bridgeAddr) - const enqueueDelayedMessage = - await nitroBridge.interface.encodeFunctionData('enqueueDelayedMessage', [ - 0, - this.nitroMigrator.address, - constants.HashZero, - ]) - - // CHRIS: TODO: remove this!!!! we only do this whilst we wait for a receive function to be added to the - // set the classic bridge as a inbox on the nitro bridge - const nitroRollupAdmin = new NitroRollupAdminLogic__factory( - this.proxyAdminOwner - ).attach(nitroConfig.rollupAddr) - await ( - await nitroRollupAdmin.setInbox(this.classicConfig.bridgeAddr, true) - ).wait() - - await ( - await this.nitroMigrator.functions.nitroStep1( - classicSequencers, - enqueueDelayedMessage - ) - ).wait() - - // reset the bridge - // // CHRIS: TODO: remove this when we remove teh setInbox(true) above - await ( - await nitroRollupAdmin.setInbox(this.classicConfig.bridgeAddr, false) - ).wait() + public async step1() { + if (this.log) console.log('Executing migration step 1') + await (await this.migrator.functions.nitroStep1()).wait() + if (this.log) console.log('Executing migration step 1 complete') } - public async step1point5(): Promise { - // Step 1.5: check for lingering stuff + public async getFinalNodeNum(): Promise { + // CHRIS: TODO: Do we have any unredeemed retryables? - // - Do we have any unredeemed retryables? - // - Probably. They will get copied over - throw new Error('Not implemented.') + const rollupAddr = await this.migrator.rollup() + const rollupAdmin = RollupAdminFacet__factory.connect( + rollupAddr, + this.provider + ) + + const finalNodeNum = await rollupAdmin.latestNodeCreated() + if (this.log) console.log(`Final node num: ${finalNodeNum.toNumber()}`) + return finalNodeNum } public async step2( @@ -375,33 +499,90 @@ export class NitroMigrationManager { destroyAlternatives: boolean, destroyChallenges: boolean ) { - if (!this.nitroMigrator) - throw new Error('Step 2 called before migrator deployed.') - - // CHRIS: TODO: pass these args through + if (this.log) console.log('Executing migration step 2') await ( - await this.nitroMigrator.nitroStep2( + await this.migrator.nitroStep2( finalNodeNum, destroyAlternatives, destroyChallenges ) ).wait() + if (this.log) console.log('Executing migration step 2') + } + + public async waitForConfirmedEqualLatest() { + if (this.skipStep3Check) return + + // wait until the node has confirmed the remaining nodes + const rollupAddr = await this.migrator.rollup() + const rollup = RollupUserFacet__factory.connect(rollupAddr, this.provider) + while (true) { + const latestConfirmed = await rollup.latestConfirmed() + const latestNodeCreated = await rollup.latestNodeCreated() + + console.log( + `Waiting for latestConfirmed: ${latestConfirmed.toNumber()} to equal latestNodeCreated: ${latestNodeCreated.toNumber()}.` + ) + + if (latestConfirmed.eq(latestNodeCreated)) break + await wait(30000) + } } - public async step2point5() { - // Step 2.5: check for lingering stuff + public async step3(nitroDeployer: Signer) { + if (this.log) console.log('Executing migration step 3') + await (await this.migrator.nitroStep3(this.skipStep3Check)).wait() + + // CHRIS: TODO: should we check the ownership of all contracts? - // - Do we have any unexecuted exits? - // - Probably. They should be easy to handle - // - Jason (data science) joining can analyse the number of L2 to L1 txs not executed - // - Check no ongoing challenges - throw new Error('Not implemented.') + const nitroProxyAdminOwner = await nitroDeployer.getAddress() + + // check that ownership was successfully relinquished + const classicRollupAdmin = RollupAdminFacet__factory.connect( + await this.migrator.rollup(), + this.provider + ) + + if ((await classicRollupAdmin.owner()) != nitroProxyAdminOwner) { + throw new Error( + `Classic rollup owner is not nitro proxy admin owner. ${await classicRollupAdmin.owner()}:${nitroProxyAdminOwner}` + ) + } + + const classicProxyAdminAddr = await this.migrator.classicProxyAdmin() + const classicProxyAdmin = ProxyAdmin__factory.connect( + classicProxyAdminAddr, + this.provider + ) + if ((await classicProxyAdmin.owner()) != nitroProxyAdminOwner) { + throw new Error( + `Classic proxy admin owner is not nitro proxy admin owner ${await classicProxyAdmin.owner()}:${nitroProxyAdminOwner}` + ) + } + + const nitroProxyAdminAddr = await this.migrator.nitroProxyAdmin() + const nitroRollup = await this.migrator.nitroRollup() + const nitroAdmin = await this.getProxyAdmin(nitroRollup) + if (nitroAdmin != nitroProxyAdminAddr) { + throw new Error( + `Nitro rollup admin is not nitro proxy admin. ${nitroAdmin}:${nitroProxyAdminAddr}` + ) + } + if (this.log) console.log('Executing migration step 3 complete') } - public async step3() { - if (!this.nitroMigrator) - throw new Error('Step 3 called before migrator deployed.') + private async getProxyAdmin(proxyAddress: string) { + const ADMIN_SLOT = + '0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103' - await (await this.nitroMigrator.nitroStep3()).wait() + const nitroAdmin = await this.provider.getStorageAt( + proxyAddress, + ADMIN_SLOT + ) + return getAddress( + nitroAdmin.length > 42 + ? '0x' + nitroAdmin.substring(nitroAdmin.length - 40) + : nitroAdmin + ) } } diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index ab9a4b26e6..3477f522bd 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -270,7 +270,7 @@ task('migration-step-3', 'run nitro migration step 3') Migrator = Migrator.connect(hre.ethers.provider.getSigner(owner)) console.log('Running migration step 3') - const receipt = await (await Migrator.nitroStep3()).wait() + const receipt = await (await Migrator.nitroStep3(false)).wait() console.log('Ran migration step 3:', receipt) }) From 82f88508e6be6137e18e0d731c8cc41c3bd6a2ca Mon Sep 17 00:00:00 2001 From: Chris Buckland Date: Thu, 14 Jul 2022 10:55:04 +0200 Subject: [PATCH 51/86] Reverted removed comment --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 35df68b4a7..85a9213adb 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -227,6 +227,7 @@ contract NitroMigrator is Ownable, IMessageProvider { bridge.setOutbox(address(this), true); { uint256 bal = address(bridge).balance; + // TODO: import nitro contracts and use interface (bool success, ) = bridge.executeCall( address(nitroBridge), bal, From 182574d69033eee08a7e7368e1451baebc203cb3 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Mon, 18 Jul 2022 13:29:36 -0500 Subject: [PATCH 52/86] Call createNitroMigrationGenesis on nitro rollup at the end of step 3 --- .../contracts/bridge/NitroMigrator.sol | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 39351372ac..76cb28f9d5 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -40,6 +40,13 @@ interface INitroRollup { function inbox() external view returns (INitroInbox.IInbox); function setInbox(IInbox newInbox) external; + + function pause() external; + + function unpause() external; + + function createNitroMigrationGenesis(uint64 genesisBlockNumber, bytes32 genesisBlockHash) + external; } interface IArbOwner { @@ -143,6 +150,9 @@ contract NitroMigrator is Ownable, IMessageProvider { INitroInbox.IInbox oldNitroInbox = nitroRollup.inbox(); nitroBridge.setDelayedInbox(address(oldNitroInbox), false); + require(nitroRollup.latestNodeCreated() == 0, "NITRO_ROLLUP_HAS_NODES"); + nitroRollup.pause(); + latestCompleteStep = NitroMigrationSteps.Step0; } @@ -211,7 +221,10 @@ contract NitroMigrator is Ownable, IMessageProvider { latestCompleteStep = NitroMigrationSteps.Step2; } - function nitroStep3() external onlyOwner { + function nitroStep3(uint64 nitroGenesisBlockNumber, bytes32 nitroGenesisHash) + external + onlyOwner + { require(latestCompleteStep == NitroMigrationSteps.Step2, "WRONG_STEP"); // CHRIS: TODO: destroying the node in the previous steps does not reset latestConfirmed/latestNodeCreated require( @@ -241,7 +254,8 @@ contract NitroMigrator is Ownable, IMessageProvider { // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); - // TODO: set the genesis block hash of the nitro rollup + nitroRollup.unpause(); + nitroRollup.createNitroMigrationGenesis(nitroGenesisBlockNumber, nitroGenesisHash); latestCompleteStep = NitroMigrationSteps.Step3; } From 8ee85c42c4638a3b4a775f28b9aecf7330d161f1 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Tue, 19 Jul 2022 21:16:02 -0500 Subject: [PATCH 53/86] Fix Inbox shutdownForNitro returning seq num instead of count --- packages/arb-bridge-eth/contracts/bridge/Inbox.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol index 95e1b0674b..34a9764c47 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol @@ -62,8 +62,8 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { // we deliver an end of block message followed by the shutdown message msgNum = _deliverMessage(L1MessageType_endOfBlock, msg.sender, abi.encodePacked("")); msgNum = _deliverMessage(L1MessageType_shutdownForNitro, msg.sender, abi.encodePacked("")); - // only the last inbox message number is returned - return msgNum; + // return the new message _count_ (one greater than the last _sequence number_) + return msgNum + 1; } /** From 5ea25c011b0cd02b18d08dc29b86dfc0ccdbf23c Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Wed, 20 Jul 2022 10:23:17 -0500 Subject: [PATCH 54/86] Fix NitroMigrator call to unpause rollup --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 2495b873d6..aae20b0398 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -259,7 +259,7 @@ contract NitroMigrator is Ownable, IMessageProvider { // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); - nitroRollup.unpause(); + nitroRollup.resume(); nitroRollup.createNitroMigrationGenesis(nitroGenesisBlockNumber, nitroGenesisHash); // the migration is complete, relinquish ownership back to the From ba6fc752e390fa2cbac3a91360f7f9468e6927b7 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Wed, 20 Jul 2022 11:03:27 -0500 Subject: [PATCH 55/86] Unpause nitro rollup after creating the nitro migration genesis --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index aae20b0398..83d168aef9 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -259,8 +259,8 @@ contract NitroMigrator is Ownable, IMessageProvider { // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); - nitroRollup.resume(); nitroRollup.createNitroMigrationGenesis(nitroGenesisBlockNumber, nitroGenesisHash); + nitroRollup.resume(); // the migration is complete, relinquish ownership back to the // nitro proxy admin owner From 4dac1feaf3862cc287af3ce8c9d5a0d7b3ca4231 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Wed, 20 Jul 2022 11:11:21 -0500 Subject: [PATCH 56/86] Fix nitro rollup owner --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 83d168aef9..752057308d 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -267,7 +267,7 @@ contract NitroMigrator is Ownable, IMessageProvider { address nitroProxyAdminOwner = nitroProxyAdmin.owner(); rollup.setOwner(nitroProxyAdminOwner); classicProxyAdmin.transferOwnership(nitroProxyAdminOwner); - nitroRollup.setOwner(address(nitroProxyAdmin)); + nitroRollup.setOwner(address(nitroProxyAdminOwner)); latestCompleteStep = NitroMigrationSteps.Step3; } From f4edd60c0074b50c7d365cec1e4eb53c2c926b48 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Wed, 20 Jul 2022 11:21:08 -0500 Subject: [PATCH 57/86] Fix nitro rollup interface --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 752057308d..a255ccf53a 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -44,7 +44,7 @@ interface INitroRollup { function pause() external; - function unpause() external; + function resume() external; function latestNodeCreated() external returns (uint64); From 132ce232a9ff9ee8fa324e717f6ac661fca968f1 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Mon, 25 Jul 2022 10:57:10 -0500 Subject: [PATCH 58/86] Check if the nitro rollup is already paused before pausing it --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index a255ccf53a..1ebc40235a 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -37,13 +37,12 @@ interface INitroRollup { function bridge() external view returns (INitroBridge.IBridge); function inbox() external view returns (INitroInbox.IInbox); - function setInbox(IInbox newInbox) external; function setOwner(address newOwner) external; + function paused() external view returns (bool); function pause() external; - function resume() external; function latestNodeCreated() external returns (uint64); @@ -154,7 +153,9 @@ contract NitroMigrator is Ownable, IMessageProvider { nitroBridge.setDelayedInbox(address(oldNitroInbox), false); require(nitroRollup.latestNodeCreated() == 0, "NITRO_ROLLUP_HAS_NODES"); - nitroRollup.pause(); + if (!nitroRollup.paused()) { + nitroRollup.pause(); + } latestCompleteStep = NitroMigrationSteps.Step0; } From 7ae62135f5c7b9ef5bcf2249daf6b4dc74f8dd83 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Mon, 25 Jul 2022 17:36:51 +0100 Subject: [PATCH 59/86] refactor migrator to use abi encoder v2 and consume new rollup admin func --- .../contracts/bridge/NitroMigrator.sol | 61 ++++++++++++++++--- packages/arb-bridge-eth/package.json | 2 +- yarn.lock | 12 +--- 3 files changed, 55 insertions(+), 20 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index a255ccf53a..288345d91f 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -28,12 +28,35 @@ import "../libraries/NitroReadyQuery.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/proxy/ProxyAdmin.sol"; -import "@arbitrum/nitro-contracts/src/bridge/IBridgeNoErrors.sol" as INitroBridge; -import "@arbitrum/nitro-contracts/src/bridge/IInboxNoErrors.sol" as INitroInbox; +import "@arbitrum/nitro-contracts/src/bridge/IBridge.sol" as INitroBridge; +import "@arbitrum/nitro-contracts/src/bridge/IInbox.sol" as INitroInbox; pragma solidity ^0.6.11; +pragma experimental ABIEncoderV2; interface INitroRollup { + struct GlobalState { + bytes32[2] bytes32Vals; + uint64[2] u64Vals; + } + + enum MachineStatus { + RUNNING, + FINISHED, + ERRORED, + TOO_FAR + } + + struct ExecutionState { + GlobalState globalState; + MachineStatus machineStatus; + } + struct NitroRollupAssertion { + ExecutionState beforeState; + ExecutionState afterState; + uint64 numBlocks; + } + function bridge() external view returns (INitroBridge.IBridge); function inbox() external view returns (INitroInbox.IInbox); @@ -48,8 +71,7 @@ interface INitroRollup { function latestNodeCreated() external returns (uint64); - function createNitroMigrationGenesis(uint64 genesisBlockNumber, bytes32 genesisBlockHash) - external; + function createNitroMigrationGenesis(NitroRollupAssertion calldata assertion) external; } interface IArbOwner { @@ -225,10 +247,11 @@ contract NitroMigrator is Ownable, IMessageProvider { } // CHRIS: TODO: remove skipCheck - function nitroStep3(uint64 nitroGenesisBlockNumber, bytes32 nitroGenesisHash, bool skipCheck) - external - onlyOwner - { + function nitroStep3( + uint64 nitroGenesisBlockNumber, + bytes32 nitroGenesisHash, + bool skipCheck + ) external onlyOwner { require(latestCompleteStep == NitroMigrationSteps.Step2, "WRONG_STEP"); // CHRIS: TODO: destroying the node in the previous steps does not reset latestConfirmed/latestNodeCreated require( @@ -259,7 +282,27 @@ contract NitroMigrator is Ownable, IMessageProvider { // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); - nitroRollup.createNitroMigrationGenesis(nitroGenesisBlockNumber, nitroGenesisHash); + bytes32[2] memory newStateBytes32; + newStateBytes32[0] = nitroGenesisHash; + uint64[2] memory newStateU64; + newStateU64[0] = 1; + INitroRollup.GlobalState memory emptyGlobalState; + INitroRollup.NitroRollupAssertion memory assertion = INitroRollup.NitroRollupAssertion({ + beforeState: INitroRollup.ExecutionState({ + globalState: emptyGlobalState, + machineStatus: INitroRollup.MachineStatus.FINISHED + }), + afterState: INitroRollup.ExecutionState({ + globalState: INitroRollup.GlobalState({ + bytes32Vals: newStateBytes32, + u64Vals: newStateU64 + }), + machineStatus: INitroRollup.MachineStatus.FINISHED + }), + numBlocks: nitroGenesisBlockNumber + 1 + }); + + nitroRollup.createNitroMigrationGenesis(assertion); nitroRollup.resume(); // the migration is complete, relinquish ownership back to the diff --git a/packages/arb-bridge-eth/package.json b/packages/arb-bridge-eth/package.json index ea0eebe3d5..6f396cba60 100644 --- a/packages/arb-bridge-eth/package.json +++ b/packages/arb-bridge-eth/package.json @@ -45,7 +45,7 @@ "hardhat": "hardhat --config hardhat.config.ts" }, "dependencies": { - "@arbitrum/nitro-contracts": "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?b705200c4d9ca90e82579057e1b155c3913562db", + "@arbitrum/nitro-contracts": "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?54d7a96cfa47dded93c198c2a4cccdab46fb5974", "@openzeppelin/contracts": "3.4.2", "@openzeppelin/contracts-0.8": "npm:@openzeppelin/contracts@^4.3.2", "@openzeppelin/contracts-upgradeable": "3.4.2", diff --git a/yarn.lock b/yarn.lock index 0b9b1cf265..a50564d4ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,17 +2,9 @@ # yarn lockfile v1 -"@arbitrum/nitro-contracts@https://gitpkg.now.sh/OffchainLabs/nitro/contracts?678866136ca917ed20dd3f0ee23176bb7bb7bd49": +"@arbitrum/nitro-contracts@https://gitpkg.now.sh/OffchainLabs/nitro/contracts?54d7a96cfa47dded93c198c2a4cccdab46fb5974": version "1.0.0-beta.8" - resolved "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?678866136ca917ed20dd3f0ee23176bb7bb7bd49#ccacdf6e00feb1a8af23c0938b2f00ead2ee69fd" - dependencies: - "@openzeppelin/contracts" "4.5.0" - "@openzeppelin/contracts-upgradeable" "4.5.2" - hardhat "^2.6.6" - -"@arbitrum/nitro-contracts@https://gitpkg.now.sh/OffchainLabs/nitro/contracts?b705200c4d9ca90e82579057e1b155c3913562db": - version "1.0.0-beta.8" - resolved "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?b705200c4d9ca90e82579057e1b155c3913562db#388f31134598b44d9265b08b9129341e42a0c70b" + resolved "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?54d7a96cfa47dded93c198c2a4cccdab46fb5974#a5f53c9c9631e6753a8a4d182a42509912b770d4" dependencies: "@openzeppelin/contracts" "4.5.0" "@openzeppelin/contracts-upgradeable" "4.5.2" From 3279e567e32835d8e2ee8b68cb12bcb5060d9d4d Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Mon, 25 Jul 2022 13:49:01 -0500 Subject: [PATCH 60/86] Add isNitroReady check to bridge --- packages/arb-bridge-eth/contracts/bridge/Bridge.sol | 4 ++++ packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol index a655a48faf..8e7069e457 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol @@ -175,4 +175,8 @@ contract Bridge is OwnableUpgradeable, IBridge { function setReplacementBridge(address newReplacementBridge) external override onlyOwner { replacementBridge = IBridge(newReplacementBridge); } + + function isNitroReady() external pure returns (uint8) { + return uint8(0xa4b1); + } } diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index f945a9084d..ade09fe911 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -164,6 +164,7 @@ contract NitroMigrator is Ownable, IMessageProvider { // this returns a different magic value so we can differentiate the user and admin facets require(_rollup.isNitroReady() == uint8(0xa4b2), "ADMIN_ROLLUP_NOT_NITRO_READY"); + require(_bridge.isNitroReady() == uint8(0xa4b1), "BRIDGE_NOT_UPGRADED"); require(_inbox.isNitroReady() == uint8(0xa4b1), "INBOX_NOT_UPGRADED"); require(_sequencerInbox.isNitroReady() == uint8(0xa4b1), "SEQINBOX_NOT_UPGRADED"); From c9d5929e04e0b88297e7ec2c229059b39dac3507 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 26 Jul 2022 14:14:50 +0100 Subject: [PATCH 61/86] update nitro contracts dependency to use npm --- packages/arb-bridge-eth/package.json | 2 +- yarn.lock | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/arb-bridge-eth/package.json b/packages/arb-bridge-eth/package.json index 6f396cba60..abd2642a5a 100644 --- a/packages/arb-bridge-eth/package.json +++ b/packages/arb-bridge-eth/package.json @@ -45,7 +45,7 @@ "hardhat": "hardhat --config hardhat.config.ts" }, "dependencies": { - "@arbitrum/nitro-contracts": "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?54d7a96cfa47dded93c198c2a4cccdab46fb5974", + "@arbitrum/nitro-contracts": "1.0.0-beta.8", "@openzeppelin/contracts": "3.4.2", "@openzeppelin/contracts-0.8": "npm:@openzeppelin/contracts@^4.3.2", "@openzeppelin/contracts-upgradeable": "3.4.2", diff --git a/yarn.lock b/yarn.lock index a50564d4ff..7069229659 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,9 +2,10 @@ # yarn lockfile v1 -"@arbitrum/nitro-contracts@https://gitpkg.now.sh/OffchainLabs/nitro/contracts?54d7a96cfa47dded93c198c2a4cccdab46fb5974": +"@arbitrum/nitro-contracts@1.0.0-beta.8": version "1.0.0-beta.8" - resolved "https://gitpkg.now.sh/OffchainLabs/nitro/contracts?54d7a96cfa47dded93c198c2a4cccdab46fb5974#a5f53c9c9631e6753a8a4d182a42509912b770d4" + resolved "https://registry.yarnpkg.com/@arbitrum/nitro-contracts/-/nitro-contracts-1.0.0-beta.8.tgz#56554091b466ea1539c11691c60835625f6675e5" + integrity sha512-idzrJ/yGbcVUaqm45kFzV157B7V8W05G0cyMZazNhkWs39zO/moVwjMUCJpQ/SGW4OlOQggI8Xuw4xfocno7Xg== dependencies: "@openzeppelin/contracts" "4.5.0" "@openzeppelin/contracts-upgradeable" "4.5.2" From a53bb9f874eb56006227eb4aa9f27389abe75cd3 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 26 Jul 2022 17:42:54 +0100 Subject: [PATCH 62/86] refactor nitro ready function to rollup user superclass --- .../arb-bridge-eth/contracts/rollup/facets/RollupUser.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index 430546083c..41a898f1e7 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -565,6 +565,10 @@ abstract contract AbsRollupUserFacet is RollupBase, IRollupUser { require(currentChallenge(stakerAddress) == address(0), "IN_CHAL"); } + function isNitroReady() external pure returns (uint8) { + return uint8(0xa4b1); + } + function withdrawStakerFunds(address payable destination) external virtual returns (uint256); } @@ -607,10 +611,6 @@ contract RollupUserFacet is AbsRollupUserFacet { destination.transfer(amount); return amount; } - - function isNitroReady() external pure returns (uint8) { - return uint8(0xa4b1); - } } contract ERC20RollupUserFacet is AbsRollupUserFacet { From f9f377f15c99567f8dec896e8083ea5197ab701d Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 26 Jul 2022 18:10:28 +0100 Subject: [PATCH 63/86] add logic contract deploy script --- .../scripts/deployClassicLogic.ts | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 packages/arb-bridge-eth/scripts/deployClassicLogic.ts diff --git a/packages/arb-bridge-eth/scripts/deployClassicLogic.ts b/packages/arb-bridge-eth/scripts/deployClassicLogic.ts new file mode 100644 index 0000000000..c353565bdc --- /dev/null +++ b/packages/arb-bridge-eth/scripts/deployClassicLogic.ts @@ -0,0 +1,102 @@ +import { Signer } from '@ethersproject/abstract-signer' +import hre from 'hardhat' +import { + RollupAdminFacet__factory, + RollupUserFacet__factory, + Bridge__factory, + Inbox__factory, + SequencerInbox__factory, +} from '../build/types' + +if (!process.env['ETHERSCAN_API_KEY']) + throw new Error('Please set ETHERSCAN_API_KEY') + +const main = async () => { + const accounts: Signer[] = await hre.ethers.getSigners() + + const RollupAdmin = new RollupAdminFacet__factory(accounts[0]) + const RollupUser = new RollupUserFacet__factory(accounts[0]) + const Bridge = new Bridge__factory(accounts[0]) + const Inbox = new Inbox__factory(accounts[0]) + const SequencerInbox = new SequencerInbox__factory(accounts[0]) + + console.log('deploying rollup admin') + const rollupAdmin = await RollupAdmin.deploy() + await rollupAdmin.deployed() + console.log(rollupAdmin.address) + + await hre.run('verify:verify', { + address: rollupAdmin.address, + constructorArguments: [], + }) + + console.log('deploying rollup user') + const rollupUser = await RollupUser.deploy() + await rollupUser.deployed() + console.log(rollupUser.address) + + await hre.run('verify:verify', { + address: rollupUser.address, + constructorArguments: [], + }) + + console.log('init rollup user') + const initRU = await rollupUser.initialize(hre.ethers.constants.AddressZero) + await initRU.wait() + + console.log('deploying bridge') + const bridge = await Bridge.deploy() + await bridge.deployed() + console.log(bridge.address) + + await hre.run('verify:verify', { + address: bridge.address, + constructorArguments: [], + }) + + console.log('init bridge') + const initBridge = await bridge.initialize() + await initBridge.wait() + + console.log('deploying inbox') + const inbox = await Inbox.deploy() + await inbox.deployed() + console.log(inbox.address) + + await hre.run('verify:verify', { + address: inbox.address, + constructorArguments: [], + }) + + console.log('init inbox') + const initInbox = await inbox.initialize( + hre.ethers.constants.AddressZero, + hre.ethers.constants.AddressZero + ) + await initInbox.wait() + + console.log('deploying sequencer inbox') + const sequencerInbox = await SequencerInbox.deploy() + await sequencerInbox.deployed() + console.log(sequencerInbox.address) + + await hre.run('verify:verify', { + address: sequencerInbox.address, + constructorArguments: [], + }) + + console.log('init seq inbox') + const initSeqInbox = await sequencerInbox.initialize( + hre.ethers.constants.AddressZero, + hre.ethers.constants.AddressZero, + hre.ethers.constants.AddressZero + ) + await initSeqInbox.wait() +} + +main() + .then(() => console.log('done')) + .catch(err => { + console.error('error') + console.error(err) + }) From d35ee0be44127cb38fb6d1650a9483117494b5a0 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Tue, 26 Jul 2022 20:45:20 -0500 Subject: [PATCH 64/86] Instead of bridge proxying old outboxes, change the outbox bridge --- .../contracts/bridge/Bridge.sol | 47 +++++++++---------- .../arb-bridge-eth/contracts/bridge/Inbox.sol | 4 +- .../contracts/bridge/NitroMigrator.sol | 18 +++---- .../contracts/bridge/Old_Outbox/OldOutbox.sol | 9 ++++ .../contracts/bridge/Outbox.sol | 9 ++++ .../contracts/bridge/SequencerInbox.sol | 4 +- .../contracts/bridge/interfaces/IBridge.sol | 4 +- .../contracts/bridge/interfaces/IOutbox.sol | 6 +++ .../contracts/libraries/NitroReadyQuery.sol | 4 +- .../contracts/rollup/facets/RollupAdmin.sol | 4 +- .../contracts/rollup/facets/RollupUser.sol | 4 +- .../contracts/test_only/BridgeMock.sol | 2 +- 12 files changed, 66 insertions(+), 49 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol index 8e7069e457..afdaa2f0dc 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol @@ -38,15 +38,11 @@ contract Bridge is OwnableUpgradeable, IBridge { address[] public allowedInboxList; address[] public allowedOutboxList; - address internal localActiveOutbox; + address public override activeOutbox; // Accumulator for delayed inbox; tail represents hash of the current state; each element represents the inclusion of a new message. bytes32[] public override inboxAccs; - // Set during the nitro transition to the nitro bridge. - // `activeOutbox` will be forwarded to this bridge if set. - IBridge public replacementBridge; - function initialize() external initializer { __Ownable_init(); } @@ -56,9 +52,6 @@ contract Bridge is OwnableUpgradeable, IBridge { } function allowedOutboxes(address outbox) external view override returns (bool) { - if (address(replacementBridge) != address(0)) { - return replacementBridge.allowedOutboxes(outbox); - } return allowedOutboxesMap[outbox].allowed; } @@ -112,15 +105,12 @@ contract Bridge is OwnableUpgradeable, IBridge { bytes calldata data ) external override returns (bool success, bytes memory returnData) { require(allowedOutboxesMap[msg.sender].allowed, "NOT_FROM_OUTBOX"); - if (address(replacementBridge) != address(0)) { - return replacementBridge.executeCall(destAddr, amount, data); - } if (data.length > 0) require(destAddr.isContract(), "NO_CODE_AT_DEST"); - address currentOutbox = localActiveOutbox; - localActiveOutbox = msg.sender; + address currentOutbox = activeOutbox; + activeOutbox = msg.sender; // We set and reset active outbox around external call so activeOutbox remains valid during call (success, returnData) = destAddr.call{ value: amount }(data); - localActiveOutbox = currentOutbox; + activeOutbox = currentOutbox; emit BridgeCallTriggered(msg.sender, destAddr, amount, data); } @@ -143,6 +133,10 @@ contract Bridge is OwnableUpgradeable, IBridge { } function setOutbox(address outbox, bool enabled) external override onlyOwner { + return setOutboxImpl(outbox, enabled); + } + + function setOutboxImpl(address outbox, bool enabled) internal { InOutInfo storage info = allowedOutboxesMap[outbox]; bool alreadyEnabled = info.allowed; emit OutboxToggle(outbox, enabled); @@ -164,19 +158,22 @@ contract Bridge is OwnableUpgradeable, IBridge { return inboxAccs.length; } - function activeOutbox() external view override returns (address) { - if (address(replacementBridge) == address(0)) { - return localActiveOutbox; - } else { - return replacementBridge.activeOutbox(); + function setReplacementBridge(IBridge replacementBridge) external override onlyOwner { + while (allowedOutboxList.length > 0) { + address outbox = allowedOutboxList[0]; + IOutbox(outbox).setBridge(replacementBridge); + setOutboxImpl(outbox, false); } } - function setReplacementBridge(address newReplacementBridge) external override onlyOwner { - replacementBridge = IBridge(newReplacementBridge); - } - - function isNitroReady() external pure returns (uint8) { - return uint8(0xa4b1); + function isNitroReady() external view override returns (uint256) { + uint256 numOutboxes = allowedOutboxList.length; + for (uint256 i = 0; i < numOutboxes; i++) { + require( + IOutbox(allowedOutboxList[i]).isNitroReady() == 0xa4b1, + "OUTBOX_NOT_NITRO_READY" + ); + } + return 0xa4b1; } } diff --git a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol index f1224aa9e2..607835b160 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol @@ -53,8 +53,8 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { WhitelistConsumer.whitelist = _whitelist; } - function isNitroReady() external pure returns (uint8) { - return uint8(0xa4b1); + function isNitroReady() external pure returns (uint256) { + return 0xa4b1; } function shutdownForNitro() external returns (uint256 msgNum) { diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index ade09fe911..5174eb657d 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -84,8 +84,6 @@ contract NitroMigrator is Ownable, IMessageProvider { SequencerInbox public sequencerInbox; Bridge public bridge; RollupEventBridge public rollupEventBridge; - OldOutbox public outboxV1; - Outbox public outboxV2; // assumed this contract is now the rollup admin RollupAdminFacet public rollup; ProxyAdmin public classicProxyAdmin; @@ -130,8 +128,6 @@ contract NitroMigrator is Ownable, IMessageProvider { SequencerInbox _sequencerInbox, Bridge _bridge, RollupEventBridge _rollupEventBridge, - OldOutbox _outboxV1, - Outbox _outboxV2, RollupAdminFacet _rollup, ProxyAdmin _classicProxyAdmin, INitroRollup _nitroRollup, @@ -144,8 +140,6 @@ contract NitroMigrator is Ownable, IMessageProvider { bridge = _bridge; rollupEventBridge = _rollupEventBridge; rollup = _rollup; - outboxV1 = _outboxV1; - outboxV2 = _outboxV2; classicProxyAdmin = _classicProxyAdmin; nitroRollup = _nitroRollup; @@ -157,16 +151,16 @@ contract NitroMigrator is Ownable, IMessageProvider { // so we deploy a new contract to ensure the query is dispatched to the user facet, not the admin NitroReadyQuery queryContract = new NitroReadyQuery(); require( - queryContract.isNitroReady(address(_rollup)) == uint8(0xa4b1), + queryContract.isNitroReady(address(_rollup)) == 0xa4b1, "USER_ROLLUP_NOT_NITRO_READY" ); } // this returns a different magic value so we can differentiate the user and admin facets - require(_rollup.isNitroReady() == uint8(0xa4b2), "ADMIN_ROLLUP_NOT_NITRO_READY"); + require(_rollup.isNitroReady() == 0xa4b2, "ADMIN_ROLLUP_NOT_NITRO_READY"); - require(_bridge.isNitroReady() == uint8(0xa4b1), "BRIDGE_NOT_UPGRADED"); - require(_inbox.isNitroReady() == uint8(0xa4b1), "INBOX_NOT_UPGRADED"); - require(_sequencerInbox.isNitroReady() == uint8(0xa4b1), "SEQINBOX_NOT_UPGRADED"); + require(_bridge.isNitroReady() == 0xa4b1, "BRIDGE_NOT_UPGRADED"); + require(_inbox.isNitroReady() == 0xa4b1, "INBOX_NOT_UPGRADED"); + require(_sequencerInbox.isNitroReady() == 0xa4b1, "SEQINBOX_NOT_UPGRADED"); // we check that the new contracts that will receive permissions are actually contracts require(Address.isContract(address(nitroBridge)), "NITRO_BRIDGE_NOT_CONTRACT"); @@ -279,7 +273,7 @@ contract NitroMigrator is Ownable, IMessageProvider { // the bridge will proxy executeCall calls from the classic outboxes nitroBridge.setOutbox(address(bridge), true); - bridge.setReplacementBridge(address(nitroBridge)); + bridge.setReplacementBridge(IBridge(address(nitroBridge))); // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); diff --git a/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol b/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol index 68df539142..f4542c5a48 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol @@ -259,4 +259,13 @@ contract OldOutbox is IOutbox, Cloneable { function outboxesLength() public view returns (uint256) { return outboxes.length; } + + function setBridge(IBridge newBridge) external override { + require(msg.sender == address(bridge), "NOT_BRIDGE"); + bridge = newBridge; + } + + function isNitroReady() external pure override returns (uint256) { + return 0xa4b1; + } } diff --git a/packages/arb-bridge-eth/contracts/bridge/Outbox.sol b/packages/arb-bridge-eth/contracts/bridge/Outbox.sol index 7ea1357e7b..16d60576bb 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Outbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Outbox.sol @@ -272,4 +272,13 @@ contract Outbox is IOutbox, Cloneable { function outboxEntryExists(uint256 batchNum) public view override returns (bool) { return outboxEntries[batchNum].root != bytes32(0); } + + function setBridge(IBridge newBridge) external override { + require(msg.sender == address(bridge), "NOT_BRIDGE"); + bridge = newBridge; + } + + function isNitroReady() external pure override returns (uint256) { + return 0xa4b1; + } } diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index d24d8faf0c..eb8785bd2a 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -98,8 +98,8 @@ contract SequencerInbox is ISequencerInbox, Cloneable { emit MaxDelayUpdated(newMaxDelayBlocks, newMaxDelaySeconds); } - function isNitroReady() external pure returns (uint8) { - return uint8(0xa4b1); + function isNitroReady() external pure returns (uint256) { + return 0xa4b1; } /** diff --git a/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol b/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol index 82d86c01a1..ce248bef6e 100644 --- a/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol @@ -57,7 +57,7 @@ interface IBridge { function setOutbox(address inbox, bool enabled) external; - function setReplacementBridge(address newReplacementBridge) external; + function setReplacementBridge(IBridge newReplacementBridge) external; // View functions @@ -70,4 +70,6 @@ interface IBridge { function inboxAccs(uint256 index) external view returns (bytes32); function messageCount() external view returns (uint256); + + function isNitroReady() external view returns (uint256); } diff --git a/packages/arb-bridge-eth/contracts/bridge/interfaces/IOutbox.sol b/packages/arb-bridge-eth/contracts/bridge/interfaces/IOutbox.sol index d98c693070..c4f67e86ad 100644 --- a/packages/arb-bridge-eth/contracts/bridge/interfaces/IOutbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/interfaces/IOutbox.sol @@ -19,6 +19,8 @@ // solhint-disable-next-line compiler-version pragma solidity >=0.6.9 <0.9.0; +import "./IBridge.sol"; + interface IOutbox { event OutboxEntryCreated( uint256 indexed batchNum, @@ -49,4 +51,8 @@ interface IOutbox { external; function outboxEntryExists(uint256 batchNum) external view returns (bool); + + function setBridge(IBridge newBridge) external; + + function isNitroReady() external pure returns (uint256); } diff --git a/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol b/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol index 5a210f3cc3..89557a1227 100644 --- a/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol +++ b/packages/arb-bridge-eth/contracts/libraries/NitroReadyQuery.sol @@ -19,12 +19,12 @@ pragma solidity ^0.6.11; interface NitroReadyContract { - function isNitroReady() external pure returns (uint8); + function isNitroReady() external pure returns (uint256); } contract NitroReadyQuery { /// @dev queries a contract to know if its ready for the nitro upgrade - function isNitroReady(address target) external pure returns (uint8) { + function isNitroReady(address target) external pure returns (uint256) { return NitroReadyContract(target).isNitroReady(); } } diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol index da283be3ea..fcade8183d 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol @@ -412,7 +412,7 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { emit OwnerFunctionCalled(27); } - function isNitroReady() external pure returns (uint8) { - return uint8(0xa4b2); + function isNitroReady() external pure returns (uint256) { + return 0xa4b2; } } diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index 41a898f1e7..b8a00a7cd9 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -565,8 +565,8 @@ abstract contract AbsRollupUserFacet is RollupBase, IRollupUser { require(currentChallenge(stakerAddress) == address(0), "IN_CHAL"); } - function isNitroReady() external pure returns (uint8) { - return uint8(0xa4b1); + function isNitroReady() external pure returns (uint256) { + return 0xa4b1; } function withdrawStakerFunds(address payable destination) external virtual returns (uint256); diff --git a/packages/arb-bridge-eth/contracts/test_only/BridgeMock.sol b/packages/arb-bridge-eth/contracts/test_only/BridgeMock.sol index 1d96a85d39..a7ef9d956d 100644 --- a/packages/arb-bridge-eth/contracts/test_only/BridgeMock.sol +++ b/packages/arb-bridge-eth/contracts/test_only/BridgeMock.sol @@ -22,7 +22,7 @@ import "../bridge/Bridge.sol"; contract BridgeMock is Bridge { constructor() public { - localActiveOutbox = msg.sender; + activeOutbox = msg.sender; } function deliverMessageToInboxTest( From f2e193a2348b85b988e828526ccd2c3577834685 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Tue, 26 Jul 2022 20:47:46 -0500 Subject: [PATCH 65/86] Update ethBridgeTasks configure-migration --- packages/arb-upgrades/ethBridgeTasks.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/arb-upgrades/ethBridgeTasks.ts b/packages/arb-upgrades/ethBridgeTasks.ts index 33ef87b0b2..1e18600f10 100644 --- a/packages/arb-upgrades/ethBridgeTasks.ts +++ b/packages/arb-upgrades/ethBridgeTasks.ts @@ -203,8 +203,6 @@ task('configure-migration', 'configure nitro migrator contract') data.contracts.SequencerInbox.proxyAddress, data.contracts.Bridge.proxyAddress, data.contracts.RollupEventBridge.proxyAddress, - data.contracts.OldOutbox.proxyAddress, - data.contracts.Outbox.proxyAddress, data.contracts.Rollup.proxyAddress, oldProxyAdmin, args.nitrorollupproxy, From f479ba27f76dab893d66d630fa84c57ba589ba43 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Tue, 26 Jul 2022 21:40:25 -0500 Subject: [PATCH 66/86] Fix formatting --- .../arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 3 +++ .../arb-bridge-eth/contracts/bridge/SequencerInbox.sol | 8 ++++---- .../contracts/rollup/facets/IRollupFacets.sol | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 5174eb657d..5eac6c50d2 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -60,12 +60,15 @@ interface INitroRollup { function bridge() external view returns (INitroBridge.IBridge); function inbox() external view returns (INitroInbox.IInbox); + function setInbox(IInbox newInbox) external; function setOwner(address newOwner) external; function paused() external view returns (bool); + function pause() external; + function resume() external; function latestNodeCreated() external returns (uint64); diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index eb8785bd2a..5c26a98205 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -144,10 +144,10 @@ contract SequencerInbox is ISequencerInbox, Cloneable { } /// @dev this function is intended to force include the delayed inbox a final time in the nitro migration - function shutdownForNitro( - uint256 _totalDelayedMessagesRead, - bytes32 delayedAcc - ) external whenNotShutdownForNitro { + function shutdownForNitro(uint256 _totalDelayedMessagesRead, bytes32 delayedAcc) + external + whenNotShutdownForNitro + { // no delay on force inclusion, triggered only by rollup's owner require(Rollup(payable(rollup)).owner() == msg.sender, "ONLY_ROLLUP_OWNER"); diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/IRollupFacets.sol b/packages/arb-bridge-eth/contracts/rollup/facets/IRollupFacets.sol index 4b88a9d623..7aee22d6fb 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/IRollupFacets.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/IRollupFacets.sol @@ -212,5 +212,6 @@ interface IRollupAdmin { interface INitroRollupCore { function inbox() external view returns (address); + function owner() external view returns (address); } From 8b156a3ccedba48fbc5fd62f835bf841b642f402 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Tue, 26 Jul 2022 22:20:35 -0500 Subject: [PATCH 67/86] Enable old outboxes on nitro bridge --- packages/arb-bridge-eth/contracts/bridge/Bridge.sol | 8 +++++++- .../arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 7 ++++--- .../contracts/bridge/interfaces/IBridge.sol | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol index afdaa2f0dc..70c6b4dd5a 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol @@ -158,7 +158,13 @@ contract Bridge is OwnableUpgradeable, IBridge { return inboxAccs.length; } - function setReplacementBridge(IBridge replacementBridge) external override onlyOwner { + function setReplacementBridge(IBridge replacementBridge) + external + override + onlyOwner + returns (address[] memory oldOutboxes) + { + oldOutboxes = allowedOutboxList; while (allowedOutboxList.length > 0) { address outbox = allowedOutboxList[0]; IOutbox(outbox).setBridge(replacementBridge); diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 5eac6c50d2..572d6f7a10 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -274,9 +274,10 @@ contract NitroMigrator is Ownable, IMessageProvider { } bridge.setOutbox(address(this), false); - // the bridge will proxy executeCall calls from the classic outboxes - nitroBridge.setOutbox(address(bridge), true); - bridge.setReplacementBridge(IBridge(address(nitroBridge))); + address[] memory oldOutboxes = bridge.setReplacementBridge(IBridge(address(nitroBridge))); + for (uint256 i = 0; i < oldOutboxes.length; i++) { + nitroBridge.setOutbox(oldOutboxes[i], true); + } // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment nitroBridge.setDelayedInbox(address(inbox), true); diff --git a/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol b/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol index ce248bef6e..d12769ddd5 100644 --- a/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol @@ -57,7 +57,7 @@ interface IBridge { function setOutbox(address inbox, bool enabled) external; - function setReplacementBridge(IBridge newReplacementBridge) external; + function setReplacementBridge(IBridge newReplacementBridge) external returns (address[] memory); // View functions From 7063912695d6621d1802b013dae2b799d088b229 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Wed, 27 Jul 2022 11:06:58 +0100 Subject: [PATCH 68/86] refactor outbox state changes from bridge to migrator --- .../arb-bridge-eth/contracts/bridge/Bridge.sol | 18 ++---------------- .../contracts/bridge/NitroMigrator.sol | 9 ++++++--- .../contracts/bridge/interfaces/IBridge.sol | 2 -- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol index 70c6b4dd5a..5564de5f9c 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol @@ -133,10 +133,6 @@ contract Bridge is OwnableUpgradeable, IBridge { } function setOutbox(address outbox, bool enabled) external override onlyOwner { - return setOutboxImpl(outbox, enabled); - } - - function setOutboxImpl(address outbox, bool enabled) internal { InOutInfo storage info = allowedOutboxesMap[outbox]; bool alreadyEnabled = info.allowed; emit OutboxToggle(outbox, enabled); @@ -158,18 +154,8 @@ contract Bridge is OwnableUpgradeable, IBridge { return inboxAccs.length; } - function setReplacementBridge(IBridge replacementBridge) - external - override - onlyOwner - returns (address[] memory oldOutboxes) - { - oldOutboxes = allowedOutboxList; - while (allowedOutboxList.length > 0) { - address outbox = allowedOutboxList[0]; - IOutbox(outbox).setBridge(replacementBridge); - setOutboxImpl(outbox, false); - } + function allowedOutboxListLength() external view returns (uint256) { + return allowedOutboxList.length; } function isNitroReady() external view override returns (uint256) { diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 572d6f7a10..da9b6f279c 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -274,9 +274,12 @@ contract NitroMigrator is Ownable, IMessageProvider { } bridge.setOutbox(address(this), false); - address[] memory oldOutboxes = bridge.setReplacementBridge(IBridge(address(nitroBridge))); - for (uint256 i = 0; i < oldOutboxes.length; i++) { - nitroBridge.setOutbox(oldOutboxes[i], true); + uint256 numOutboxes = bridge.allowedOutboxListLength(); + for (uint256 i = 0; i < numOutboxes; i++) { + address currOutbox = bridge.allowedOutboxList(i); + IOutbox(currOutbox).setBridge(IBridge(address(nitroBridge))); + bridge.setOutbox(currOutbox, false); + nitroBridge.setOutbox(currOutbox, true); } // we don't enable sequencer inbox and the rollup event bridge in nitro bridge as they are already configured in the deployment diff --git a/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol b/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol index d12769ddd5..6fda65e116 100644 --- a/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/interfaces/IBridge.sol @@ -57,8 +57,6 @@ interface IBridge { function setOutbox(address inbox, bool enabled) external; - function setReplacementBridge(IBridge newReplacementBridge) external returns (address[] memory); - // View functions function activeOutbox() external view returns (address); From 67602fbb547e670a3944841fb5f514fbd8cc68a9 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Wed, 27 Jul 2022 12:50:15 +0100 Subject: [PATCH 69/86] add missing logic contracts to deploy --- .../scripts/deployClassicLogic.ts | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/packages/arb-bridge-eth/scripts/deployClassicLogic.ts b/packages/arb-bridge-eth/scripts/deployClassicLogic.ts index c353565bdc..4590d17911 100644 --- a/packages/arb-bridge-eth/scripts/deployClassicLogic.ts +++ b/packages/arb-bridge-eth/scripts/deployClassicLogic.ts @@ -6,11 +6,16 @@ import { Bridge__factory, Inbox__factory, SequencerInbox__factory, + Outbox__factory, + OldOutbox__factory, + Rollup__factory, } from '../build/types' if (!process.env['ETHERSCAN_API_KEY']) throw new Error('Please set ETHERSCAN_API_KEY') +const ADDR_ONE = '0x0000000000000000000000000000000000000001' + const main = async () => { const accounts: Signer[] = await hre.ethers.getSigners() @@ -19,6 +24,51 @@ const main = async () => { const Bridge = new Bridge__factory(accounts[0]) const Inbox = new Inbox__factory(accounts[0]) const SequencerInbox = new SequencerInbox__factory(accounts[0]) + const Outbox = new Outbox__factory(accounts[0]) + const OldOutbox = new OldOutbox__factory(accounts[0]) + const Rollup = new Rollup__factory(accounts[0]) + + console.log('deploying Rollup') + const rollup = await Rollup.deploy(1) + await rollup.deployed() + console.log(rollup.address) + + await hre.run('verify:verify', { + address: rollup.address, + constructorArguments: [], + }) + // rollup constructor makes this not initializable + // const rollupInit = await rollup.initialize(...) + // await rollupInit.wait() + + console.log('deploying OldOutbox') + const oldOutbox = await OldOutbox.deploy() + await oldOutbox.deployed() + console.log(oldOutbox.address) + + const oldOutboxInit = await oldOutbox.initialize(ADDR_ONE, ADDR_ONE) + await oldOutboxInit.wait() + + await hre.run('verify:verify', { + address: oldOutbox.address, + constructorArguments: [], + }) + + console.log('deploying Outbox') + const outbox = await Outbox.deploy() + await outbox.deployed() + console.log(outbox.address) + + const outboxInit = await outbox.initialize( + hre.ethers.constants.AddressZero, + hre.ethers.constants.AddressZero + ) + await outboxInit.wait() + + await hre.run('verify:verify', { + address: outbox.address, + constructorArguments: [], + }) console.log('deploying rollup admin') const rollupAdmin = await RollupAdmin.deploy() From 3d51bfa749955f4b3e76405364879abd6c9c682f Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Wed, 27 Jul 2022 12:55:35 +0100 Subject: [PATCH 70/86] fix outbox owner check to compare against rollup owner --- .../arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol | 3 ++- packages/arb-bridge-eth/contracts/bridge/Outbox.sol | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol b/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol index f4542c5a48..aca8cb5c8e 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol @@ -27,6 +27,7 @@ import "../Messages.sol"; import "../../libraries/MerkleLib.sol"; import "../../libraries/BytesLib.sol"; import "../../libraries/Cloneable.sol"; +import "../../rollup/Rollup.sol"; import "@openzeppelin/contracts/proxy/BeaconProxy.sol"; import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; @@ -261,7 +262,7 @@ contract OldOutbox is IOutbox, Cloneable { } function setBridge(IBridge newBridge) external override { - require(msg.sender == address(bridge), "NOT_BRIDGE"); + require(msg.sender == Rollup(payable(rollup)).owner(), "NOT_ROLLUP_OWNER"); bridge = newBridge; } diff --git a/packages/arb-bridge-eth/contracts/bridge/Outbox.sol b/packages/arb-bridge-eth/contracts/bridge/Outbox.sol index 16d60576bb..4a2a554007 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Outbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Outbox.sol @@ -25,6 +25,7 @@ import "./Messages.sol"; import "../libraries/MerkleLib.sol"; import "../libraries/BytesLib.sol"; import "../libraries/Cloneable.sol"; +import "../rollup/Rollup.sol"; import "@openzeppelin/contracts/proxy/BeaconProxy.sol"; import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; @@ -274,7 +275,7 @@ contract Outbox is IOutbox, Cloneable { } function setBridge(IBridge newBridge) external override { - require(msg.sender == address(bridge), "NOT_BRIDGE"); + require(msg.sender == Rollup(payable(rollup)).owner(), "NOT_ROLLUP_OWNER"); bridge = newBridge; } From 8f5850a023a10ba7608bd6944bb69cb64b3f8a89 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Wed, 27 Jul 2022 13:18:13 +0100 Subject: [PATCH 71/86] address review comments and use bridge owner instead of rollup --- packages/arb-bridge-eth/contracts/bridge/Bridge.sol | 7 ------- .../arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 8 +++++++- .../contracts/bridge/Old_Outbox/OldOutbox.sol | 3 ++- packages/arb-bridge-eth/contracts/bridge/Outbox.sol | 3 ++- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol index 5564de5f9c..112fd6da79 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol @@ -159,13 +159,6 @@ contract Bridge is OwnableUpgradeable, IBridge { } function isNitroReady() external view override returns (uint256) { - uint256 numOutboxes = allowedOutboxList.length; - for (uint256 i = 0; i < numOutboxes; i++) { - require( - IOutbox(allowedOutboxList[i]).isNitroReady() == 0xa4b1, - "OUTBOX_NOT_NITRO_READY" - ); - } return 0xa4b1; } } diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index da9b6f279c..8101b07114 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -161,6 +161,11 @@ contract NitroMigrator is Ownable, IMessageProvider { // this returns a different magic value so we can differentiate the user and admin facets require(_rollup.isNitroReady() == 0xa4b2, "ADMIN_ROLLUP_NOT_NITRO_READY"); + uint256 numOutboxes = bridge.allowedOutboxListLength(); + for (uint256 i = 0; i < numOutboxes; i++) { + address currOutbox = bridge.allowedOutboxList(i); + require(IOutbox(currOutbox).isNitroReady() == 0xa4b1, "OUTBOX_NOT_NITRO_READY"); + } require(_bridge.isNitroReady() == 0xa4b1, "BRIDGE_NOT_UPGRADED"); require(_inbox.isNitroReady() == 0xa4b1, "INBOX_NOT_UPGRADED"); require(_sequencerInbox.isNitroReady() == 0xa4b1, "SEQINBOX_NOT_UPGRADED"); @@ -276,7 +281,8 @@ contract NitroMigrator is Ownable, IMessageProvider { uint256 numOutboxes = bridge.allowedOutboxListLength(); for (uint256 i = 0; i < numOutboxes; i++) { - address currOutbox = bridge.allowedOutboxList(i); + // when we disable the list, it always shrinks by 1, so first index should always be a new one + address currOutbox = bridge.allowedOutboxList(0); IOutbox(currOutbox).setBridge(IBridge(address(nitroBridge))); bridge.setOutbox(currOutbox, false); nitroBridge.setOutbox(currOutbox, true); diff --git a/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol b/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol index aca8cb5c8e..9c2336695c 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol @@ -31,6 +31,7 @@ import "../../rollup/Rollup.sol"; import "@openzeppelin/contracts/proxy/BeaconProxy.sol"; import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; contract OldOutbox is IOutbox, Cloneable { using BytesLib for bytes; @@ -262,7 +263,7 @@ contract OldOutbox is IOutbox, Cloneable { } function setBridge(IBridge newBridge) external override { - require(msg.sender == Rollup(payable(rollup)).owner(), "NOT_ROLLUP_OWNER"); + require(msg.sender == OwnableUpgradeable(address(bridge)).owner(), "NOT_BRIDGE_OWNER"); bridge = newBridge; } diff --git a/packages/arb-bridge-eth/contracts/bridge/Outbox.sol b/packages/arb-bridge-eth/contracts/bridge/Outbox.sol index 4a2a554007..c7c7f9e45e 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Outbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Outbox.sol @@ -29,6 +29,7 @@ import "../rollup/Rollup.sol"; import "@openzeppelin/contracts/proxy/BeaconProxy.sol"; import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; contract Outbox is IOutbox, Cloneable { using BytesLib for bytes; @@ -275,7 +276,7 @@ contract Outbox is IOutbox, Cloneable { } function setBridge(IBridge newBridge) external override { - require(msg.sender == Rollup(payable(rollup)).owner(), "NOT_ROLLUP_OWNER"); + require(msg.sender == OwnableUpgradeable(address(bridge)).owner(), "NOT_BRIDGE_OWNER"); bridge = newBridge; } From aa13af0d1de8d08277a9b96fcf4ae92e9dac2d7c Mon Sep 17 00:00:00 2001 From: Harry Kalodner Date: Wed, 27 Jul 2022 22:04:37 -0400 Subject: [PATCH 72/86] Make migrator work behind proxy --- .../contracts/bridge/NitroMigrator.sol | 7 ++++--- .../deploy/NitroMigratorProxy.ts | 19 +++++++++++++++++++ .../deploy/NitroMigratorProxyAdmin.ts | 16 ++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 packages/arb-bridge-eth/deploy/NitroMigratorProxy.ts create mode 100644 packages/arb-bridge-eth/deploy/NitroMigratorProxyAdmin.ts diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 8101b07114..85f5264123 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -25,7 +25,7 @@ import "../rollup/facets/RollupAdmin.sol"; import "../rollup/RollupEventBridge.sol"; import "../rollup/RollupLib.sol"; import "../libraries/NitroReadyQuery.sol"; -import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/proxy/ProxyAdmin.sol"; import "@arbitrum/nitro-contracts/src/bridge/IBridge.sol" as INitroBridge; @@ -80,7 +80,7 @@ interface IArbOwner { function addChainOwner(address newOwner) external; } -contract NitroMigrator is Ownable, IMessageProvider { +contract NitroMigrator is OwnableUpgradeable, IMessageProvider { uint8 internal constant L1MessageType_shutdownForNitro = 128; Inbox public inbox; @@ -122,7 +122,8 @@ contract NitroMigrator is Ownable, IMessageProvider { } NitroMigrationSteps public latestCompleteStep; - constructor() public Ownable() { + function initialize() external initializer { + __Ownable_init(); latestCompleteStep = NitroMigrationSteps.Uninitialized; } diff --git a/packages/arb-bridge-eth/deploy/NitroMigratorProxy.ts b/packages/arb-bridge-eth/deploy/NitroMigratorProxy.ts new file mode 100644 index 0000000000..507f8e182f --- /dev/null +++ b/packages/arb-bridge-eth/deploy/NitroMigratorProxy.ts @@ -0,0 +1,19 @@ +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre + const { deploy } = deployments + const { deployer } = await getNamedAccounts() + + const NitroMigrator = await deployments.get('NitroMigrator') + const ProxyAdmin = await deployments.get('ProxyAdmin') + + await deploy('TransparentUpgradeableProxy', { + from: deployer, + args: [NitroMigrator.address, ProxyAdmin.address, '0x8129fc1c'], + }) +} + +module.exports = func +module.exports.tags = ['NitroMigratorProxy', 'live'] diff --git a/packages/arb-bridge-eth/deploy/NitroMigratorProxyAdmin.ts b/packages/arb-bridge-eth/deploy/NitroMigratorProxyAdmin.ts new file mode 100644 index 0000000000..c6cec37594 --- /dev/null +++ b/packages/arb-bridge-eth/deploy/NitroMigratorProxyAdmin.ts @@ -0,0 +1,16 @@ +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre + const { deploy } = deployments + const { deployer } = await getNamedAccounts() + + await deploy('ProxyAdmin', { + from: deployer, + args: [], + }) +} + +module.exports = func +module.exports.tags = ['NitroMigratorProxyAdmin', 'live'] From d977a83413985c5a400436e99c3b1c91eda62188 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Mon, 1 Aug 2022 15:56:55 +0100 Subject: [PATCH 73/86] add rollup nodes to isNitroReady check and use diff magic values --- .../contracts/bridge/Bridge.sol | 3 +- .../arb-bridge-eth/contracts/bridge/Inbox.sol | 3 +- .../contracts/bridge/NitroMigrator.sol | 52 ++---------- .../contracts/bridge/NitroMigratorUtil.sol | 82 +++++++++++++++++++ .../contracts/bridge/Old_Outbox/OldOutbox.sol | 4 +- .../contracts/bridge/Outbox.sol | 3 +- .../contracts/bridge/SequencerInbox.sol | 3 +- .../contracts/rollup/INodeFactory.sol | 4 + .../arb-bridge-eth/contracts/rollup/Node.sol | 5 ++ .../contracts/rollup/NodeFactory.sol | 2 +- .../contracts/rollup/facets/RollupAdmin.sol | 3 +- .../contracts/rollup/facets/RollupUser.sol | 3 +- 12 files changed, 113 insertions(+), 54 deletions(-) create mode 100644 packages/arb-bridge-eth/contracts/bridge/NitroMigratorUtil.sol diff --git a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol index 112fd6da79..5f944f5231 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Bridge.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Bridge.sol @@ -18,6 +18,7 @@ pragma solidity ^0.6.11; +import { NitroReadyMagicNums } from "./NitroMigratorUtil.sol"; import "./Inbox.sol"; import "./Outbox.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; @@ -159,6 +160,6 @@ contract Bridge is OwnableUpgradeable, IBridge { } function isNitroReady() external view override returns (uint256) { - return 0xa4b1; + return NitroReadyMagicNums.BRIDGE; } } diff --git a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol index 607835b160..6d860d6f3a 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Inbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Inbox.sol @@ -22,6 +22,7 @@ import "./interfaces/IInbox.sol"; import "./interfaces/IBridge.sol"; import "../rollup/Rollup.sol"; +import { NitroReadyMagicNums } from "./NitroMigratorUtil.sol"; import "./Messages.sol"; import "../libraries/Cloneable.sol"; import "../libraries/Whitelist.sol"; @@ -54,7 +55,7 @@ contract Inbox is IInbox, WhitelistConsumer, Cloneable { } function isNitroReady() external pure returns (uint256) { - return 0xa4b1; + return NitroReadyMagicNums.DELAYED_INBOX; } function shutdownForNitro() external returns (uint256 msgNum) { diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 85f5264123..260269f132 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -24,62 +24,19 @@ import "./Old_Outbox/OldOutbox.sol"; import "../rollup/facets/RollupAdmin.sol"; import "../rollup/RollupEventBridge.sol"; import "../rollup/RollupLib.sol"; +import "../rollup/Node.sol"; +import "../rollup/NodeFactory.sol"; import "../libraries/NitroReadyQuery.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/proxy/ProxyAdmin.sol"; import "@arbitrum/nitro-contracts/src/bridge/IBridge.sol" as INitroBridge; import "@arbitrum/nitro-contracts/src/bridge/IInbox.sol" as INitroInbox; +import { INitroRollup, IArbOwner, NitroReadyMagicNums } from "./NitroMigratorUtil.sol"; pragma solidity ^0.6.11; pragma experimental ABIEncoderV2; -interface INitroRollup { - struct GlobalState { - bytes32[2] bytes32Vals; - uint64[2] u64Vals; - } - - enum MachineStatus { - RUNNING, - FINISHED, - ERRORED, - TOO_FAR - } - - struct ExecutionState { - GlobalState globalState; - MachineStatus machineStatus; - } - struct NitroRollupAssertion { - ExecutionState beforeState; - ExecutionState afterState; - uint64 numBlocks; - } - - function bridge() external view returns (INitroBridge.IBridge); - - function inbox() external view returns (INitroInbox.IInbox); - - function setInbox(IInbox newInbox) external; - - function setOwner(address newOwner) external; - - function paused() external view returns (bool); - - function pause() external; - - function resume() external; - - function latestNodeCreated() external returns (uint64); - - function createNitroMigrationGenesis(NitroRollupAssertion calldata assertion) external; -} - -interface IArbOwner { - function addChainOwner(address newOwner) external; -} - contract NitroMigrator is OwnableUpgradeable, IMessageProvider { uint8 internal constant L1MessageType_shutdownForNitro = 128; @@ -162,6 +119,9 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { // this returns a different magic value so we can differentiate the user and admin facets require(_rollup.isNitroReady() == 0xa4b2, "ADMIN_ROLLUP_NOT_NITRO_READY"); + UpgradeableBeacon beacon = _rollup.nodeFactory().beacon(); + require(Node(address(beacon)).isNitroReady() == 0xa4b3, "NODE_BEACON_OLD"); + uint256 numOutboxes = bridge.allowedOutboxListLength(); for (uint256 i = 0; i < numOutboxes; i++) { address currOutbox = bridge.allowedOutboxList(i); diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigratorUtil.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigratorUtil.sol new file mode 100644 index 0000000000..bf3f3f9bb8 --- /dev/null +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigratorUtil.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: Apache-2.0 + +/* + * Copyright 2019-2021, Offchain Labs, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +pragma solidity ^0.6.11; + +pragma experimental ABIEncoderV2; + +import "./interfaces/IInbox.sol"; +import "@arbitrum/nitro-contracts/src/bridge/IBridge.sol" as INitroBridge; +import "@arbitrum/nitro-contracts/src/bridge/IInbox.sol" as INitroInbox; + +interface INitroRollup { + struct GlobalState { + bytes32[2] bytes32Vals; + uint64[2] u64Vals; + } + + enum MachineStatus { + RUNNING, + FINISHED, + ERRORED, + TOO_FAR + } + + struct ExecutionState { + GlobalState globalState; + MachineStatus machineStatus; + } + struct NitroRollupAssertion { + ExecutionState beforeState; + ExecutionState afterState; + uint64 numBlocks; + } + + function bridge() external view returns (INitroBridge.IBridge); + + function inbox() external view returns (INitroInbox.IInbox); + + function setInbox(IInbox newInbox) external; + + function setOwner(address newOwner) external; + + function paused() external view returns (bool); + + function pause() external; + + function resume() external; + + function latestNodeCreated() external returns (uint64); + + function createNitroMigrationGenesis(NitroRollupAssertion calldata assertion) external; +} + +interface IArbOwner { + function addChainOwner(address newOwner) external; +} + +/// @dev lib used since file level consts aren't available in this solc version +library NitroReadyMagicNums { + uint256 constant ROLLUP_USER = 0xa4b1; + uint256 constant ROLLUP_ADMIN = 0xa4b2; + uint256 constant NODE_BEACON = 0xa4b3; + uint256 constant OUTBOX = 0xa4b4; + uint256 constant BRIDGE = 0xa4b5; + uint256 constant DELAYED_INBOX = 0xa4b6; + uint256 constant SEQ_INBOX = 0xa4b7; +} diff --git a/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol b/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol index 9c2336695c..161f6cce07 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Old_Outbox/OldOutbox.sol @@ -33,6 +33,8 @@ import "@openzeppelin/contracts/proxy/BeaconProxy.sol"; import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import { NitroReadyMagicNums } from "../NitroMigratorUtil.sol"; + contract OldOutbox is IOutbox, Cloneable { using BytesLib for bytes; @@ -268,6 +270,6 @@ contract OldOutbox is IOutbox, Cloneable { } function isNitroReady() external pure override returns (uint256) { - return 0xa4b1; + return NitroReadyMagicNums.OUTBOX; } } diff --git a/packages/arb-bridge-eth/contracts/bridge/Outbox.sol b/packages/arb-bridge-eth/contracts/bridge/Outbox.sol index c7c7f9e45e..e650544f7d 100644 --- a/packages/arb-bridge-eth/contracts/bridge/Outbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/Outbox.sol @@ -21,6 +21,7 @@ pragma solidity ^0.6.11; import "./interfaces/IOutbox.sol"; import "./interfaces/IBridge.sol"; +import { NitroReadyMagicNums } from "./NitroMigratorUtil.sol"; import "./Messages.sol"; import "../libraries/MerkleLib.sol"; import "../libraries/BytesLib.sol"; @@ -281,6 +282,6 @@ contract Outbox is IOutbox, Cloneable { } function isNitroReady() external pure override returns (uint256) { - return 0xa4b1; + return NitroReadyMagicNums.OUTBOX; } } diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index 5c26a98205..1e34ca8a27 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -25,6 +25,7 @@ import "../libraries/Cloneable.sol"; import "../rollup/Rollup.sol"; import "../validator/IGasRefunder.sol"; +import { NitroReadyMagicNums } from "./NitroMigratorUtil.sol"; import "./Messages.sol"; interface OldRollup { @@ -99,7 +100,7 @@ contract SequencerInbox is ISequencerInbox, Cloneable { } function isNitroReady() external pure returns (uint256) { - return 0xa4b1; + return NitroReadyMagicNums.SEQ_INBOX; } /** diff --git a/packages/arb-bridge-eth/contracts/rollup/INodeFactory.sol b/packages/arb-bridge-eth/contracts/rollup/INodeFactory.sol index a6b252ed51..191d2bb789 100644 --- a/packages/arb-bridge-eth/contracts/rollup/INodeFactory.sol +++ b/packages/arb-bridge-eth/contracts/rollup/INodeFactory.sol @@ -19,6 +19,8 @@ // solhint-disable-next-line compiler-version pragma solidity >=0.6.9 <0.9.0; +import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; + interface INodeFactory { function createNode( bytes32 _stateHash, @@ -27,4 +29,6 @@ interface INodeFactory { uint256 _prev, uint256 _deadlineBlock ) external returns (address); + + function beacon() external view returns (UpgradeableBeacon); } diff --git a/packages/arb-bridge-eth/contracts/rollup/Node.sol b/packages/arb-bridge-eth/contracts/rollup/Node.sol index 526b0dcf8a..2774a0d52b 100644 --- a/packages/arb-bridge-eth/contracts/rollup/Node.sol +++ b/packages/arb-bridge-eth/contracts/rollup/Node.sol @@ -22,6 +22,7 @@ import "./INode.sol"; import "../libraries/Cloneable.sol"; import "./Rollup.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; +import { NitroReadyMagicNums } from "../bridge/NitroMigratorUtil.sol"; contract Node is Cloneable, INode { using SafeMath for uint256; @@ -145,6 +146,10 @@ contract Node is Cloneable, INode { require(block.number >= deadlineBlock(), "BEFORE_DEADLINE"); } + function isNitroReady() external pure returns (uint256) { + return NitroReadyMagicNums.NODE_BEACON; + } + /** * @notice Check whether the current block number has met or passed deadline for children of this node to be confirmed */ diff --git a/packages/arb-bridge-eth/contracts/rollup/NodeFactory.sol b/packages/arb-bridge-eth/contracts/rollup/NodeFactory.sol index 00cd0014d9..295ed0c712 100644 --- a/packages/arb-bridge-eth/contracts/rollup/NodeFactory.sol +++ b/packages/arb-bridge-eth/contracts/rollup/NodeFactory.sol @@ -25,7 +25,7 @@ import "@openzeppelin/contracts/proxy/BeaconProxy.sol"; import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; contract NodeFactory is INodeFactory { - UpgradeableBeacon public beacon; + UpgradeableBeacon public override beacon; constructor() public { address templateContract = address(new Node()); diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol index fcade8183d..96f0ca70d9 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupAdmin.sol @@ -5,6 +5,7 @@ pragma solidity ^0.6.11; import "../Rollup.sol"; import "../INode.sol"; import "./IRollupFacets.sol"; +import { NitroReadyMagicNums } from "../../bridge/NitroMigratorUtil.sol"; import "../../bridge/interfaces/IOutbox.sol"; import "../../bridge/interfaces/ISequencerInbox.sol"; import "../../libraries/Whitelist.sol"; @@ -413,6 +414,6 @@ contract RollupAdminFacet is RollupBase, IRollupAdmin { } function isNitroReady() external pure returns (uint256) { - return 0xa4b2; + return NitroReadyMagicNums.ROLLUP_ADMIN; } } diff --git a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol index b8a00a7cd9..7b092715aa 100644 --- a/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol +++ b/packages/arb-bridge-eth/contracts/rollup/facets/RollupUser.sol @@ -4,6 +4,7 @@ pragma solidity ^0.6.11; import "../Rollup.sol"; import "./IRollupFacets.sol"; +import { NitroReadyMagicNums } from "../../bridge/NitroMigratorUtil.sol"; abstract contract AbsRollupUserFacet is RollupBase, IRollupUser { function initialize(address _stakeToken) public virtual override; @@ -566,7 +567,7 @@ abstract contract AbsRollupUserFacet is RollupBase, IRollupUser { } function isNitroReady() external pure returns (uint256) { - return 0xa4b1; + return NitroReadyMagicNums.ROLLUP_USER; } function withdrawStakerFunds(address payable destination) external virtual returns (uint256); From b51c0bc2299a426d37f1b54758bf55c4f5e8e88e Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Mon, 1 Aug 2022 16:04:55 +0100 Subject: [PATCH 74/86] add nodes to logic deploy script --- .../arb-bridge-eth/scripts/deployClassicLogic.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/arb-bridge-eth/scripts/deployClassicLogic.ts b/packages/arb-bridge-eth/scripts/deployClassicLogic.ts index 4590d17911..cdc704f651 100644 --- a/packages/arb-bridge-eth/scripts/deployClassicLogic.ts +++ b/packages/arb-bridge-eth/scripts/deployClassicLogic.ts @@ -9,6 +9,7 @@ import { Outbox__factory, OldOutbox__factory, Rollup__factory, + Node__factory, } from '../build/types' if (!process.env['ETHERSCAN_API_KEY']) @@ -27,6 +28,7 @@ const main = async () => { const Outbox = new Outbox__factory(accounts[0]) const OldOutbox = new OldOutbox__factory(accounts[0]) const Rollup = new Rollup__factory(accounts[0]) + const Node = new Node__factory(accounts[0]) console.log('deploying Rollup') const rollup = await Rollup.deploy(1) @@ -142,6 +144,16 @@ const main = async () => { hre.ethers.constants.AddressZero ) await initSeqInbox.wait() + + console.log('deploying node') + const node = await Node.deploy() + await node.deployed() + console.log(node.address) + + await hre.run('verify:verify', { + address: node.address, + constructorArguments: [], + }) } main() From adfe15a645a038f521172135ee77f8f4a20eac26 Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:29:01 +0100 Subject: [PATCH 75/86] update migrator to use lib for magic value checks --- .../contracts/bridge/NitroMigrator.sol | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 260269f132..1198019eb7 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -112,24 +112,36 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { // so we deploy a new contract to ensure the query is dispatched to the user facet, not the admin NitroReadyQuery queryContract = new NitroReadyQuery(); require( - queryContract.isNitroReady(address(_rollup)) == 0xa4b1, + queryContract.isNitroReady(address(_rollup)) == NitroReadyMagicNums.ROLLUP_USER, "USER_ROLLUP_NOT_NITRO_READY" ); } // this returns a different magic value so we can differentiate the user and admin facets - require(_rollup.isNitroReady() == 0xa4b2, "ADMIN_ROLLUP_NOT_NITRO_READY"); + require( + _rollup.isNitroReady() == NitroReadyMagicNums.ROLLUP_ADMIN, + "ADMIN_ROLLUP_NOT_NITRO_READY" + ); UpgradeableBeacon beacon = _rollup.nodeFactory().beacon(); - require(Node(address(beacon)).isNitroReady() == 0xa4b3, "NODE_BEACON_OLD"); + require( + Node(address(beacon)).isNitroReady() == NitroReadyMagicNums.NODE_BEACON, + "NODE_BEACON_OLD" + ); uint256 numOutboxes = bridge.allowedOutboxListLength(); for (uint256 i = 0; i < numOutboxes; i++) { address currOutbox = bridge.allowedOutboxList(i); - require(IOutbox(currOutbox).isNitroReady() == 0xa4b1, "OUTBOX_NOT_NITRO_READY"); + require( + IOutbox(currOutbox).isNitroReady() == NitroReadyMagicNums.OUTBOX, + "OUTBOX_NOT_NITRO_READY" + ); } - require(_bridge.isNitroReady() == 0xa4b1, "BRIDGE_NOT_UPGRADED"); - require(_inbox.isNitroReady() == 0xa4b1, "INBOX_NOT_UPGRADED"); - require(_sequencerInbox.isNitroReady() == 0xa4b1, "SEQINBOX_NOT_UPGRADED"); + require(_bridge.isNitroReady() == NitroReadyMagicNums.BRIDGE, "BRIDGE_NOT_UPGRADED"); + require(_inbox.isNitroReady() == NitroReadyMagicNums.DELAYED_INBOX, "INBOX_NOT_UPGRADED"); + require( + _sequencerInbox.isNitroReady() == NitroReadyMagicNums.SEQ_INBOX, + "SEQINBOX_NOT_UPGRADED" + ); // we check that the new contracts that will receive permissions are actually contracts require(Address.isContract(address(nitroBridge)), "NITRO_BRIDGE_NOT_CONTRACT"); From d5ddb403b3bf208bfd89cb25149f25157e6b56ac Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:52:03 +0100 Subject: [PATCH 76/86] fix compiler interface version compatibility --- .../arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 7 ++----- .../arb-bridge-eth/contracts/rollup/INodeFactory.sol | 4 +--- packages/arb-bridge-eth/contracts/rollup/NodeFactory.sol | 9 +++++---- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index 1198019eb7..c3802420bf 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -122,11 +122,8 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { "ADMIN_ROLLUP_NOT_NITRO_READY" ); - UpgradeableBeacon beacon = _rollup.nodeFactory().beacon(); - require( - Node(address(beacon)).isNitroReady() == NitroReadyMagicNums.NODE_BEACON, - "NODE_BEACON_OLD" - ); + address beacon = _rollup.nodeFactory().beacon(); + require(Node(beacon).isNitroReady() == NitroReadyMagicNums.NODE_BEACON, "NODE_BEACON_OLD"); uint256 numOutboxes = bridge.allowedOutboxListLength(); for (uint256 i = 0; i < numOutboxes; i++) { diff --git a/packages/arb-bridge-eth/contracts/rollup/INodeFactory.sol b/packages/arb-bridge-eth/contracts/rollup/INodeFactory.sol index 191d2bb789..a5dbf975e5 100644 --- a/packages/arb-bridge-eth/contracts/rollup/INodeFactory.sol +++ b/packages/arb-bridge-eth/contracts/rollup/INodeFactory.sol @@ -19,8 +19,6 @@ // solhint-disable-next-line compiler-version pragma solidity >=0.6.9 <0.9.0; -import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; - interface INodeFactory { function createNode( bytes32 _stateHash, @@ -30,5 +28,5 @@ interface INodeFactory { uint256 _deadlineBlock ) external returns (address); - function beacon() external view returns (UpgradeableBeacon); + function beacon() external view returns (address); } diff --git a/packages/arb-bridge-eth/contracts/rollup/NodeFactory.sol b/packages/arb-bridge-eth/contracts/rollup/NodeFactory.sol index 295ed0c712..10a831b545 100644 --- a/packages/arb-bridge-eth/contracts/rollup/NodeFactory.sol +++ b/packages/arb-bridge-eth/contracts/rollup/NodeFactory.sol @@ -25,12 +25,13 @@ import "@openzeppelin/contracts/proxy/BeaconProxy.sol"; import "@openzeppelin/contracts/proxy/UpgradeableBeacon.sol"; contract NodeFactory is INodeFactory { - UpgradeableBeacon public override beacon; + address public override beacon; constructor() public { address templateContract = address(new Node()); - beacon = new UpgradeableBeacon(templateContract); - beacon.transferOwnership(msg.sender); + UpgradeableBeacon _beacon = new UpgradeableBeacon(templateContract); + _beacon.transferOwnership(msg.sender); + beacon = address(_beacon); } function createNode( @@ -40,7 +41,7 @@ contract NodeFactory is INodeFactory { uint256 _prev, uint256 _deadlineBlock ) external override returns (address) { - address clone = address(new BeaconProxy(address(beacon), "")); + address clone = address(new BeaconProxy(beacon, "")); Node(clone).initialize( msg.sender, _stateHash, From 1caad9d6fd7d3e1bbd53237473a54d1a57ebfe83 Mon Sep 17 00:00:00 2001 From: Harry Kalodner Date: Wed, 3 Aug 2022 01:25:07 -0400 Subject: [PATCH 77/86] Fix nitro migrator linting --- packages/arb-bridge-eth/package.json | 4 +- .../test/nitroMigrationManager.ts | 6 +- packages/arb-upgrades/package.json | 4 +- packages/tools/package.json | 4 +- yarn.lock | 166 +++++++++++------- 5 files changed, 109 insertions(+), 75 deletions(-) diff --git a/packages/arb-bridge-eth/package.json b/packages/arb-bridge-eth/package.json index 9e074b2af3..004fcb5bbc 100644 --- a/packages/arb-bridge-eth/package.json +++ b/packages/arb-bridge-eth/package.json @@ -65,8 +65,8 @@ "@types/chai": "^4.2.11", "@types/mocha": "^9.0.0", "@types/node": "^14.0.13", - "@typescript-eslint/eslint-plugin": "^4.29.0", - "@typescript-eslint/parser": "^4.29.0", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", "arb-upgrades": "0.0.1", "audit-ci": "^5.1.2", "chai": "^4.2.0", diff --git a/packages/arb-bridge-eth/test/nitroMigrationManager.ts b/packages/arb-bridge-eth/test/nitroMigrationManager.ts index 5a52d1d316..095320a978 100644 --- a/packages/arb-bridge-eth/test/nitroMigrationManager.ts +++ b/packages/arb-bridge-eth/test/nitroMigrationManager.ts @@ -46,8 +46,8 @@ export class NitroMigrationManager { public static async deploy( nitroDeployer: Signer, - log: boolean = true, - skipStep3Check: boolean = false + log = true, + skipStep3Check = false ) { if (log) console.log(`Proxy admin owner: ${await nitroDeployer.getAddress()}`) @@ -516,7 +516,7 @@ export class NitroMigrationManager { // wait until the node has confirmed the remaining nodes const rollupAddr = await this.migrator.rollup() const rollup = RollupUserFacet__factory.connect(rollupAddr, this.provider) - while (true) { + for (;;) { const latestConfirmed = await rollup.latestConfirmed() const latestNodeCreated = await rollup.latestNodeCreated() diff --git a/packages/arb-upgrades/package.json b/packages/arb-upgrades/package.json index 4402841d4b..db0d7448c4 100644 --- a/packages/arb-upgrades/package.json +++ b/packages/arb-upgrades/package.json @@ -13,8 +13,8 @@ "@types/fs-extra": "^9.0.1", "@types/prompts": "^2.0.14", "@types/yargs": "^17.0.2", - "@typescript-eslint/eslint-plugin": "^4.29.0", - "@typescript-eslint/parser": "^4.29.0", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", "fs-extra": "^10.0.0", "hardhat": "^2.6.1", "prompts": "^2.4.1", diff --git a/packages/tools/package.json b/packages/tools/package.json index 0aac5f813c..9cb5195791 100644 --- a/packages/tools/package.json +++ b/packages/tools/package.json @@ -15,8 +15,8 @@ "@ethersproject/wallet": "^5.4.0", "@types/fs-extra": "^9.0.1", "@types/yargs": "^17.0.2", - "@typescript-eslint/eslint-plugin": "^4.29.0", - "@typescript-eslint/parser": "^4.29.0", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", "fs-extra": "^10.0.0", "ts-node": "^10.2.1", "typescript": "^4.2.2", diff --git a/yarn.lock b/yarn.lock index 7069229659..f13662b8b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1130,7 +1130,7 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/json-schema@^7.0.7": +"@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -1287,75 +1287,85 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^4.29.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" - integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== +"@typescript-eslint/eslint-plugin@^5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.32.0.tgz#e27e38cffa4a61226327c874a7be965e9a861624" + integrity sha512-CHLuz5Uz7bHP2WgVlvoZGhf0BvFakBJKAD/43Ty0emn4wXWv5k01ND0C0fHcl/Im8Td2y/7h44E9pca9qAu2ew== dependencies: - "@typescript-eslint/experimental-utils" "4.33.0" - "@typescript-eslint/scope-manager" "4.33.0" - debug "^4.3.1" + "@typescript-eslint/scope-manager" "5.32.0" + "@typescript-eslint/type-utils" "5.32.0" + "@typescript-eslint/utils" "5.32.0" + debug "^4.3.4" functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.1.0" - semver "^7.3.5" + ignore "^5.2.0" + regexpp "^3.2.0" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" - integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== +"@typescript-eslint/parser@^5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.32.0.tgz#1de243443bc6186fb153b9e395b842e46877ca5d" + integrity sha512-IxRtsehdGV9GFQ35IGm5oKKR2OGcazUoiNBxhRV160iF9FoyuXxjY+rIqs1gfnd+4eL98OjeGnMpE7RF/NBb3A== dependencies: - "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" + "@typescript-eslint/scope-manager" "5.32.0" + "@typescript-eslint/types" "5.32.0" + "@typescript-eslint/typescript-estree" "5.32.0" + debug "^4.3.4" -"@typescript-eslint/parser@^4.29.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899" - integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== - dependencies: - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - debug "^4.3.1" - -"@typescript-eslint/scope-manager@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" - integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - -"@typescript-eslint/types@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" - integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== - -"@typescript-eslint/typescript-estree@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" - integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" +"@typescript-eslint/scope-manager@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.32.0.tgz#763386e963a8def470580cc36cf9228864190b95" + integrity sha512-KyAE+tUON0D7tNz92p1uetRqVJiiAkeluvwvZOqBmW9z2XApmk5WSMV9FrzOroAcVxJZB3GfUwVKr98Dr/OjOg== + dependencies: + "@typescript-eslint/types" "5.32.0" + "@typescript-eslint/visitor-keys" "5.32.0" + +"@typescript-eslint/type-utils@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz#45a14506fe3fb908600b4cef2f70778f7b5cdc79" + integrity sha512-0gSsIhFDduBz3QcHJIp3qRCvVYbqzHg8D6bHFsDMrm0rURYDj+skBK2zmYebdCp+4nrd9VWd13egvhYFJj/wZg== + dependencies: + "@typescript-eslint/utils" "5.32.0" + debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" - integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== +"@typescript-eslint/types@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.32.0.tgz#484273021eeeae87ddb288f39586ef5efeb6dcd8" + integrity sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ== + +"@typescript-eslint/typescript-estree@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.32.0.tgz#282943f34babf07a4afa7b0ff347a8e7b6030d12" + integrity sha512-ZVAUkvPk3ITGtCLU5J4atCw9RTxK+SRc6hXqLtllC2sGSeMFWN+YwbiJR9CFrSFJ3w4SJfcWtDwNb/DmUIHdhg== + dependencies: + "@typescript-eslint/types" "5.32.0" + "@typescript-eslint/visitor-keys" "5.32.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.32.0.tgz#eccb6b672b94516f1afc6508d05173c45924840c" + integrity sha512-W7lYIAI5Zlc5K082dGR27Fczjb3Q57ECcXefKU/f0ajM5ToM0P+N9NmJWip8GmGu/g6QISNT+K6KYB+iSHjXCQ== dependencies: - "@typescript-eslint/types" "4.33.0" - eslint-visitor-keys "^2.0.0" + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.32.0" + "@typescript-eslint/types" "5.32.0" + "@typescript-eslint/typescript-estree" "5.32.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/visitor-keys@5.32.0": + version "5.32.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.32.0.tgz#b9715d0b11fdb5dd10fd0c42ff13987470525394" + integrity sha512-S54xOHZgfThiZ38/ZGTgB2rqx51CMJ5MCfVT2IplK4Q7hgzGfe0nLzLCcenDnc/cSjP568hdeKfeDcBgqNHD/g== + dependencies: + "@typescript-eslint/types" "5.32.0" + eslint-visitor-keys "^3.3.0" "@ungap/promise-all-settled@1.1.2": version "1.1.2" @@ -3360,7 +3370,7 @@ debug@3.2.6: dependencies: ms "^2.1.1" -debug@4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: +debug@4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -3921,6 +3931,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + eslint@^5.6.0: version "5.16.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" @@ -5417,7 +5432,7 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.3: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -5925,7 +5940,7 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.8, ignore@^5.2.0: +ignore@^5.1.1, ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -6258,7 +6273,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -7065,6 +7080,13 @@ lru-cache@^3.2.0: dependencies: pseudomap "^1.0.1" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + lru-cache@^7.4.0: version "7.8.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.8.1.tgz#68ee3f4807a57d2ba185b7fd90827d5c21ce82bb" @@ -8847,7 +8869,7 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== -regexpp@^3.1.0: +regexpp@^3.1.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -9233,6 +9255,13 @@ semver@^7.0.0, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5: dependencies: lru-cache "^7.4.0" +semver@^7.3.7: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + semver@~5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -11461,6 +11490,11 @@ yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" From 75738db690c7a9c8b2b49cffe72b98a285a565c0 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Sun, 21 Aug 2022 09:58:09 -0500 Subject: [PATCH 78/86] Fix nitro migrator node upgraded check --- packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol | 4 ++-- packages/arb-bridge-eth/contracts/rollup/INode.sol | 2 ++ packages/arb-bridge-eth/contracts/rollup/Node.sol | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index c3802420bf..c95079f1fd 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -122,8 +122,8 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { "ADMIN_ROLLUP_NOT_NITRO_READY" ); - address beacon = _rollup.nodeFactory().beacon(); - require(Node(beacon).isNitroReady() == NitroReadyMagicNums.NODE_BEACON, "NODE_BEACON_OLD"); + INode node = _rollup.getNode(_rollup.latestNodeCreated()); + require(node.isNitroReady() == NitroReadyMagicNums.NODE_BEACON, "NODE_BEACON_OLD"); uint256 numOutboxes = bridge.allowedOutboxListLength(); for (uint256 i = 0; i < numOutboxes; i++) { diff --git a/packages/arb-bridge-eth/contracts/rollup/INode.sol b/packages/arb-bridge-eth/contracts/rollup/INode.sol index bc61eafdcf..f09f8aef77 100644 --- a/packages/arb-bridge-eth/contracts/rollup/INode.sol +++ b/packages/arb-bridge-eth/contracts/rollup/INode.sol @@ -62,4 +62,6 @@ interface INode { function requirePastDeadline() external view; function requirePastChildConfirmDeadline() external view; + + function isNitroReady() external pure returns (uint256); } diff --git a/packages/arb-bridge-eth/contracts/rollup/Node.sol b/packages/arb-bridge-eth/contracts/rollup/Node.sol index 2774a0d52b..eeb955ef41 100644 --- a/packages/arb-bridge-eth/contracts/rollup/Node.sol +++ b/packages/arb-bridge-eth/contracts/rollup/Node.sol @@ -146,7 +146,7 @@ contract Node is Cloneable, INode { require(block.number >= deadlineBlock(), "BEFORE_DEADLINE"); } - function isNitroReady() external pure returns (uint256) { + function isNitroReady() external pure override returns (uint256) { return NitroReadyMagicNums.NODE_BEACON; } From 81a1eba725abf68978a5f079ae6768bc6ec4d7ea Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Mon, 22 Aug 2022 07:57:34 -0500 Subject: [PATCH 79/86] Fix NitroMigrator deployment dependencies --- packages/arb-bridge-eth/deploy/NitroMigratorProxy.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/arb-bridge-eth/deploy/NitroMigratorProxy.ts b/packages/arb-bridge-eth/deploy/NitroMigratorProxy.ts index 507f8e182f..bb0600a06b 100644 --- a/packages/arb-bridge-eth/deploy/NitroMigratorProxy.ts +++ b/packages/arb-bridge-eth/deploy/NitroMigratorProxy.ts @@ -17,3 +17,4 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { module.exports = func module.exports.tags = ['NitroMigratorProxy', 'live'] +module.exports.dependencies = ['NitroMigrator', 'NitroMigratorProxyAdmin'] From 67fdf509f8e9f2e967ca710fedff222230bd9757 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Mon, 15 Aug 2022 09:09:07 -0500 Subject: [PATCH 80/86] Add ShutdownForNitroSet event to sequencer inbox --- packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol | 2 ++ .../contracts/bridge/interfaces/ISequencerInbox.sol | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol index 1e34ca8a27..8f950446eb 100644 --- a/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/SequencerInbox.sol @@ -160,12 +160,14 @@ contract SequencerInbox is ISequencerInbox, Cloneable { } isShutdownForNitro = true; + emit ShutdownForNitroSet(true); } function undoShutdownForNitro() external { require(Rollup(payable(rollup)).owner() == msg.sender, "ONLY_ROLLUP_OWNER"); require(isShutdownForNitro, "NOT_SHUTDOWN"); isShutdownForNitro = false; + emit ShutdownForNitroSet(false); } function forceInclusionImpl(uint256 _totalDelayedMessagesRead, bytes32 delayedAcc) internal { diff --git a/packages/arb-bridge-eth/contracts/bridge/interfaces/ISequencerInbox.sol b/packages/arb-bridge-eth/contracts/bridge/interfaces/ISequencerInbox.sol index 3311d47e5a..07b3995dc1 100644 --- a/packages/arb-bridge-eth/contracts/bridge/interfaces/ISequencerInbox.sol +++ b/packages/arb-bridge-eth/contracts/bridge/interfaces/ISequencerInbox.sol @@ -54,6 +54,7 @@ interface ISequencerInbox { event IsSequencerUpdated(address addr, bool isSequencer); event MaxDelayUpdated(uint256 newMaxDelayBlocks, uint256 newMaxDelaySeconds); + event ShutdownForNitroSet(bool shutdown); /// @notice DEPRECATED - look at MaxDelayUpdated for new updates // event MaxDelayBlocksUpdated(uint256 newValue); From ae068e1f075fe976cf5522877dd1a4476f2e6b88 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Thu, 25 Aug 2022 11:58:05 -0500 Subject: [PATCH 81/86] Add events to nitro migrator --- .../contracts/bridge/NitroMigrator.sol | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol index c95079f1fd..513f840cf1 100644 --- a/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol +++ b/packages/arb-bridge-eth/contracts/bridge/NitroMigrator.sol @@ -79,6 +79,17 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { } NitroMigrationSteps public latestCompleteStep; + event DeploymentConfigured(RollupAdminFacet classicRollup, INitroRollup nitroRollup); + event Step1Executed(); + event Step2Executed(uint256 finalNodeNum, bool destroyAlternatives, bool destroyChallenges); + event Step3Executed( + uint256 nitroGenesisBlockNum, + bytes32 nitroGenesisBlockHash, + bool skipCheck + ); + event ArbitraryCallExecuted(address destination, bytes data, uint256 amount); + event OtherContractOwnershipTransferred(Ownable ownable, address newOwner); + function initialize() external initializer { __Ownable_init(); latestCompleteStep = NitroMigrationSteps.Uninitialized; @@ -153,6 +164,7 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { } latestCompleteStep = NitroMigrationSteps.Step0; + emit DeploymentConfigured(rollup, nitroRollup); } /// @dev this assumes this contract owns the rollup/inboxes/bridge before this function is called (else it will revert) @@ -207,6 +219,7 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { // we don't remove permissions from gas refunder to current sequencer inbox as that can be handled independently from the upgrade latestCompleteStep = NitroMigrationSteps.Step1; + emit Step1Executed(); } /// @dev this assumes step 1 has executed succesfully and that a validator has made the final assertion that includes the inbox shutdownForNitro @@ -218,6 +231,7 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { require(latestCompleteStep == NitroMigrationSteps.Step1, "WRONG_STEP"); rollup.shutdownForNitro(finalNodeNum, destroyAlternatives, destroyChallenges); latestCompleteStep = NitroMigrationSteps.Step2; + emit Step2Executed(finalNodeNum, destroyAlternatives, destroyChallenges); } // CHRIS: TODO: remove skipCheck @@ -292,6 +306,7 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { nitroRollup.setOwner(address(nitroProxyAdminOwner)); latestCompleteStep = NitroMigrationSteps.Step3; + emit Step3Executed(nitroGenesisBlockNumber, nitroGenesisHash, skipCheck); } /// @dev allows the owner to do arbitrary calls. This is useful in case an unexpected event @@ -314,10 +329,12 @@ contract NitroMigrator is OwnableUpgradeable, IMessageProvider { revert(ptr, size) } } + emit ArbitraryCallExecuted(destination, data, amount); } function transferOtherContractOwnership(Ownable ownable, address newOwner) external onlyOwner { ownable.transferOwnership(newOwner); + emit OtherContractOwnershipTransferred(ownable, newOwner); } uint8 internal constant L2_MSG = 3; From 05c7349286f7481a4751d7f258515d74726da548 Mon Sep 17 00:00:00 2001 From: Harry Kalodner Date: Thu, 25 Aug 2022 17:56:24 -0400 Subject: [PATCH 82/86] Split deployment and verification of logic contracts --- packages/arb-bridge-eth/.eslintrc.js | 2 +- .../scripts/deployClassicLogic.ts | 77 ++++++++----------- .../scripts/verifyClassicLogic.ts | 67 ++++++++++++++++ 3 files changed, 98 insertions(+), 48 deletions(-) create mode 100644 packages/arb-bridge-eth/scripts/verifyClassicLogic.ts diff --git a/packages/arb-bridge-eth/.eslintrc.js b/packages/arb-bridge-eth/.eslintrc.js index 3811584e49..6df5ac38d3 100644 --- a/packages/arb-bridge-eth/.eslintrc.js +++ b/packages/arb-bridge-eth/.eslintrc.js @@ -31,7 +31,7 @@ module.exports = { ], parser: '@typescript-eslint/parser', parserOptions: { - project: 'tsconfig.json', + project: './tsconfig.json', }, extends: [ 'eslint:recommended', diff --git a/packages/arb-bridge-eth/scripts/deployClassicLogic.ts b/packages/arb-bridge-eth/scripts/deployClassicLogic.ts index cdc704f651..6f3d2250c7 100644 --- a/packages/arb-bridge-eth/scripts/deployClassicLogic.ts +++ b/packages/arb-bridge-eth/scripts/deployClassicLogic.ts @@ -1,5 +1,6 @@ import { Signer } from '@ethersproject/abstract-signer' import hre from 'hardhat' +import * as fs from 'fs' import { RollupAdminFacet__factory, RollupUserFacet__factory, @@ -12,12 +13,21 @@ import { Node__factory, } from '../build/types' -if (!process.env['ETHERSCAN_API_KEY']) - throw new Error('Please set ETHERSCAN_API_KEY') - const ADDR_ONE = '0x0000000000000000000000000000000000000001' -const main = async () => { +export interface LogicAddresses { + rollup: string + oldOutbox: string + outbox: string + rollupAdmin: string + rollupUser: string + bridge: string + inbox: string + sequencerInbox: string + node: string +} + +async function deployContracts() { const accounts: Signer[] = await hre.ethers.getSigners() const RollupAdmin = new RollupAdminFacet__factory(accounts[0]) @@ -35,10 +45,6 @@ const main = async () => { await rollup.deployed() console.log(rollup.address) - await hre.run('verify:verify', { - address: rollup.address, - constructorArguments: [], - }) // rollup constructor makes this not initializable // const rollupInit = await rollup.initialize(...) // await rollupInit.wait() @@ -51,11 +57,6 @@ const main = async () => { const oldOutboxInit = await oldOutbox.initialize(ADDR_ONE, ADDR_ONE) await oldOutboxInit.wait() - await hre.run('verify:verify', { - address: oldOutbox.address, - constructorArguments: [], - }) - console.log('deploying Outbox') const outbox = await Outbox.deploy() await outbox.deployed() @@ -67,31 +68,16 @@ const main = async () => { ) await outboxInit.wait() - await hre.run('verify:verify', { - address: outbox.address, - constructorArguments: [], - }) - console.log('deploying rollup admin') const rollupAdmin = await RollupAdmin.deploy() await rollupAdmin.deployed() console.log(rollupAdmin.address) - await hre.run('verify:verify', { - address: rollupAdmin.address, - constructorArguments: [], - }) - console.log('deploying rollup user') const rollupUser = await RollupUser.deploy() await rollupUser.deployed() console.log(rollupUser.address) - await hre.run('verify:verify', { - address: rollupUser.address, - constructorArguments: [], - }) - console.log('init rollup user') const initRU = await rollupUser.initialize(hre.ethers.constants.AddressZero) await initRU.wait() @@ -101,11 +87,6 @@ const main = async () => { await bridge.deployed() console.log(bridge.address) - await hre.run('verify:verify', { - address: bridge.address, - constructorArguments: [], - }) - console.log('init bridge') const initBridge = await bridge.initialize() await initBridge.wait() @@ -115,11 +96,6 @@ const main = async () => { await inbox.deployed() console.log(inbox.address) - await hre.run('verify:verify', { - address: inbox.address, - constructorArguments: [], - }) - console.log('init inbox') const initInbox = await inbox.initialize( hre.ethers.constants.AddressZero, @@ -132,11 +108,6 @@ const main = async () => { await sequencerInbox.deployed() console.log(sequencerInbox.address) - await hre.run('verify:verify', { - address: sequencerInbox.address, - constructorArguments: [], - }) - console.log('init seq inbox') const initSeqInbox = await sequencerInbox.initialize( hre.ethers.constants.AddressZero, @@ -150,10 +121,22 @@ const main = async () => { await node.deployed() console.log(node.address) - await hre.run('verify:verify', { - address: node.address, - constructorArguments: [], - }) + const addresses: LogicAddresses = { + rollup: rollup.address, + oldOutbox: oldOutbox.address, + outbox: outbox.address, + rollupAdmin: rollupAdmin.address, + rollupUser: rollupUser.address, + bridge: bridge.address, + inbox: inbox.address, + sequencerInbox: sequencerInbox.address, + node: node.address, + } + fs.writeFileSync('addresses.json', JSON.stringify(addresses)) +} + +const main = async () => { + await deployContracts() } main() diff --git a/packages/arb-bridge-eth/scripts/verifyClassicLogic.ts b/packages/arb-bridge-eth/scripts/verifyClassicLogic.ts new file mode 100644 index 0000000000..fe40cb19b1 --- /dev/null +++ b/packages/arb-bridge-eth/scripts/verifyClassicLogic.ts @@ -0,0 +1,67 @@ +import { LogicAddresses } from './deployClassicLogic' +import hre from 'hardhat' +import fs from 'fs' + +if (!process.env['ETHERSCAN_API_KEY']) + throw new Error('Please set ETHERSCAN_API_KEY') + +async function verifyContracts(addresses: LogicAddresses) { + await hre.run('verify:verify', { + address: addresses.rollup, + constructorArguments: [1], + contract: 'contracts/rollup/Rollup.sol:Rollup', + }) + + await hre.run('verify:verify', { + address: addresses.oldOutbox, + constructorArguments: [], + }) + + await hre.run('verify:verify', { + address: addresses.outbox, + constructorArguments: [], + }) + await hre.run('verify:verify', { + address: addresses.rollupAdmin, + constructorArguments: [], + }) + + await hre.run('verify:verify', { + address: addresses.rollupUser, + constructorArguments: [], + }) + + await hre.run('verify:verify', { + address: addresses.bridge, + constructorArguments: [], + }) + + await hre.run('verify:verify', { + address: addresses.inbox, + constructorArguments: [], + }) + + await hre.run('verify:verify', { + address: addresses.sequencerInbox, + constructorArguments: [], + }) + + await hre.run('verify:verify', { + address: addresses.node, + constructorArguments: [], + }) +} + +const main = async () => { + const addresses = JSON.parse( + fs.readFileSync('addresses.json').toString() + ) as LogicAddresses + await verifyContracts(addresses) +} + +main() + .then(() => console.log('done')) + .catch(err => { + console.error('error') + console.error(err) + }) From 362dcce1c54ae23f787a0031f62eac37dfa2cf32 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Sun, 28 Aug 2022 19:10:17 -0500 Subject: [PATCH 83/86] Batch validator confirmations when nitro migration begins --- .../arb-node-core/ethbridge/rollupWatcher.go | 9 + packages/arb-node-core/staker/validator.go | 44 +- .../arb-util/ethbridgecontracts/Bridge.go | 66 +- .../ethbridgecontracts/BridgeUtils.go | 2 +- .../arb-util/ethbridgecontracts/Challenge.go | 2 +- .../ethbridgecontracts/GasRefunder.go | 35 +- packages/arb-util/ethbridgecontracts/INode.go | 33 +- packages/arb-util/ethbridgecontracts/Inbox.go | 77 ++- .../arb-util/ethbridgecontracts/Outbox.go | 56 +- .../ethbridgecontracts/RollupAdminFacet.go | 562 +++++++++++++++++- .../ethbridgecontracts/RollupCreator.go | 2 +- .../ethbridgecontracts/RollupUserFacet.go | 97 ++- .../ethbridgecontracts/SequencerInbox.go | 242 +++++++- .../arb-util/ethbridgecontracts/Validator.go | 2 +- .../ethbridgecontracts/ValidatorUtils.go | 2 +- .../ValidatorWalletCreator.go | 2 +- .../ChallengeFactory.go | 2 +- .../ethbridgetestcontracts/ChallengeTester.go | 2 +- .../ethbridgetestcontracts/NodeFactory.go | 4 +- .../ethbridgetestcontracts/OneStepProof.go | 2 +- .../ethbridgetestcontracts/OneStepProof2.go | 2 +- .../OneStepProofHash.go | 2 +- .../RollupCreatorNoProxy.go | 2 +- .../RollupEventBridge.go | 2 +- 24 files changed, 1181 insertions(+), 70 deletions(-) diff --git a/packages/arb-node-core/ethbridge/rollupWatcher.go b/packages/arb-node-core/ethbridge/rollupWatcher.go index 6e040e9e03..6961ce3f20 100644 --- a/packages/arb-node-core/ethbridge/rollupWatcher.go +++ b/packages/arb-node-core/ethbridge/rollupWatcher.go @@ -330,3 +330,12 @@ func (r *RollupWatcher) GetNode(ctx context.Context, node core.NodeID) (*NodeWat } return NewNodeWatcher(nodeAddress, r.client, r.baseCallOpts) } + +func (r *RollupWatcher) IsShuttingDownForNitro(ctx context.Context) (bool, error) { + shuttingDownForNitro, err := r.con.ShutdownForNitroMode(r.getCallOpts(ctx)) + if err != nil { + logger.Warn().Err(err).Msg("assuming not shutting down for nitro as we failed to check") + return false, nil + } + return shuttingDownForNitro, nil +} diff --git a/packages/arb-node-core/staker/validator.go b/packages/arb-node-core/staker/validator.go index f54f4bf214..fa91f4db3c 100644 --- a/packages/arb-node-core/staker/validator.go +++ b/packages/arb-node-core/staker/validator.go @@ -136,6 +136,14 @@ func (v *Validator) resolveNextNode(ctx context.Context, info *ethbridge.StakerI if err != nil { return err } + latestNodeCreated, err := v.rollup.LatestNodeCreated(ctx) + if err != nil { + return err + } + shuttingDownForNitro, err := v.rollup.IsShuttingDownForNitro(ctx) + if err != nil { + return err + } switch confirmType { case ethbridge.CONFIRM_TYPE_INVALID: addr := v.wallet.Address() @@ -146,17 +154,35 @@ func (v *Validator) resolveNextNode(ctx context.Context, info *ethbridge.StakerI logger.Info().Int("node", int(unresolvedNodeIndex.Int64())).Msg("Rejecting node") return v.rollup.RejectNextNode(ctx, *addr) case ethbridge.CONFIRM_TYPE_VALID: - nodeInfo, err := v.rollup.RollupWatcher.LookupNode(ctx, unresolvedNodeIndex) - if err != nil { - return err + confCount := 1 + if shuttingDownForNitro { + confCount = 10 } - sendCount := new(big.Int).Sub(nodeInfo.Assertion.After.TotalSendCount, nodeInfo.Assertion.Before.TotalSendCount) - sends, err := v.lookup.GetSends(nodeInfo.Assertion.Before.TotalSendCount, sendCount) - if err != nil { - return errors.Wrap(err, "catching up to chain") + totalSendSize := 0 + for i := 0; i < confCount && unresolvedNodeIndex.Cmp(latestNodeCreated) <= 0; i++ { + nodeInfo, err := v.rollup.RollupWatcher.LookupNode(ctx, unresolvedNodeIndex) + if err != nil { + return err + } + sendCount := new(big.Int).Sub(nodeInfo.Assertion.After.TotalSendCount, nodeInfo.Assertion.Before.TotalSendCount) + sends, err := v.lookup.GetSends(nodeInfo.Assertion.Before.TotalSendCount, sendCount) + if err != nil { + return errors.Wrap(err, "catching up to chain") + } + for _, send := range sends { + totalSendSize += 32 + len(send) + } + if i > 0 && totalSendSize >= 64*1024 { + break + } + logger.Info().Int("node", int(unresolvedNodeIndex.Int64())).Msg("Confirming node") + err = v.rollup.ConfirmNextNode(ctx, nodeInfo.Assertion, sends) + if err != nil { + return err + } + unresolvedNodeIndex.Add(unresolvedNodeIndex, big.NewInt(1)) } - logger.Info().Int("node", int(unresolvedNodeIndex.Int64())).Msg("Confirming node") - return v.rollup.ConfirmNextNode(ctx, nodeInfo.Assertion, sends) + return nil default: return nil } diff --git a/packages/arb-util/ethbridgecontracts/Bridge.go b/packages/arb-util/ethbridgecontracts/Bridge.go index a07077a83c..8bdcb54ad7 100755 --- a/packages/arb-util/ethbridgecontracts/Bridge.go +++ b/packages/arb-util/ethbridgecontracts/Bridge.go @@ -30,8 +30,8 @@ var ( // BridgeMetaData contains all meta data concerning the Bridge contract. var BridgeMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"BridgeCallTriggered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"InboxToggle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"messageIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"beforeInboxAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"messageDataHash\",\"type\":\"bytes32\"}],\"name\":\"MessageDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"OutboxToggle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"activeOutbox\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allowedInboxList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\"}],\"name\":\"allowedInboxes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allowedOutboxList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\"}],\"name\":\"allowedOutboxes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"messageDataHash\",\"type\":\"bytes32\"}],\"name\":\"deliverMessageToInbox\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"executeCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inboxAccs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setInbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setOutbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506112de806100206000396000f3fe6080604052600436106100c85760003560e01c8063945e11471161007a578063945e1147146101f75780639e5d4c4914610221578063ab5d894314610336578063c29372de1461034b578063cee3d7281461037e578063d9dd67ab146103b9578063e45b7ce6146103e3578063f2fde38b1461041e576100c8565b806302bbfad1146100cd5780633dbcc8d114610114578063413b35bd14610129578063715018a6146101705780637ee94329146101875780638129fc1c146101cd5780638da5cb5b146101e2575b600080fd5b610102600480360360608110156100e357600080fd5b5060ff813516906001600160a01b036020820135169060400135610451565b60408051918252519081900360200190f35b34801561012057600080fd5b506101026104bf565b34801561013557600080fd5b5061015c6004803603602081101561014c57600080fd5b50356001600160a01b03166104c5565b604080519115158252519081900360200190f35b34801561017c57600080fd5b506101856104e6565b005b34801561019357600080fd5b506101b1600480360360208110156101aa57600080fd5b5035610580565b604080516001600160a01b039092168252519081900360200190f35b3480156101d957600080fd5b506101856105a7565b3480156101ee57600080fd5b506101b1610651565b34801561020357600080fd5b506101b16004803603602081101561021a57600080fd5b5035610660565b34801561022d57600080fd5b506102b36004803603606081101561024457600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561027457600080fd5b82018360208201111561028657600080fd5b803590602001918460018302840111640100000000831117156102a857600080fd5b50909250905061066d565b604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156102fa5781810151838201526020016102e2565b50505050905090810190601f1680156103275780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561034257600080fd5b506101b1610841565b34801561035757600080fd5b5061015c6004803603602081101561036e57600080fd5b50356001600160a01b0316610850565b34801561038a57600080fd5b50610185600480360360408110156103a157600080fd5b506001600160a01b0381351690602001351515610871565b3480156103c557600080fd5b50610102600480360360208110156103dc57600080fd5b5035610aea565b3480156103ef57600080fd5b506101856004803603604081101561040657600080fd5b506001600160a01b0381351690602001351515610b08565b34801561042a57600080fd5b506101856004803603602081101561044157600080fd5b50356001600160a01b0316610d7f565b3360009081526065602052604081206001015460ff166104a9576040805162461bcd60e51b815260206004820152600e60248201526d09c9ea8be8ca49e9abe929c849eb60931b604482015290519081900360640190fd5b6104b7848443423a87610e70565b949350505050565b606a5490565b6001600160a01b031660009081526066602052604090206001015460ff1690565b6104ee610f33565b6001600160a01b03166104ff610651565b6001600160a01b031614610548576040805162461bcd60e51b81526020600482018190526024820152600080516020611269833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b031690600080516020611289833981519152908390a3603380546001600160a01b0319169055565b6067818154811061058d57fe5b6000918252602090912001546001600160a01b0316905081565b600054610100900460ff16806105c057506105c0610f37565b806105ce575060005460ff16155b6106095760405162461bcd60e51b815260040180806020018281038252602e81526020018061123b602e913960400191505060405180910390fd5b600054610100900460ff16158015610634576000805460ff1961ff0019909116610100171660011790555b61063c610f48565b801561064e576000805461ff00191690555b50565b6033546001600160a01b031690565b6068818154811061058d57fe5b3360009081526066602052604081206001015460609060ff166106c9576040805162461bcd60e51b815260206004820152600f60248201526e09c9ea8be8ca49e9abe9eaaa8849eb608b1b604482015290519081900360640190fd5b8215610724576106e1866001600160a01b0316610fe5565b610724576040805162461bcd60e51b815260206004820152600f60248201526e1393d7d0d3d11157d05517d11154d5608a1b604482015290519081900360640190fd5b606980546001600160a01b0319811633179091556040516001600160a01b0391821691881690879087908790808383808284376040519201945060009350909150508083038185875af1925050503d806000811461079e576040519150601f19603f3d011682016040523d82523d6000602084013e6107a3565b606091505b50606980546001600160a01b0319166001600160a01b0385811691909117909155604080518a81526020810182815291810189905293965091945089169133917f2d9d115ef3e4a606d698913b1eae831a3cdfe20d9a83d48007b0526749c3d466918a918a918a9160608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a35094509492505050565b6069546001600160a01b031681565b6001600160a01b031660009081526065602052604090206001015460ff1690565b610879610f33565b6001600160a01b031661088a610651565b6001600160a01b0316146108d3576040805162461bcd60e51b81526020600482018190526024820152600080516020611269833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152606660209081526040918290206001810154835186151581529351919460ff9091169390927f49477e7356dbcb654ab85d7534b50126772d938130d1350e23e2540370c8dffa92918290030190a280801561093a5750825b8061094c57508015801561094c575082155b15610958575050610ae6565b82156109e757604080518082018252606880548252600160208084018281526001600160a01b038a16600081815260669093529582209451855551938201805460ff1916941515949094179093558154908101825591527fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977530180546001600160a01b0319169091179055610ae3565b6068805460001981019081106109f957fe5b6000918252602090912001548254606880546001600160a01b03909316929091908110610a2257fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160000154606660006068856000015481548110610a6a57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556068805480610a9a57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526066905260408120908155600101805460ff191690555b50505b5050565b606a8181548110610af757fe5b600091825260209091200154905081565b610b10610f33565b6001600160a01b0316610b21610651565b6001600160a01b031614610b6a576040805162461bcd60e51b81526020600482018190526024820152600080516020611269833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152606560209081526040918290206001810154835186151581529351919460ff9091169390927f6675ce8882cb71637de5903a193d218cc0544be9c0650cb83e0955f6aa2bf52192918290030190a2808015610bd15750825b80610be3575080158015610be3575082155b15610bef575050610ae6565b8215610c7e57604080518082018252606780548252600160208084018281526001600160a01b038a16600081815260659093529582209451855551938201805460ff1916941515949094179093558154908101825591527f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae0180546001600160a01b0319169091179055610ae3565b606780546000198101908110610c9057fe5b6000918252602090912001548254606780546001600160a01b03909316929091908110610cb957fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160000154606560006067856000015481548110610d0157fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556067805480610d3157fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526065905260408120908155600101805460ff1916905550505050565b610d87610f33565b6001600160a01b0316610d98610651565b6001600160a01b031614610de1576040805162461bcd60e51b81526020600482018190526024820152600080516020611269833981519152604482015290519081900360640190fd5b6001600160a01b038116610e265760405162461bcd60e51b81526004018080602001828103825260268152602001806112156026913960400191505060405180910390fd5b6033546040516001600160a01b0380841692169060008051602061128983398151915290600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b606a5460009081610e8689898989868a8a610feb565b905060008215610eae57606a6001840381548110610ea057fe5b906000526020600020015490505b606a610eba8284611061565b8154600181018355600092835260209283902001556040805133815260ff8d16928101929092526001600160a01b038b16828201526060820187905251829185917f23be8e12e420b5da9fb98d8102572f640fb3c11a0085060472dfc0ed194b3cf79181900360800190a3509098975050505050505050565b3390565b6000610f4230610fe5565b15905090565b600054610100900460ff1680610f615750610f61610f37565b80610f6f575060005460ff16155b610faa5760405162461bcd60e51b815260040180806020018281038252602e81526020018061123b602e913960400191505060405180910390fd5b600054610100900460ff16158015610fd5576000805460ff1961ff0019909116610100171660011790555b610fdd61108d565b61063c61112d565b3b151590565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6bffffffffffffffffffffffff19166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600054610100900460ff16806110a657506110a6610f37565b806110b4575060005460ff16155b6110ef5760405162461bcd60e51b815260040180806020018281038252602e81526020018061123b602e913960400191505060405180910390fd5b600054610100900460ff1615801561063c576000805460ff1961ff001990911661010017166001179055801561064e576000805461ff001916905550565b600054610100900460ff16806111465750611146610f37565b80611154575060005460ff16155b61118f5760405162461bcd60e51b815260040180806020018281038252602e81526020018061123b602e913960400191505060405180910390fd5b600054610100900460ff161580156111ba576000805460ff1961ff0019909116610100171660011790555b60006111c4610f33565b603380546001600160a01b0319166001600160a01b03831690811790915560405191925090600090600080516020611289833981519152908290a350801561064e576000805461ff00191690555056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220a38aa991fe7cf08f2acb1ab305d2972c008682f02b4d210d0832d8dc66d021ac64736f6c634300060b0033", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"BridgeCallTriggered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"InboxToggle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"messageIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"beforeInboxAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"messageDataHash\",\"type\":\"bytes32\"}],\"name\":\"MessageDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"OutboxToggle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"activeOutbox\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allowedInboxList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\"}],\"name\":\"allowedInboxes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allowedOutboxList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allowedOutboxListLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\"}],\"name\":\"allowedOutboxes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"messageDataHash\",\"type\":\"bytes32\"}],\"name\":\"deliverMessageToInbox\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"executeCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inboxAccs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isNitroReady\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"inbox\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setInbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"outbox\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setOutbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5061132a806100206000396000f3fe6080604052600436106100de5760003560e01c8063945e114711610085578063945e1147146102225780639e5d4c491461024c578063a8929e0b14610361578063ab5d894314610376578063c29372de1461038b578063cee3d728146103be578063d9dd67ab146103f9578063e45b7ce614610423578063f2fde38b1461045e576100de565b806301d8d0c1146100e357806302bbfad11461010a5780633dbcc8d11461013f578063413b35bd14610154578063715018a61461019b5780637ee94329146101b25780638129fc1c146101f85780638da5cb5b1461020d575b600080fd5b3480156100ef57600080fd5b506100f8610491565b60408051918252519081900360200190f35b6100f86004803603606081101561012057600080fd5b5060ff813516906001600160a01b036020820135169060400135610497565b34801561014b57600080fd5b506100f8610505565b34801561016057600080fd5b506101876004803603602081101561017757600080fd5b50356001600160a01b031661050b565b604080519115158252519081900360200190f35b3480156101a757600080fd5b506101b061052c565b005b3480156101be57600080fd5b506101dc600480360360208110156101d557600080fd5b50356105c6565b604080516001600160a01b039092168252519081900360200190f35b34801561020457600080fd5b506101b06105ed565b34801561021957600080fd5b506101dc610697565b34801561022e57600080fd5b506101dc6004803603602081101561024557600080fd5b50356106a6565b34801561025857600080fd5b506102de6004803603606081101561026f57600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561029f57600080fd5b8201836020820111156102b157600080fd5b803590602001918460018302840111640100000000831117156102d357600080fd5b5090925090506106b3565b604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561032557818101518382015260200161030d565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561036d57600080fd5b506100f8610887565b34801561038257600080fd5b506101dc61088d565b34801561039757600080fd5b50610187600480360360208110156103ae57600080fd5b50356001600160a01b031661089c565b3480156103ca57600080fd5b506101b0600480360360408110156103e157600080fd5b506001600160a01b03813516906020013515156108bd565b34801561040557600080fd5b506100f86004803603602081101561041c57600080fd5b5035610b36565b34801561042f57600080fd5b506101b06004803603604081101561044657600080fd5b506001600160a01b0381351690602001351515610b54565b34801561046a57600080fd5b506101b06004803603602081101561048157600080fd5b50356001600160a01b0316610dcb565b60685490565b3360009081526065602052604081206001015460ff166104ef576040805162461bcd60e51b815260206004820152600e60248201526d09c9ea8be8ca49e9abe929c849eb60931b604482015290519081900360640190fd5b6104fd848443423a87610ebc565b949350505050565b606a5490565b6001600160a01b031660009081526066602052604090206001015460ff1690565b610534610f7f565b6001600160a01b0316610545610697565b6001600160a01b03161461058e576040805162461bcd60e51b815260206004820181905260248201526000805160206112b5833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316906000805160206112d5833981519152908390a3603380546001600160a01b0319169055565b606781815481106105d357fe5b6000918252602090912001546001600160a01b0316905081565b600054610100900460ff16806106065750610606610f83565b80610614575060005460ff16155b61064f5760405162461bcd60e51b815260040180806020018281038252602e815260200180611287602e913960400191505060405180910390fd5b600054610100900460ff1615801561067a576000805460ff1961ff0019909116610100171660011790555b610682610f94565b8015610694576000805461ff00191690555b50565b6033546001600160a01b031690565b606881815481106105d357fe5b3360009081526066602052604081206001015460609060ff1661070f576040805162461bcd60e51b815260206004820152600f60248201526e09c9ea8be8ca49e9abe9eaaa8849eb608b1b604482015290519081900360640190fd5b821561076a57610727866001600160a01b0316611031565b61076a576040805162461bcd60e51b815260206004820152600f60248201526e1393d7d0d3d11157d05517d11154d5608a1b604482015290519081900360640190fd5b606980546001600160a01b0319811633179091556040516001600160a01b0391821691881690879087908790808383808284376040519201945060009350909150508083038185875af1925050503d80600081146107e4576040519150601f19603f3d011682016040523d82523d6000602084013e6107e9565b606091505b50606980546001600160a01b0319166001600160a01b0385811691909117909155604080518a81526020810182815291810189905293965091945089169133917f2d9d115ef3e4a606d698913b1eae831a3cdfe20d9a83d48007b0526749c3d466918a918a918a9160608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a35094509492505050565b61a4b590565b6069546001600160a01b031681565b6001600160a01b031660009081526065602052604090206001015460ff1690565b6108c5610f7f565b6001600160a01b03166108d6610697565b6001600160a01b03161461091f576040805162461bcd60e51b815260206004820181905260248201526000805160206112b5833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152606660209081526040918290206001810154835186151581529351919460ff9091169390927f49477e7356dbcb654ab85d7534b50126772d938130d1350e23e2540370c8dffa92918290030190a28080156109865750825b80610998575080158015610998575082155b156109a4575050610b32565b8215610a3357604080518082018252606880548252600160208084018281526001600160a01b038a16600081815260669093529582209451855551938201805460ff1916941515949094179093558154908101825591527fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977530180546001600160a01b0319169091179055610b2f565b606880546000198101908110610a4557fe5b6000918252602090912001548254606880546001600160a01b03909316929091908110610a6e57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160000154606660006068856000015481548110610ab657fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556068805480610ae657fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526066905260408120908155600101805460ff191690555b50505b5050565b606a8181548110610b4357fe5b600091825260209091200154905081565b610b5c610f7f565b6001600160a01b0316610b6d610697565b6001600160a01b031614610bb6576040805162461bcd60e51b815260206004820181905260248201526000805160206112b5833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152606560209081526040918290206001810154835186151581529351919460ff9091169390927f6675ce8882cb71637de5903a193d218cc0544be9c0650cb83e0955f6aa2bf52192918290030190a2808015610c1d5750825b80610c2f575080158015610c2f575082155b15610c3b575050610b32565b8215610cca57604080518082018252606780548252600160208084018281526001600160a01b038a16600081815260659093529582209451855551938201805460ff1916941515949094179093558154908101825591527f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae0180546001600160a01b0319169091179055610b2f565b606780546000198101908110610cdc57fe5b6000918252602090912001548254606780546001600160a01b03909316929091908110610d0557fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160000154606560006067856000015481548110610d4d57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556067805480610d7d57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526065905260408120908155600101805460ff1916905550505050565b610dd3610f7f565b6001600160a01b0316610de4610697565b6001600160a01b031614610e2d576040805162461bcd60e51b815260206004820181905260248201526000805160206112b5833981519152604482015290519081900360640190fd5b6001600160a01b038116610e725760405162461bcd60e51b81526004018080602001828103825260268152602001806112616026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216906000805160206112d583398151915290600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b606a5460009081610ed289898989868a8a611037565b905060008215610efa57606a6001840381548110610eec57fe5b906000526020600020015490505b606a610f0682846110ad565b8154600181018355600092835260209283902001556040805133815260ff8d16928101929092526001600160a01b038b16828201526060820187905251829185917f23be8e12e420b5da9fb98d8102572f640fb3c11a0085060472dfc0ed194b3cf79181900360800190a3509098975050505050505050565b3390565b6000610f8e30611031565b15905090565b600054610100900460ff1680610fad5750610fad610f83565b80610fbb575060005460ff16155b610ff65760405162461bcd60e51b815260040180806020018281038252602e815260200180611287602e913960400191505060405180910390fd5b600054610100900460ff16158015611021576000805460ff1961ff0019909116610100171660011790555b6110296110d9565b610682611179565b3b151590565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6bffffffffffffffffffffffff19166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600054610100900460ff16806110f257506110f2610f83565b80611100575060005460ff16155b61113b5760405162461bcd60e51b815260040180806020018281038252602e815260200180611287602e913960400191505060405180910390fd5b600054610100900460ff16158015610682576000805460ff1961ff0019909116610100171660011790558015610694576000805461ff001916905550565b600054610100900460ff16806111925750611192610f83565b806111a0575060005460ff16155b6111db5760405162461bcd60e51b815260040180806020018281038252602e815260200180611287602e913960400191505060405180910390fd5b600054610100900460ff16158015611206576000805460ff1961ff0019909116610100171660011790555b6000611210610f7f565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000906000805160206112d5833981519152908290a3508015610694576000805461ff00191690555056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a26469706673582212201386009389b68216b62c456fde88affad1ded7825aa5fdf97fcc0d0cc363645764736f6c634300060b0033", } // BridgeABI is the input ABI used to generate the binding from. @@ -325,6 +325,37 @@ func (_Bridge *BridgeCallerSession) AllowedOutboxList(arg0 *big.Int) (common.Add return _Bridge.Contract.AllowedOutboxList(&_Bridge.CallOpts, arg0) } +// AllowedOutboxListLength is a free data retrieval call binding the contract method 0x01d8d0c1. +// +// Solidity: function allowedOutboxListLength() view returns(uint256) +func (_Bridge *BridgeCaller) AllowedOutboxListLength(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "allowedOutboxListLength") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AllowedOutboxListLength is a free data retrieval call binding the contract method 0x01d8d0c1. +// +// Solidity: function allowedOutboxListLength() view returns(uint256) +func (_Bridge *BridgeSession) AllowedOutboxListLength() (*big.Int, error) { + return _Bridge.Contract.AllowedOutboxListLength(&_Bridge.CallOpts) +} + +// AllowedOutboxListLength is a free data retrieval call binding the contract method 0x01d8d0c1. +// +// Solidity: function allowedOutboxListLength() view returns(uint256) +func (_Bridge *BridgeCallerSession) AllowedOutboxListLength() (*big.Int, error) { + return _Bridge.Contract.AllowedOutboxListLength(&_Bridge.CallOpts) +} + // AllowedOutboxes is a free data retrieval call binding the contract method 0x413b35bd. // // Solidity: function allowedOutboxes(address outbox) view returns(bool) @@ -387,6 +418,37 @@ func (_Bridge *BridgeCallerSession) InboxAccs(arg0 *big.Int) ([32]byte, error) { return _Bridge.Contract.InboxAccs(&_Bridge.CallOpts, arg0) } +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() view returns(uint256) +func (_Bridge *BridgeCaller) IsNitroReady(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "isNitroReady") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() view returns(uint256) +func (_Bridge *BridgeSession) IsNitroReady() (*big.Int, error) { + return _Bridge.Contract.IsNitroReady(&_Bridge.CallOpts) +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() view returns(uint256) +func (_Bridge *BridgeCallerSession) IsNitroReady() (*big.Int, error) { + return _Bridge.Contract.IsNitroReady(&_Bridge.CallOpts) +} + // MessageCount is a free data retrieval call binding the contract method 0x3dbcc8d1. // // Solidity: function messageCount() view returns(uint256) diff --git a/packages/arb-util/ethbridgecontracts/BridgeUtils.go b/packages/arb-util/ethbridgecontracts/BridgeUtils.go index 2bf69d3a1c..786ebad122 100755 --- a/packages/arb-util/ethbridgecontracts/BridgeUtils.go +++ b/packages/arb-util/ethbridgecontracts/BridgeUtils.go @@ -31,7 +31,7 @@ var ( // BridgeUtilsMetaData contains all meta data concerning the BridgeUtils contract. var BridgeUtilsMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"delayedBridge\",\"type\":\"address\"},{\"internalType\":\"contractISequencerInbox\",\"name\":\"sequencerInbox\",\"type\":\"address\"}],\"name\":\"getCountsAndAccumulators\",\"outputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"counts\",\"type\":\"uint256[2]\"},{\"internalType\":\"bytes32[2]\",\"name\":\"accs\",\"type\":\"bytes32[2]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50610372806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806301ccad0214610030575b600080fd5b61005e6004803603604081101561004657600080fd5b506001600160a01b03813581169160200135166100c5565b6040518083600260200280838360005b8381101561008657818101518382015260200161006e565b5050505090500182600260200280838360005b838110156100b1578181015183820152602001610099565b505050509050019250505060405180910390f35b6100cd61031e565b6100d561031e565b6000846001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b15801561011057600080fd5b505afa158015610124573d6000803e3d6000fd5b505050506040513d602081101561013a57600080fd5b5051905080156101c0578083526040805163d9dd67ab60e01b81526000198301600482015290516001600160a01b0387169163d9dd67ab916024808301926020929190829003018186803b15801561019157600080fd5b505afa1580156101a5573d6000803e3d6000fd5b505050506040513d60208110156101bb57600080fd5b505182525b6000846001600160a01b031663d9b141ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101fb57600080fd5b505afa15801561020f573d6000803e3d6000fd5b505050506040513d602081101561022557600080fd5b50519050801561031557846001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b15801561026857600080fd5b505afa15801561027c573d6000803e3d6000fd5b505050506040513d602081101561029257600080fd5b50516020808601919091526040805163d9dd67ab60e01b81526000198401600482015290516001600160a01b0388169263d9dd67ab9260248082019391829003018186803b1580156102e357600080fd5b505afa1580156102f7573d6000803e3d6000fd5b505050506040513d602081101561030d57600080fd5b505160208401525b50509250929050565b6040518060400160405280600290602082028036833750919291505056fea26469706673582212200c0d468756a7ae89f98a65897cfb93b1dc8da1550726a7b112877c243689b69e64736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b50610372806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806301ccad0214610030575b600080fd5b61005e6004803603604081101561004657600080fd5b506001600160a01b03813581169160200135166100c5565b6040518083600260200280838360005b8381101561008657818101518382015260200161006e565b5050505090500182600260200280838360005b838110156100b1578181015183820152602001610099565b505050509050019250505060405180910390f35b6100cd61031e565b6100d561031e565b6000846001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b15801561011057600080fd5b505afa158015610124573d6000803e3d6000fd5b505050506040513d602081101561013a57600080fd5b5051905080156101c0578083526040805163d9dd67ab60e01b81526000198301600482015290516001600160a01b0387169163d9dd67ab916024808301926020929190829003018186803b15801561019157600080fd5b505afa1580156101a5573d6000803e3d6000fd5b505050506040513d60208110156101bb57600080fd5b505182525b6000846001600160a01b031663d9b141ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101fb57600080fd5b505afa15801561020f573d6000803e3d6000fd5b505050506040513d602081101561022557600080fd5b50519050801561031557846001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b15801561026857600080fd5b505afa15801561027c573d6000803e3d6000fd5b505050506040513d602081101561029257600080fd5b50516020808601919091526040805163d9dd67ab60e01b81526000198401600482015290516001600160a01b0388169263d9dd67ab9260248082019391829003018186803b1580156102e357600080fd5b505afa1580156102f7573d6000803e3d6000fd5b505050506040513d602081101561030d57600080fd5b505160208401525b50509250929050565b6040518060400160405280600290602082028036833750919291505056fea264697066735822122084168313ae9b6670092e4e5b5563c75807b9042b48f5eb70b0adc8e9739431b464736f6c634300060b0033", } // BridgeUtilsABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgecontracts/Challenge.go b/packages/arb-util/ethbridgecontracts/Challenge.go index a636c3d2b8..aae0d88962 100755 --- a/packages/arb-util/ethbridgecontracts/Challenge.go +++ b/packages/arb-util/ethbridgecontracts/Challenge.go @@ -31,7 +31,7 @@ var ( // ChallengeMetaData contains all meta data concerning the Challenge contract. var ChallengeMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[],\"name\":\"AsserterTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"challengeRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"challengedSegmentStart\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"challengedSegmentLength\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32[]\",\"name\":\"chainHashes\",\"type\":\"bytes32[]\"}],\"name\":\"Bisected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ChallengerTimedOut\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ContinuedExecutionProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"InitiatedChallenge\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"OneStepProofCompleted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"asserter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asserterTimeLeft\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_merkleNodes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"_merkleRoute\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengedSegmentStart\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengedSegmentLength\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_oldEndHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasUsedBefore\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_assertionRest\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"_chainHashes\",\"type\":\"bytes32[]\"}],\"name\":\"bisectExecution\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bridges\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeState\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengerTimeLeft\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"clearChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentResponder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentResponderTimeLeft\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"executors\",\"outputs\":[{\"internalType\":\"contractIOneStepProof\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIOneStepProof[]\",\"name\":\"_executors\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"_resultReceiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_executionHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_maxMessageCount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_asserter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_asserterTimeLeft\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengerTimeLeft\",\"type\":\"uint256\"},{\"internalType\":\"contractISequencerInbox\",\"name\":\"_sequencerBridge\",\"type\":\"address\"},{\"internalType\":\"contractIBridge\",\"name\":\"_delayedBridge\",\"type\":\"address\"}],\"name\":\"initializeChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastMoveBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_merkleNodes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"_merkleRoute\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengedSegmentStart\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengedSegmentLength\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_oldEndHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_initialMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[2]\",\"name\":\"_initialAccs\",\"type\":\"bytes32[2]\"},{\"internalType\":\"uint256[3]\",\"name\":\"_initialState\",\"type\":\"uint256[3]\"},{\"internalType\":\"bytes\",\"name\":\"_executionProof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_bufferProof\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"prover\",\"type\":\"uint8\"}],\"name\":\"oneStepProveExecution\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_merkleNodes\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"_merkleRoute\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengedSegmentStart\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengedSegmentLength\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_oldEndHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasUsedBefore\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_assertionRest\",\"type\":\"bytes32\"}],\"name\":\"proveContinuedExecution\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"turn\",\"outputs\":[{\"internalType\":\"enumChallenge.Turn\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506000805460ff1916600117905561217e8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063925f9a9611610092578063925f9a9614610285578063959792011461028d5780639a9e4f441461045e578063a3c4470514610466578063bb4af0b114610483578063deda41151461048b578063e0d42b8e14610517578063e87e3589146105ca578063f97a05df146105d2576100f5565b806214ebe7146100fa57806341e8510c14610104578063534db0e21461011e5780636f791d291461014257806370dea79a1461015e578063843d5a5c146101665780638a8cd2181461016e5780638b299903146101765780638e7b84c5146101a2575b600080fd5b6101026105ef565b005b61010c61064c565b60408051918252519081900360200190f35b610126610652565b604080516001600160a01b039092168252519081900360200190f35b61014a610661565b604080519115158252519081900360200190f35b61010261066b565b61010c6107c4565b6101266107ca565b61017e610859565b6040518082600281111561018e57fe5b60ff16815260200191505060405180910390f35b61010260048036036101008110156101b957600080fd5b810190602081018135600160201b8111156101d357600080fd5b8201836020820111156101e557600080fd5b803590602001918460208302840111600160201b8311171561020657600080fd5b9193909282359260208101359260408201359260608301359260808101359260a082013592909160e081019060c00135600160201b81111561024757600080fd5b82018360208201111561025957600080fd5b803590602001918460208302840111600160201b8311171561027a57600080fd5b509092509050610862565b61010c610e1e565b61010260048036036101c08110156102a457600080fd5b810190602081018135600160201b8111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460208302840111600160201b831117156102f157600080fd5b6040805160608181018352949693958335956020850135959385013594818101359460808201359460a08301949193919261014081019260e090910190600390839083908082843760009201919091525091949392602081019250359050600160201b81111561036057600080fd5b82018360208201111561037257600080fd5b803590602001918460018302840111600160201b8311171561039357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103e557600080fd5b8201836020820111156103f757600080fd5b803590602001918460018302840111600160201b8311171561041857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610e249050565b61010c6113cb565b6101266004803603602081101561047c57600080fd5b50356113d1565b6101266113ee565b610102600480360360e08110156104a157600080fd5b810190602081018135600160201b8111156104bb57600080fd5b8201836020820111156104cd57600080fd5b803590602001918460208302840111600160201b831117156104ee57600080fd5b919350915080359060208101359060408101359060608101359060808101359060a001356113fd565b610102600480360361014081101561052e57600080fd5b810190602081018135600160201b81111561054857600080fd5b82018360208201111561055a57600080fd5b803590602001918460208302840111600160201b8311171561057b57600080fd5b91935091506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166116f5565b61010c611846565b610126600480360360208110156105e857600080fd5b503561188c565b6004546001600160a01b03163314610641576040805162461bcd60e51b815260206004820152601060248201526f2727aa2fa922a9afa922a1a2a4ab22a960811b604482015290519081900360640190fd5b61064a336118b3565b565b600a5481565b6007546001600160a01b031681565b60005460ff165b90565b60006106826008544361193390919063ffffffff16565b905061068c611846565b81116040518060400160405280601081526020016f54494d454f55545f444541444c494e4560801b815250906107405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107055781810151838201526020016106ed565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506001600b5460ff16600281111561075457fe5b1415610790576040517f2b92a4b014281aa2424baba9ea60bf4f26833d1c1fbd873e51cd1a6caeef48f090600090a161078b611995565b6107c1565b6040517f4e1f1f06cf69d199fcdb4d87a5a92d5248ca6b540e9fc2d3698927c5002a236a90600090a16107c1611a12565b50565b600c5481565b60006001600b5460ff1660028111156107df57fe5b14156107f757506006546001600160a01b0316610668565b6002600b5460ff16600281111561080a57fe5b141561082257506007546001600160a01b0316610668565b6040805162461bcd60e51b81526020600482015260076024820152662727afaa2aa92760c91b604482015290519081900360640190fd5b600b5460ff1681565b61086a6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906108ed5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506108f6611846565b60085461090a90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b8152509061097d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060008282600019810181811061099057fe5b90506020020135146109dd57600186116109dd576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d213d49560ba1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b031663dc72a33b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2d57600080fd5b505afa158015610a41573d6000803e3d6000fd5b505050506040513d6020811015610a5757600080fd5b50519050610a658782611a6e565b6001018214610aa7576040805162461bcd60e51b815260206004820152600960248201526810d55517d0d3d5539560ba1b604482015290519081900360640190fd5b8583836000198101818110610ab857fe5b905060200201351415610afd576040805162461bcd60e51b815260206004820152600860248201526714d0535157d1539160c21b604482015290519081900360640190fd5b610b078585611a86565b83836000818110610b1457fe5b9050602002013514610b62576040805162461bcd60e51b81526020600482015260126024820152717365676d656e74207072652d6669656c647360701b604482015290519081900360640190fd5b600083838281610b6e57fe5b905060200201351415610bbc576040805162461bcd60e51b8152602060048201526011602482015270155394915050d21050931157d4d5105495607a1b604482015290519081900360640190fd5b610bcc888863ffffffff611ab216565b8510610c18576040805162461bcd60e51b81526020600482015260166024820152750d2dcecc2d8d2c840e6cacedacadce840d8cadccee8d60531b604482015290519081900360640190fd5b6000610c39898986866000818110610c2c57fe5b905060200201358a611b13565b9050610c4a600c54828e8e8e611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b81525090610cb75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000610cfa8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e92508d9150611b9f9050565b905080600c81905550807f0a2bdfea671da507e80b0cbae49dd25100a5bdacc5dff43a9163a3fcbd7c3c7d8b8b888860405180858152602001848152602001806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f191690920182900397509095505050505050a25060029150610d839050565b600b5460ff166002811115610d9457fe5b1415610dd657610dc1610db26008544361193390919063ffffffff16565b600a549063ffffffff61193316565b600a55600b805460ff19166001179055610e0e565b610dfd610dee6008544361193390919063ffffffff16565b6009549063ffffffff61193316565b600955600b805460ff191660021790555b5050436008555050505050505050565b60085481565b610e2c6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b81525090610eaf5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50610eb8611846565b600854610ecc90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b81525090610f3f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000806000610f4d61205b565b60018560ff1681548110610f5d57fe5b6000918252602090912001546040516323eed0eb60e11b81526001600160a01b03909116906347dda1d6906002908d908d908c908c90600481019060440186825b81546001600160a01b03168152600190910190602001808311610f9e57505085815260200184604080828437600081840152601f19601f8201169050808301925050508060200180602001838103835285818151815260200191508051906020019080838360005b8381101561101e578181015183820152602001611006565b50505050905090810190601f16801561104b5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561107e578181015183820152602001611066565b50505050905090810190601f1680156110ab5780820380516001836020036101000a031916815260200191505b5097505050505050505060c06040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060c081101561110657600080fd5b5080516020820151600554919550935060409091019150821115611165576040805162461bcd60e51b8152602060048201526011602482015270544f4f5f4d414e595f4d4553534147455360781b604482015290519081900360640190fd5b6111758d8d63ffffffff611ab216565b8851106111b4576040805162461bcd60e51b815260206004820152600860248201526713d4d417d0d3d39560c21b604482015290519081900360640190fd5b6111c48d8d63ffffffff611ab216565b6111e767ffffffffffffffff85168a60005b60200201519063ffffffff611ab216565b1015611226576040805162461bcd60e51b815260206004820152600960248201526813d4d417d4d213d49560ba1b604482015290519081900360640190fd5b611239893560208b01358a868686611ce5565b8b1415611279576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6112968d8d6112908d8d3560208f01358e88611d84565b8e611b13565b93505050506112aa600c54828f8f8f611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906113175760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506040517f117efdf1fdd8be5a6ff0fb3c32333d7033bbd9523924bd0d9ca28f43540516f590600090a1611349611db5565b506002600b5460ff16600281111561135d57fe5b14156113905761137b610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556113b9565b6113a8610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b50504360085550505050505050505050565b60095481565b600281600281106113de57fe5b01546001600160a01b0316905081565b6006546001600160a01b031681565b6114056107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906114885760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50611491611846565b6008546114a590439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b815250906115185760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060006115258383611a86565b9050600061153587878488611b13565b9050611546600c54828c8c8c611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906115b35760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506115c4878763ffffffff611ab216565b841015611603576040805162461bcd60e51b81526020600482015260086024820152671393d517d0d3d39560c21b604482015290519081900360640190fd5b84821415611644576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6040517ff62bb8ab32072c0ea3337f57276b8e66418eca0dfcc5e3b8aef4905d43e8f8ca90600090a1611675611db5565b5060029050600b5460ff16600281111561168b57fe5b14156116be576116a9610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556116e7565b6116d6610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b505043600855505050505050565b6000600b5460ff16600281111561170857fe5b146040518060400160405280600f81526020016e4348414c5f494e49545f535441544560881b8152509061177d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5061178a60018c8c612079565b50600480546001600160a01b03199081166001600160a01b038c8116919091179092556005899055600680548216898416179055600780549091168783161790556009859055600a849055600b805460ff19166002908117909155600c8a905543600855604080518082019091528483168152918316602083015261180f91816120dc565b506040517f7003482dc89fcecb9f14e280f21ee716bd54187f7f3b0ab5ed78f3648218f2de90600090a15050505050505050505050565b60006001600b5460ff16600281111561185b57fe5b141561186a5750600954610668565b6002600b5460ff16600281111561187d57fe5b14156108225750600a54610668565b6001818154811061189957fe5b6000918252602090912001546001600160a01b0316905081565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff16156119265760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50806001600160a01b0316ff5b60008282111561198a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6004805460075460065460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b505af1158015611a05573d6000803e3d6000fd5b5050505061064a336118b3565b6004805460065460075460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b600081831015611a7f57508161198f565b508061198f565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600082820183811015611b0c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b6000611b93848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250869250899150611dbc9050565b90951495945050505050565b82516000906000190160608167ffffffffffffffff81118015611bc157600080fd5b50604051908082528060200260200182016040528015611beb578160200160208202803683370190505b5090506000611bfa8584611e8a565b90506000869050611c3581838a600081518110611c1357fe5b60200260200101518b600181518110611c2857fe5b6020026020010151611b13565b83600081518110611c4257fe5b6020908102919091010152611c5d818363ffffffff611ab216565b9050611c698685611ea8565b915060015b84811015611ccf57611c9e82848b8481518110611c8757fe5b60200260200101518c8560010181518110611c2857fe5b848281518110611caa57fe5b6020908102919091010152611cc5828463ffffffff611ab216565b9150600101611c6e565b50611cd983611ebb565b98975050505050505050565b600080611d0e83600260200201518914611d00576001611d03565b60005b60ff168760016111d6565b90506000611d3884600360200201518914611d2a576001611d2d565b60005b60ff168860026111d6565b9050611d77611d5367ffffffffffffffff88168960006111d6565b602086015160408701516060880151611d72928a929091889088612010565b611a86565b9998505050505050505050565b8151815160208401516040850151600093611dab939092611d72928b92918b918b90612010565b9695505050505050565b6000600c55565b8251600090610100811115611dd057600080fd5b8260005b82811015611e805760028606611e2d57868181518110611df057fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150611e72565b81878281518110611e3a57fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101611dd4565b5095945050505050565b6000818381611e9557fe5b06828481611e9f57fe5b04019392505050565b6000818381611eb357fe5b049392505050565b6000815b600181511115611ff35760606002825160010181611ed957fe5b0467ffffffffffffffff81118015611ef057600080fd5b50604051908082528060200260200182016040528015611f1a578160200160208202803683370190505b50905060005b8151811015611feb578251816002026001011015611fb357828160020281518110611f4757fe5b6020026020010151838260020260010181518110611f6157fe5b6020026020010151604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120828281518110611fa257fe5b602002602001018181525050611fe3565b828160020281518110611fc257fe5b6020026020010151828281518110611fd657fe5b6020026020010181815250505b600101611f20565b509050611ebf565b8060008151811061200057fe5b6020026020010151915050919050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b60405180608001604052806004906020820280368337509192915050565b8280548282559060005260206000209081019282156120cc579160200282015b828111156120cc5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612099565b506120d8929150612124565b5090565b82600281019282156120cc579160200282015b828111156120cc57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ef565b61066891905b808211156120d85780546001600160a01b031916815560010161212a56fea264697066735822122004e3428e1101f2e9ca875b69bcd83c6c08a8ff949a012ca33e2e16dfff5819f564736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b506000805460ff1916600117905561217e8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063925f9a9611610092578063925f9a9614610285578063959792011461028d5780639a9e4f441461045e578063a3c4470514610466578063bb4af0b114610483578063deda41151461048b578063e0d42b8e14610517578063e87e3589146105ca578063f97a05df146105d2576100f5565b806214ebe7146100fa57806341e8510c14610104578063534db0e21461011e5780636f791d291461014257806370dea79a1461015e578063843d5a5c146101665780638a8cd2181461016e5780638b299903146101765780638e7b84c5146101a2575b600080fd5b6101026105ef565b005b61010c61064c565b60408051918252519081900360200190f35b610126610652565b604080516001600160a01b039092168252519081900360200190f35b61014a610661565b604080519115158252519081900360200190f35b61010261066b565b61010c6107c4565b6101266107ca565b61017e610859565b6040518082600281111561018e57fe5b60ff16815260200191505060405180910390f35b61010260048036036101008110156101b957600080fd5b810190602081018135600160201b8111156101d357600080fd5b8201836020820111156101e557600080fd5b803590602001918460208302840111600160201b8311171561020657600080fd5b9193909282359260208101359260408201359260608301359260808101359260a082013592909160e081019060c00135600160201b81111561024757600080fd5b82018360208201111561025957600080fd5b803590602001918460208302840111600160201b8311171561027a57600080fd5b509092509050610862565b61010c610e1e565b61010260048036036101c08110156102a457600080fd5b810190602081018135600160201b8111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460208302840111600160201b831117156102f157600080fd5b6040805160608181018352949693958335956020850135959385013594818101359460808201359460a08301949193919261014081019260e090910190600390839083908082843760009201919091525091949392602081019250359050600160201b81111561036057600080fd5b82018360208201111561037257600080fd5b803590602001918460018302840111600160201b8311171561039357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103e557600080fd5b8201836020820111156103f757600080fd5b803590602001918460018302840111600160201b8311171561041857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610e249050565b61010c6113cb565b6101266004803603602081101561047c57600080fd5b50356113d1565b6101266113ee565b610102600480360360e08110156104a157600080fd5b810190602081018135600160201b8111156104bb57600080fd5b8201836020820111156104cd57600080fd5b803590602001918460208302840111600160201b831117156104ee57600080fd5b919350915080359060208101359060408101359060608101359060808101359060a001356113fd565b610102600480360361014081101561052e57600080fd5b810190602081018135600160201b81111561054857600080fd5b82018360208201111561055a57600080fd5b803590602001918460208302840111600160201b8311171561057b57600080fd5b91935091506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166116f5565b61010c611846565b610126600480360360208110156105e857600080fd5b503561188c565b6004546001600160a01b03163314610641576040805162461bcd60e51b815260206004820152601060248201526f2727aa2fa922a9afa922a1a2a4ab22a960811b604482015290519081900360640190fd5b61064a336118b3565b565b600a5481565b6007546001600160a01b031681565b60005460ff165b90565b60006106826008544361193390919063ffffffff16565b905061068c611846565b81116040518060400160405280601081526020016f54494d454f55545f444541444c494e4560801b815250906107405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107055781810151838201526020016106ed565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506001600b5460ff16600281111561075457fe5b1415610790576040517f2b92a4b014281aa2424baba9ea60bf4f26833d1c1fbd873e51cd1a6caeef48f090600090a161078b611995565b6107c1565b6040517f4e1f1f06cf69d199fcdb4d87a5a92d5248ca6b540e9fc2d3698927c5002a236a90600090a16107c1611a12565b50565b600c5481565b60006001600b5460ff1660028111156107df57fe5b14156107f757506006546001600160a01b0316610668565b6002600b5460ff16600281111561080a57fe5b141561082257506007546001600160a01b0316610668565b6040805162461bcd60e51b81526020600482015260076024820152662727afaa2aa92760c91b604482015290519081900360640190fd5b600b5460ff1681565b61086a6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906108ed5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506108f6611846565b60085461090a90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b8152509061097d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060008282600019810181811061099057fe5b90506020020135146109dd57600186116109dd576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d213d49560ba1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b031663dc72a33b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2d57600080fd5b505afa158015610a41573d6000803e3d6000fd5b505050506040513d6020811015610a5757600080fd5b50519050610a658782611a6e565b6001018214610aa7576040805162461bcd60e51b815260206004820152600960248201526810d55517d0d3d5539560ba1b604482015290519081900360640190fd5b8583836000198101818110610ab857fe5b905060200201351415610afd576040805162461bcd60e51b815260206004820152600860248201526714d0535157d1539160c21b604482015290519081900360640190fd5b610b078585611a86565b83836000818110610b1457fe5b9050602002013514610b62576040805162461bcd60e51b81526020600482015260126024820152717365676d656e74207072652d6669656c647360701b604482015290519081900360640190fd5b600083838281610b6e57fe5b905060200201351415610bbc576040805162461bcd60e51b8152602060048201526011602482015270155394915050d21050931157d4d5105495607a1b604482015290519081900360640190fd5b610bcc888863ffffffff611ab216565b8510610c18576040805162461bcd60e51b81526020600482015260166024820152750d2dcecc2d8d2c840e6cacedacadce840d8cadccee8d60531b604482015290519081900360640190fd5b6000610c39898986866000818110610c2c57fe5b905060200201358a611b13565b9050610c4a600c54828e8e8e611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b81525090610cb75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000610cfa8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e92508d9150611b9f9050565b905080600c81905550807f0a2bdfea671da507e80b0cbae49dd25100a5bdacc5dff43a9163a3fcbd7c3c7d8b8b888860405180858152602001848152602001806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f191690920182900397509095505050505050a25060029150610d839050565b600b5460ff166002811115610d9457fe5b1415610dd657610dc1610db26008544361193390919063ffffffff16565b600a549063ffffffff61193316565b600a55600b805460ff19166001179055610e0e565b610dfd610dee6008544361193390919063ffffffff16565b6009549063ffffffff61193316565b600955600b805460ff191660021790555b5050436008555050505050505050565b60085481565b610e2c6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b81525090610eaf5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50610eb8611846565b600854610ecc90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b81525090610f3f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000806000610f4d61205b565b60018560ff1681548110610f5d57fe5b6000918252602090912001546040516323eed0eb60e11b81526001600160a01b03909116906347dda1d6906002908d908d908c908c90600481019060440186825b81546001600160a01b03168152600190910190602001808311610f9e57505085815260200184604080828437600081840152601f19601f8201169050808301925050508060200180602001838103835285818151815260200191508051906020019080838360005b8381101561101e578181015183820152602001611006565b50505050905090810190601f16801561104b5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561107e578181015183820152602001611066565b50505050905090810190601f1680156110ab5780820380516001836020036101000a031916815260200191505b5097505050505050505060c06040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060c081101561110657600080fd5b5080516020820151600554919550935060409091019150821115611165576040805162461bcd60e51b8152602060048201526011602482015270544f4f5f4d414e595f4d4553534147455360781b604482015290519081900360640190fd5b6111758d8d63ffffffff611ab216565b8851106111b4576040805162461bcd60e51b815260206004820152600860248201526713d4d417d0d3d39560c21b604482015290519081900360640190fd5b6111c48d8d63ffffffff611ab216565b6111e767ffffffffffffffff85168a60005b60200201519063ffffffff611ab216565b1015611226576040805162461bcd60e51b815260206004820152600960248201526813d4d417d4d213d49560ba1b604482015290519081900360640190fd5b611239893560208b01358a868686611ce5565b8b1415611279576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6112968d8d6112908d8d3560208f01358e88611d84565b8e611b13565b93505050506112aa600c54828f8f8f611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906113175760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506040517f117efdf1fdd8be5a6ff0fb3c32333d7033bbd9523924bd0d9ca28f43540516f590600090a1611349611db5565b506002600b5460ff16600281111561135d57fe5b14156113905761137b610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556113b9565b6113a8610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b50504360085550505050505050505050565b60095481565b600281600281106113de57fe5b01546001600160a01b0316905081565b6006546001600160a01b031681565b6114056107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906114885760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50611491611846565b6008546114a590439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b815250906115185760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060006115258383611a86565b9050600061153587878488611b13565b9050611546600c54828c8c8c611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906115b35760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506115c4878763ffffffff611ab216565b841015611603576040805162461bcd60e51b81526020600482015260086024820152671393d517d0d3d39560c21b604482015290519081900360640190fd5b84821415611644576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6040517ff62bb8ab32072c0ea3337f57276b8e66418eca0dfcc5e3b8aef4905d43e8f8ca90600090a1611675611db5565b5060029050600b5460ff16600281111561168b57fe5b14156116be576116a9610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556116e7565b6116d6610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b505043600855505050505050565b6000600b5460ff16600281111561170857fe5b146040518060400160405280600f81526020016e4348414c5f494e49545f535441544560881b8152509061177d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5061178a60018c8c612079565b50600480546001600160a01b03199081166001600160a01b038c8116919091179092556005899055600680548216898416179055600780549091168783161790556009859055600a849055600b805460ff19166002908117909155600c8a905543600855604080518082019091528483168152918316602083015261180f91816120dc565b506040517f7003482dc89fcecb9f14e280f21ee716bd54187f7f3b0ab5ed78f3648218f2de90600090a15050505050505050505050565b60006001600b5460ff16600281111561185b57fe5b141561186a5750600954610668565b6002600b5460ff16600281111561187d57fe5b14156108225750600a54610668565b6001818154811061189957fe5b6000918252602090912001546001600160a01b0316905081565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff16156119265760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50806001600160a01b0316ff5b60008282111561198a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6004805460075460065460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b505af1158015611a05573d6000803e3d6000fd5b5050505061064a336118b3565b6004805460065460075460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b600081831015611a7f57508161198f565b508061198f565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600082820183811015611b0c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b6000611b93848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250869250899150611dbc9050565b90951495945050505050565b82516000906000190160608167ffffffffffffffff81118015611bc157600080fd5b50604051908082528060200260200182016040528015611beb578160200160208202803683370190505b5090506000611bfa8584611e8a565b90506000869050611c3581838a600081518110611c1357fe5b60200260200101518b600181518110611c2857fe5b6020026020010151611b13565b83600081518110611c4257fe5b6020908102919091010152611c5d818363ffffffff611ab216565b9050611c698685611ea8565b915060015b84811015611ccf57611c9e82848b8481518110611c8757fe5b60200260200101518c8560010181518110611c2857fe5b848281518110611caa57fe5b6020908102919091010152611cc5828463ffffffff611ab216565b9150600101611c6e565b50611cd983611ebb565b98975050505050505050565b600080611d0e83600260200201518914611d00576001611d03565b60005b60ff168760016111d6565b90506000611d3884600360200201518914611d2a576001611d2d565b60005b60ff168860026111d6565b9050611d77611d5367ffffffffffffffff88168960006111d6565b602086015160408701516060880151611d72928a929091889088612010565b611a86565b9998505050505050505050565b8151815160208401516040850151600093611dab939092611d72928b92918b918b90612010565b9695505050505050565b6000600c55565b8251600090610100811115611dd057600080fd5b8260005b82811015611e805760028606611e2d57868181518110611df057fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150611e72565b81878281518110611e3a57fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101611dd4565b5095945050505050565b6000818381611e9557fe5b06828481611e9f57fe5b04019392505050565b6000818381611eb357fe5b049392505050565b6000815b600181511115611ff35760606002825160010181611ed957fe5b0467ffffffffffffffff81118015611ef057600080fd5b50604051908082528060200260200182016040528015611f1a578160200160208202803683370190505b50905060005b8151811015611feb578251816002026001011015611fb357828160020281518110611f4757fe5b6020026020010151838260020260010181518110611f6157fe5b6020026020010151604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120828281518110611fa257fe5b602002602001018181525050611fe3565b828160020281518110611fc257fe5b6020026020010151828281518110611fd657fe5b6020026020010181815250505b600101611f20565b509050611ebf565b8060008151811061200057fe5b6020026020010151915050919050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b60405180608001604052806004906020820280368337509192915050565b8280548282559060005260206000209081019282156120cc579160200282015b828111156120cc5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612099565b506120d8929150612124565b5090565b82600281019282156120cc579160200282015b828111156120cc57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ef565b61066891905b808211156120d85780546001600160a01b031916815560010161212a56fea2646970667358221220730f9074be73234957976483a3d9166828f711f999414d0055347cf9666d536964736f6c634300060b0033", } // ChallengeABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgecontracts/GasRefunder.go b/packages/arb-util/ethbridgecontracts/GasRefunder.go index 96b3a0e41d..550546303f 100755 --- a/packages/arb-util/ethbridgecontracts/GasRefunder.go +++ b/packages/arb-util/ethbridgecontracts/GasRefunder.go @@ -30,8 +30,8 @@ var ( // GasRefunderMetaData contains all meta data concerning the GasRefunder contract. var GasRefunderMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumGasRefunder.CommonParameterKey\",\"name\":\"parameter\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"CommonParameterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"ContractAllowedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"DisallowerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"refundee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enumGasRefunder.RefundDenyReason\",\"name\":\"reason\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"RefundGasCostsDenied\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"refundee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountPaid\",\"type\":\"uint256\"}],\"name\":\"RefundedGasCosts\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"RefundeeAllowedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"name\":\"allowContracts\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"name\":\"allowRefundees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedContracts\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedRefundees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"commonParams\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"maxRefundeeBalance\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"extraGasMargin\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"calldataCost\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"maxGasTip\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxGasCost\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"maxSingleGasUsage\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"name\":\"disallowContracts\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"name\":\"disallowRefundees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disallower\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastContractRefund\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"refundee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"calldataSize\",\"type\":\"uint256\"}],\"name\":\"onGasSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newValue\",\"type\":\"uint8\"}],\"name\":\"setCalldataCost\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setDisallower\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newValue\",\"type\":\"uint32\"}],\"name\":\"setExtraGasMargin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newValue\",\"type\":\"uint64\"}],\"name\":\"setMaxGasCost\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newValue\",\"type\":\"uint64\"}],\"name\":\"setMaxGasTip\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newValue\",\"type\":\"uint128\"}],\"name\":\"setMaxRefundeeBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newValue\",\"type\":\"uint32\"}],\"name\":\"setMaxSingleGasUsage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x608060405234801561001057600080fd5b5061001a336100a5565b6040805160c08101825260008152610fa06020820152600c9181019190915263773594006060820152641bf08eb0006080820152621e848060a090910152600580546001600160e81b03191678773594000c00000fa000000000000000000000000000000000179055600680546001600160601b0319166a1e84800000001bf08eb0001790556100f5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61129e806101046000396000f3fe60806040526004361061012e5760003560e01c8063bffe1780116100ab578063e52074531161006f578063e520745314610433578063efe12b0114610453578063f1e845ca14610473578063f2fde38b14610493578063f3fef3a3146104b3578063f52128eb146104d357600080fd5b8063bffe178014610306578063ca10129514610326578063cd499da314610346578063d513894814610366578063e3db8a491461041357600080fd5b80637edddf45116100f25780637edddf451461022e57806386b988951461024e5780638da5cb5b1461026e578063a89d21731461029b578063bddaf01d146102cb57600080fd5b806325416bc9146101725780632ccb03f214610194578063500de431146101b457806351e0e26b146101d4578063715018a61461021957600080fd5b3661016d57604080513381523460208201527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4910160405180910390a1005b600080fd5b34801561017e57600080fd5b5061019261018d366004611032565b6104f3565b005b3480156101a057600080fd5b506101926101af3660046110f5565b61053b565b3480156101c057600080fd5b506101926101cf3660046110cf565b6105b7565b3480156101e057600080fd5b506102046101ef366004610fb4565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561022557600080fd5b5061019261062b565b34801561023a57600080fd5b506101926102493660046110cf565b610666565b34801561025a57600080fd5b506101926102693660046110f5565b6106ba565b34801561027a57600080fd5b50610283610715565b6040516001600160a01b039091168152602001610210565b3480156102a757600080fd5b506102046102b6366004610fb4565b60026020526000908152604090205460ff1681565b3480156102d757600080fd5b506102f86102e6366004610fb4565b60036020526000908152604090205481565b604051908152602001610210565b34801561031257600080fd5b5061019261032136600461111e565b610724565b34801561033257600080fd5b50610192610341366004611032565b61078e565b34801561035257600080fd5b50610192610361366004611032565b6107c9565b34801561037257600080fd5b506005546006546103c5916001600160801b0381169163ffffffff600160801b830481169260ff600160a01b820416926001600160401b03600160a81b90920482169291811691600160401b9091041686565b604080516001600160801b03909716875263ffffffff958616602088015260ff909416938601939093526001600160401b0391821660608601521660808401521660a082015260c001610210565b34801561041f57600080fd5b5061020461042e366004610ffd565b610822565b34801561043f57600080fd5b5061019261044e366004611032565b610b35565b34801561045f57600080fd5b50600454610283906001600160a01b031681565b34801561047f57600080fd5b5061019261048e366004610fb4565b610b8e565b34801561049f57600080fd5b506101926104ae366004610fb4565b610c07565b3480156104bf57600080fd5b506101926104ce366004610fd1565b610ca7565b3480156104df57600080fd5b506101926104ee3660046110a6565b610db9565b336104fc610715565b6001600160a01b03161461052b5760405162461bcd60e51b815260040161052290611141565b60405180910390fd5b61053782826001610e2c565b5050565b33610544610715565b6001600160a01b03161461056a5760405162461bcd60e51b815260040161052290611141565b6006805467ffffffffffffffff19166001600160401b03831617905560045b6040516001600160401b0383168152600080516020611249833981519152906020015b60405180910390a250565b336105c0610715565b6001600160a01b0316146105e65760405162461bcd60e51b815260040161052290611141565b6006805463ffffffff60401b1916600160401b63ffffffff84160217905560055b60405163ffffffff83168152600080516020611249833981519152906020016105ac565b33610634610715565b6001600160a01b03161461065a5760405162461bcd60e51b815260040161052290611141565b6106646000610ecb565b565b3361066f610715565b6001600160a01b0316146106955760405162461bcd60e51b815260040161052290611141565b6005805463ffffffff60801b1916600160801b63ffffffff8416021790556001610607565b336106c3610715565b6001600160a01b0316146106e95760405162461bcd60e51b815260040161052290611141565b6005805467ffffffffffffffff60a81b1916600160a81b6001600160401b038416021790556003610589565b6000546001600160a01b031690565b3361072d610715565b6001600160a01b0316146107535760405162461bcd60e51b815260040161052290611141565b6005805460ff60a01b1916600160a01b60ff841602179055600260405160ff83168152600080516020611249833981519152906020016105ac565b33610797610715565b6001600160a01b0316146107bd5760405162461bcd60e51b815260040161052290611141565b61053782826001610f1b565b6107d1610715565b6001600160a01b0316336001600160a01b031614806107fa57506004546001600160a01b031633145b6108165760405162461bcd60e51b815260040161052290611176565b61053782826000610e2c565b6000805a9050478061087c5760045b60405186815233906001600160a01b038916907f2b8ae00e22d9eaf5a92820a22b947c007aee773fa36502ad7a1c9a464ab4932b9060200160405180910390a4600092505050610b2e565b3360009081526001602052604090205460ff1661089a576000610831565b6001600160a01b03861660009081526002602052604090205460ff166108c1576001610831565b336000908152600360205260409020544314156108df576002610831565b33600090815260036020526040812043905560055461090e90600160a81b90046001600160401b03164861119e565b9050803a101561091b57503a5b6006546001600160401b03161580159061093f57506006546001600160401b031681115b1561095257506006546001600160401b03165b6005546006546001600160a01b03891631916001600160801b03811691600160401b900463ffffffff169061099190600160a01b900460ff16896111b6565b6005546109ab90600160801b900463ffffffff168861119e565b6109b5919061119e565b6109bf908a61119e565b98505a6109cc908a6111d5565b985080158015906109dc57508089115b156109e5578098505b60006109f18a866111b6565b90508215801590610a0a575082610a08828661119e565b115b15610a765782841115610a695760036040518b815233906001600160a01b038e16907f2b8ae00e22d9eaf5a92820a22b947c007aee773fa36502ad7a1c9a464ab4932b9060200160405180910390a46000975050505050505050610b2e565b610a7384846111d5565b90505b85811115610a815750845b6040516001600160a01b038c16908290600081818185875af1925050503d8060008114610aca576040519150601f19603f3d011682016040523d82523d6000602084013e610acf565b606091505b5050604080518c8152602081018890529081018390529098508815159033906001600160a01b038e16907fd0224505f828ccfcbc56ca0590d97442e239a7aa770f712948fd6388356b20de9060600160405180910390a4505050505050505b9392505050565b610b3d610715565b6001600160a01b0316336001600160a01b03161480610b6657506004546001600160a01b031633145b610b825760405162461bcd60e51b815260040161052290611176565b61053782826000610f1b565b33610b97610715565b6001600160a01b031614610bbd5760405162461bcd60e51b815260040161052290611141565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fc388cec0895ad7ee4635898ec92207ca48d42256d4355f7042efef62c368a97990600090a250565b33610c10610715565b6001600160a01b031614610c365760405162461bcd60e51b815260040161052290611141565b6001600160a01b038116610c9b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610522565b610ca481610ecb565b50565b33610cb0610715565b6001600160a01b031614610cd65760405162461bcd60e51b815260040161052290611141565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610d23576040519150601f19603f3d011682016040523d82523d6000602084013e610d28565b606091505b5050905080610d6b5760405162461bcd60e51b815260206004820152600f60248201526e15d2551211149055d7d19052531151608a1b6044820152606401610522565b604080513381526001600160a01b03851660208201529081018390527fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb9060600160405180910390a1505050565b33610dc2610715565b6001600160a01b031614610de85760405162461bcd60e51b815260040161052290611141565b600580546001600160801b0319166001600160801b03831617905560006040516001600160801b0383168152600080516020611249833981519152906020016105ac565b60005b82811015610ec5576000848483818110610e4b57610e4b61121d565b9050602002016020810190610e609190610fb4565b6001600160a01b038116600081815260016020526040808220805460ff19168815159081179091559051939450927fb0918cd965657b8d231f8adba328fa810b6d61d800de9c795d40eb3623498c019190a35080610ebd816111ec565b915050610e2f565b50505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b82811015610ec5576000848483818110610f3a57610f3a61121d565b9050602002016020810190610f4f9190610fb4565b6001600160a01b038116600081815260026020526040808220805460ff19168815159081179091559051939450927ff544cca9d5484bfd447775bd759d12d53f1aa7c5f770be82c55070798ff9c63e9190a35080610fac816111ec565b915050610f1e565b600060208284031215610fc657600080fd5b8135610b2e81611233565b60008060408385031215610fe457600080fd5b8235610fef81611233565b946020939093013593505050565b60008060006060848603121561101257600080fd5b833561101d81611233565b95602085013595506040909401359392505050565b6000806020838503121561104557600080fd5b82356001600160401b038082111561105c57600080fd5b818501915085601f83011261107057600080fd5b81358181111561107f57600080fd5b8660208260051b850101111561109457600080fd5b60209290920196919550909350505050565b6000602082840312156110b857600080fd5b81356001600160801b0381168114610b2e57600080fd5b6000602082840312156110e157600080fd5b813563ffffffff81168114610b2e57600080fd5b60006020828403121561110757600080fd5b81356001600160401b0381168114610b2e57600080fd5b60006020828403121561113057600080fd5b813560ff81168114610b2e57600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b600082198211156111b1576111b1611207565b500190565b60008160001904831182151516156111d0576111d0611207565b500290565b6000828210156111e7576111e7611207565b500390565b600060001982141561120057611200611207565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0381168114610ca457600080fdfeda79b6b81f905f788560507c685a42d5a8ab209ee26538cbcf3ce3caed601f9ba2646970667358221220fdeee11c218174733500b8452427fe156a870239d05929b61c9dd37518aa696b64736f6c63430008070033", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumGasRefunder.CommonParameterKey\",\"name\":\"parameter\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"CommonParameterSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"ContractAllowedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"DisallowerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"refundee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enumGasRefunder.RefundDenyReason\",\"name\":\"reason\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"RefundGasCostsDenied\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"refundee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountPaid\",\"type\":\"uint256\"}],\"name\":\"RefundedGasCosts\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"RefundeeAllowedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"name\":\"allowContracts\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"name\":\"allowRefundees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedContracts\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedRefundees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"commonParams\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"maxRefundeeBalance\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"extraGasMargin\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"calldataCost\",\"type\":\"uint8\"},{\"internalType\":\"uint64\",\"name\":\"maxGasTip\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxGasCost\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"maxSingleGasUsage\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"name\":\"disallowContracts\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"name\":\"disallowRefundees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disallower\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"refundee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"calldataSize\",\"type\":\"uint256\"}],\"name\":\"onGasSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newValue\",\"type\":\"uint8\"}],\"name\":\"setCalldataCost\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setDisallower\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newValue\",\"type\":\"uint32\"}],\"name\":\"setExtraGasMargin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newValue\",\"type\":\"uint64\"}],\"name\":\"setMaxGasCost\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newValue\",\"type\":\"uint64\"}],\"name\":\"setMaxGasTip\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"newValue\",\"type\":\"uint128\"}],\"name\":\"setMaxRefundeeBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"newValue\",\"type\":\"uint32\"}],\"name\":\"setMaxSingleGasUsage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561001057600080fd5b5061001a336100a5565b6040805160c08101825260008152610fa06020820152600c9181019190915263773594006060820152641bf08eb0006080820152621e848060a090910152600480546001600160e81b03191678773594000c00000fa000000000000000000000000000000000179055600580546001600160601b0319166a1e84800000001bf08eb0001790556100f5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611229806101046000396000f3fe6080604052600436106101235760003560e01c8063ca101295116100a0578063efe12b0111610064578063efe12b011461040d578063f1e845ca1461042d578063f2fde38b1461044d578063f3fef3a31461046d578063f52128eb1461048d57600080fd5b8063ca101295146102e0578063cd499da314610300578063d513894814610320578063e3db8a49146103cd578063e5207453146103ed57600080fd5b80637edddf45116100e75780637edddf451461022357806386b98895146102435780638da5cb5b14610263578063a89d217314610290578063bffe1780146102c057600080fd5b806325416bc9146101675780632ccb03f214610189578063500de431146101a957806351e0e26b146101c9578063715018a61461020e57600080fd5b3661016257604080513381523460208201527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4910160405180910390a1005b600080fd5b34801561017357600080fd5b50610187610182366004610fbd565b6104ad565b005b34801561019557600080fd5b506101876101a4366004611080565b6104f5565b3480156101b557600080fd5b506101876101c436600461105a565b610571565b3480156101d557600080fd5b506101f96101e4366004610f3f565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561021a57600080fd5b506101876105e3565b34801561022f57600080fd5b5061018761023e36600461105a565b61061e565b34801561024f57600080fd5b5061018761025e366004611080565b610672565b34801561026f57600080fd5b506102786106cd565b6040516001600160a01b039091168152602001610205565b34801561029c57600080fd5b506101f96102ab366004610f3f565b60026020526000908152604090205460ff1681565b3480156102cc57600080fd5b506101876102db3660046110a9565b6106dc565b3480156102ec57600080fd5b506101876102fb366004610fbd565b610746565b34801561030c57600080fd5b5061018761031b366004610fbd565b610781565b34801561032c57600080fd5b5060045460055461037f916001600160801b0381169163ffffffff600160801b830481169260ff600160a01b820416926001600160401b03600160a81b90920482169291811691600160401b9091041686565b604080516001600160801b03909716875263ffffffff958616602088015260ff909416938601939093526001600160401b0391821660608601521660808401521660a082015260c001610205565b3480156103d957600080fd5b506101f96103e8366004610f88565b6107da565b3480156103f957600080fd5b50610187610408366004610fbd565b610ac0565b34801561041957600080fd5b50600354610278906001600160a01b031681565b34801561043957600080fd5b50610187610448366004610f3f565b610b19565b34801561045957600080fd5b50610187610468366004610f3f565b610b92565b34801561047957600080fd5b50610187610488366004610f5c565b610c32565b34801561049957600080fd5b506101876104a8366004611031565b610d44565b336104b66106cd565b6001600160a01b0316146104e55760405162461bcd60e51b81526004016104dc906110cc565b60405180910390fd5b6104f182826001610db7565b5050565b336104fe6106cd565b6001600160a01b0316146105245760405162461bcd60e51b81526004016104dc906110cc565b6005805467ffffffffffffffff19166001600160401b03831617905560045b6040516001600160401b03831681526000805160206111d4833981519152906020015b60405180910390a250565b3361057a6106cd565b6001600160a01b0316146105a05760405162461bcd60e51b81526004016104dc906110cc565b6005805463ffffffff60401b1916600160401b63ffffffff8416021781555b60405163ffffffff831681526000805160206111d483398151915290602001610566565b336105ec6106cd565b6001600160a01b0316146106125760405162461bcd60e51b81526004016104dc906110cc565b61061c6000610e56565b565b336106276106cd565b6001600160a01b03161461064d5760405162461bcd60e51b81526004016104dc906110cc565b6004805463ffffffff60801b1916600160801b63ffffffff84160217905560016105bf565b3361067b6106cd565b6001600160a01b0316146106a15760405162461bcd60e51b81526004016104dc906110cc565b6004805467ffffffffffffffff60a81b1916600160a81b6001600160401b038416021790556003610543565b6000546001600160a01b031690565b336106e56106cd565b6001600160a01b03161461070b5760405162461bcd60e51b81526004016104dc906110cc565b6004805460ff60a01b1916600160a01b60ff841602179055600260405160ff831681526000805160206111d483398151915290602001610566565b3361074f6106cd565b6001600160a01b0316146107755760405162461bcd60e51b81526004016104dc906110cc565b6104f182826001610ea6565b6107896106cd565b6001600160a01b0316336001600160a01b031614806107b257506003546001600160a01b031633145b6107ce5760405162461bcd60e51b81526004016104dc90611101565b6104f182826000610db7565b6000805a905047806108345760035b60405186815233906001600160a01b038916907f2b8ae00e22d9eaf5a92820a22b947c007aee773fa36502ad7a1c9a464ab4932b9060200160405180910390a4600092505050610ab9565b3360009081526001602052604090205460ff166108525760006107e9565b6001600160a01b03861660009081526002602052604090205460ff166108795760016107e9565b60045460009061089990600160a81b90046001600160401b031648611129565b9050803a10156108a657503a5b6005546001600160401b0316158015906108ca57506005546001600160401b031681115b156108dd57506005546001600160401b03165b6004546005546001600160a01b03891631916001600160801b03811691600160401b900463ffffffff169061091c90600160a01b900460ff1689611141565b60045461093690600160801b900463ffffffff1688611129565b6109409190611129565b61094a908a611129565b98505a610957908a611160565b9850801580159061096757508089115b15610970578098505b600061097c8a86611141565b905082158015906109955750826109938286611129565b115b15610a0157828411156109f45760026040518b815233906001600160a01b038e16907f2b8ae00e22d9eaf5a92820a22b947c007aee773fa36502ad7a1c9a464ab4932b9060200160405180910390a46000975050505050505050610ab9565b6109fe8484611160565b90505b85811115610a0c5750845b6040516001600160a01b038c16908290600081818185875af1925050503d8060008114610a55576040519150601f19603f3d011682016040523d82523d6000602084013e610a5a565b606091505b5050604080518c8152602081018890529081018390529098508815159033906001600160a01b038e16907fd0224505f828ccfcbc56ca0590d97442e239a7aa770f712948fd6388356b20de9060600160405180910390a4505050505050505b9392505050565b610ac86106cd565b6001600160a01b0316336001600160a01b03161480610af157506003546001600160a01b031633145b610b0d5760405162461bcd60e51b81526004016104dc90611101565b6104f182826000610ea6565b33610b226106cd565b6001600160a01b031614610b485760405162461bcd60e51b81526004016104dc906110cc565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fc388cec0895ad7ee4635898ec92207ca48d42256d4355f7042efef62c368a97990600090a250565b33610b9b6106cd565b6001600160a01b031614610bc15760405162461bcd60e51b81526004016104dc906110cc565b6001600160a01b038116610c265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104dc565b610c2f81610e56565b50565b33610c3b6106cd565b6001600160a01b031614610c615760405162461bcd60e51b81526004016104dc906110cc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610cae576040519150601f19603f3d011682016040523d82523d6000602084013e610cb3565b606091505b5050905080610cf65760405162461bcd60e51b815260206004820152600f60248201526e15d2551211149055d7d19052531151608a1b60448201526064016104dc565b604080513381526001600160a01b03851660208201529081018390527fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb9060600160405180910390a1505050565b33610d4d6106cd565b6001600160a01b031614610d735760405162461bcd60e51b81526004016104dc906110cc565b600480546001600160801b0319166001600160801b03831617905560006040516001600160801b03831681526000805160206111d483398151915290602001610566565b60005b82811015610e50576000848483818110610dd657610dd66111a8565b9050602002016020810190610deb9190610f3f565b6001600160a01b038116600081815260016020526040808220805460ff19168815159081179091559051939450927fb0918cd965657b8d231f8adba328fa810b6d61d800de9c795d40eb3623498c019190a35080610e4881611177565b915050610dba565b50505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b82811015610e50576000848483818110610ec557610ec56111a8565b9050602002016020810190610eda9190610f3f565b6001600160a01b038116600081815260026020526040808220805460ff19168815159081179091559051939450927ff544cca9d5484bfd447775bd759d12d53f1aa7c5f770be82c55070798ff9c63e9190a35080610f3781611177565b915050610ea9565b600060208284031215610f5157600080fd5b8135610ab9816111be565b60008060408385031215610f6f57600080fd5b8235610f7a816111be565b946020939093013593505050565b600080600060608486031215610f9d57600080fd5b8335610fa8816111be565b95602085013595506040909401359392505050565b60008060208385031215610fd057600080fd5b82356001600160401b0380821115610fe757600080fd5b818501915085601f830112610ffb57600080fd5b81358181111561100a57600080fd5b8660208260051b850101111561101f57600080fd5b60209290920196919550909350505050565b60006020828403121561104357600080fd5b81356001600160801b0381168114610ab957600080fd5b60006020828403121561106c57600080fd5b813563ffffffff81168114610ab957600080fd5b60006020828403121561109257600080fd5b81356001600160401b0381168114610ab957600080fd5b6000602082840312156110bb57600080fd5b813560ff81168114610ab957600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b6000821982111561113c5761113c611192565b500190565b600081600019048311821515161561115b5761115b611192565b500290565b60008282101561117257611172611192565b500390565b600060001982141561118b5761118b611192565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0381168114610c2f57600080fdfeda79b6b81f905f788560507c685a42d5a8ab209ee26538cbcf3ce3caed601f9ba2646970667358221220b0592293f3edc1793a3acbe5f8f747e41220c935aa067f91c0d67e30827114cd64736f6c63430008070033", } // GasRefunderABI is the input ABI used to generate the binding from. @@ -359,37 +359,6 @@ func (_GasRefunder *GasRefunderCallerSession) Disallower() (common.Address, erro return _GasRefunder.Contract.Disallower(&_GasRefunder.CallOpts) } -// LastContractRefund is a free data retrieval call binding the contract method 0xbddaf01d. -// -// Solidity: function lastContractRefund(address ) view returns(uint256) -func (_GasRefunder *GasRefunderCaller) LastContractRefund(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var out []interface{} - err := _GasRefunder.contract.Call(opts, &out, "lastContractRefund", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// LastContractRefund is a free data retrieval call binding the contract method 0xbddaf01d. -// -// Solidity: function lastContractRefund(address ) view returns(uint256) -func (_GasRefunder *GasRefunderSession) LastContractRefund(arg0 common.Address) (*big.Int, error) { - return _GasRefunder.Contract.LastContractRefund(&_GasRefunder.CallOpts, arg0) -} - -// LastContractRefund is a free data retrieval call binding the contract method 0xbddaf01d. -// -// Solidity: function lastContractRefund(address ) view returns(uint256) -func (_GasRefunder *GasRefunderCallerSession) LastContractRefund(arg0 common.Address) (*big.Int, error) { - return _GasRefunder.Contract.LastContractRefund(&_GasRefunder.CallOpts, arg0) -} - // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // // Solidity: function owner() view returns(address) diff --git a/packages/arb-util/ethbridgecontracts/INode.go b/packages/arb-util/ethbridgecontracts/INode.go index 5366a8d5f8..ade4631cae 100755 --- a/packages/arb-util/ethbridgecontracts/INode.go +++ b/packages/arb-util/ethbridgecontracts/INode.go @@ -30,7 +30,7 @@ var ( // INodeMetaData contains all meta data concerning the INode contract. var INodeMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"addStaker\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"childCreated\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"confirmData\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deadlineBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstChildBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rollup\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_stateHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_challengeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_confirmData\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_prev\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_deadlineBlock\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestChildNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"newChildConfirmDeadline\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"noChildConfirmedBeforeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prev\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"removeStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requirePastChildConfirmDeadline\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requirePastDeadline\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakerCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"addStaker\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"childCreated\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"confirmData\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deadlineBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"destroy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstChildBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rollup\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_stateHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_challengeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_confirmData\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_prev\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_deadlineBlock\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isNitroReady\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestChildNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"newChildConfirmDeadline\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"noChildConfirmedBeforeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prev\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"removeStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requirePastChildConfirmDeadline\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requirePastDeadline\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakerCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } // INodeABI is the input ABI used to generate the binding from. @@ -303,6 +303,37 @@ func (_INode *INodeCallerSession) FirstChildBlock() (*big.Int, error) { return _INode.Contract.FirstChildBlock(&_INode.CallOpts) } +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_INode *INodeCaller) IsNitroReady(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _INode.contract.Call(opts, &out, "isNitroReady") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_INode *INodeSession) IsNitroReady() (*big.Int, error) { + return _INode.Contract.IsNitroReady(&_INode.CallOpts) +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_INode *INodeCallerSession) IsNitroReady() (*big.Int, error) { + return _INode.Contract.IsNitroReady(&_INode.CallOpts) +} + // LatestChildNumber is a free data retrieval call binding the contract method 0xf0dd77ff. // // Solidity: function latestChildNumber() view returns(uint256) diff --git a/packages/arb-util/ethbridgecontracts/Inbox.go b/packages/arb-util/ethbridgecontracts/Inbox.go index 88506df35a..39524fed9e 100755 --- a/packages/arb-util/ethbridgecontracts/Inbox.go +++ b/packages/arb-util/ethbridgecontracts/Inbox.go @@ -30,8 +30,8 @@ var ( // InboxMetaData contains all meta data concerning the Inbox contract. var InboxMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"messageNum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"InboxMessageDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"messageNum\",\"type\":\"uint256\"}],\"name\":\"InboxMessageDeliveredFromOrigin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"PauseToggled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"RewriteToggled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newSource\",\"type\":\"address\"}],\"name\":\"WhitelistSourceUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"l2CallValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"callValueRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"createRetryableTicket\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"l2CallValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"callValueRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"createRetryableTicketNoRefundAliasRewrite\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxSubmissionCost\",\"type\":\"uint256\"}],\"name\":\"depositEth\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCreateRetryablePaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseCreateRetryables\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"sendContractTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"sendL1FundedContractTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"sendL1FundedUnsignedTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"messageData\",\"type\":\"bytes\"}],\"name\":\"sendL2Message\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"messageData\",\"type\":\"bytes\"}],\"name\":\"sendL2MessageFromOrigin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"sendUnsignedTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"shouldRewriteSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startRewriteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stopRewriteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseCreateRetryables\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSource\",\"type\":\"address\"}],\"name\":\"updateWhitelistSource\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506000805460ff60a01b1916600160a01b179055611e82806100336000396000f3fe60806040526004361061011f5760003560e01c80636f791d29116100a05780639fe12da5116100645780639fe12da514610681578063b4d9ec4414610696578063b75436bb146106ab578063e78cea9214610726578063fdebb9b31461073b5761011f565b80636f791d2914610561578063794cfd511461058a5780637ae8d8b31461059f5780638a631aa6146105b457806393e59dc1146106505761011f565b8063485cc955116100e7578063485cc955146102c15780635075788b146102fc5780635e9167581461039f578063679b6ded1461042957806367ef3ab8146104d25761011f565b80630f4d14e9146101245780631b871c8d146101535780631fe927cf146101fc5780632b40609a1461027757806347466f981461028e575b600080fd5b6101416004803603602081101561013a57600080fd5b5035610750565b60408051918252519081900360200190f35b610141600480360361010081101561016a57600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b8111156101be57600080fd5b8201836020820111156101d057600080fd5b803590602001918460018302840111600160201b831117156101f157600080fd5b50909250905061093d565b34801561020857600080fd5b506101416004803603602081101561021f57600080fd5b810190602081018135600160201b81111561023957600080fd5b82018360208201111561024b57600080fd5b803590602001918460018302840111600160201b8311171561026c57600080fd5b509092509050610b1d565b34801561028357600080fd5b5061028c610c8a565b005b34801561029a57600080fd5b5061028c600480360360208110156102b157600080fd5b50356001600160a01b0316610e52565b3480156102cd57600080fd5b5061028c600480360360408110156102e457600080fd5b506001600160a01b0381358116916020013516610ef5565b34801561030857600080fd5b50610141600480360360c081101561031f57600080fd5b8135916020810135916040820135916001600160a01b03606082013516916080820135919081019060c0810160a0820135600160201b81111561036157600080fd5b82018360208201111561037357600080fd5b803590602001918460018302840111600160201b8311171561039457600080fd5b509092509050610f70565b610141600480360360808110156103b557600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b8111156103eb57600080fd5b8201836020820111156103fd57600080fd5b803590602001918460018302840111600160201b8311171561041e57600080fd5b5090925090506110c5565b610141600480360361010081101561044057600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b81111561049457600080fd5b8201836020820111156104a657600080fd5b803590602001918460018302840111600160201b831117156104c757600080fd5b509092509050611210565b610141600480360360a08110156104e857600080fd5b8135916020810135916040820135916001600160a01b036060820135169181019060a081016080820135600160201b81111561052357600080fd5b82018360208201111561053557600080fd5b803590602001918460018302840111600160201b8311171561055657600080fd5b509092509050611349565b34801561056d57600080fd5b5061057661149d565b604080519115158252519081900360200190f35b34801561059657600080fd5b5061028c6114ad565b3480156105ab57600080fd5b5061028c61166f565b3480156105c057600080fd5b50610141600480360360a08110156105d757600080fd5b8135916020810135916001600160a01b036040830135169160608101359181019060a081016080820135600160201b81111561061257600080fd5b82018360208201111561062457600080fd5b803590602001918460018302840111600160201b8311171561064557600080fd5b50909250905061183a565b34801561065c57600080fd5b5061066561197b565b604080516001600160a01b039092168252519081900360200190f35b34801561068d57600080fd5b5061028c61198a565b3480156106a257600080fd5b50610576611b49565b3480156106b757600080fd5b50610141600480360360208110156106ce57600080fd5b810190602081018135600160201b8111156106e857600080fd5b8201836020820111156106fa57600080fd5b803590602001918460018302840111600160201b8311171561071b57600080fd5b509092509050611b59565b34801561073257600080fd5b50610665611cb9565b34801561074757600080fd5b50610576611cc8565b600080546001600160a01b03161561081c576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156107ad57600080fd5b505afa1580156107c1573d6000803e3d6000fd5b505050506040513d60208110156107d757600080fd5b505161081c576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a01b900460ff1615610876576040805162461bcd60e51b815260206004820152601860248201527710d49150551157d4915514965050931154d7d4105554d15160421b604482015290519081900360640190fd5b60015433908190600160a81b900460ff16156108c25761089582611cd8565b1580156108a157503233145b156108b6576108af82611cde565b91506108c2565b6108bf81611ced565b90505b604080516001600160a01b0383166020820181905260008284018190523460608401526080830188905260a0830182905260c083019190915260e0820181905261010082018190526101208083019190915282518083039091018152610140909101909152610935906009908490611cfb565b949350505050565b600080546001600160a01b031615610a09576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561099a57600080fd5b505afa1580156109ae573d6000803e3d6000fd5b505050506040513d60208110156109c457600080fd5b5051610a09576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a01b900460ff1615610a63576040805162461bcd60e51b815260206004820152601860248201527710d49150551157d4915514965050931154d7d4105554d15160421b604482015290519081900360640190fd5b610b0f6009338c60601b60601c6001600160a01b03168c348d8d60601b60601c6001600160a01b03168d60601b60601c6001600160a01b03168d8d8d8d90508e8e604051602001808c81526020018b81526020018a8152602001898152602001888152602001878152602001868152602001858152602001848152602001838380828437808301925050509b505050505050505050505050604051602081830303815290604052611cfb565b9a9950505050505050505050565b600080546001600160a01b031615610be9576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015610b7a57600080fd5b505afa158015610b8e573d6000803e3d6000fd5b505050506040513d6020811015610ba457600080fd5b5051610be9576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b333214610c2b576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b6000610c5560033386866040518083838082843760405192018290039091209350611db492505050565b60405190915081907fab532385be8f1005a4b6ba8fa20a2245facb346134ac739fe9a5198dc1580b9c90600090a29392505050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610ccf57600080fd5b505afa158015610ce3573d6000803e3d6000fd5b505050506040513d6020811015610cf957600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b158015610d4157600080fd5b505afa158015610d55573d6000803e3d6000fd5b505050506040513d6020811015610d6b57600080fd5b50519050336001600160a01b03821614610db9576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a01b900460ff1615610e09576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4105554d15160921b604482015290519081900360640190fd5b6001805460ff60a01b1916600160a01b17815560408051918252517f9077d36bc00859b5c3f320310707208543dd35092cb0a0fe117d0c6a558b148b9181900360200190a15050565b6000546001600160a01b03163314610ea1576040805162461bcd60e51b815260206004820152600d60248201526c1393d517d19493d357d31254d5609a1b604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f37389c47920d5cc3229678a0205d0455002c07541a4139ebdce91ac2274657779181900360200190a150565b6001546001600160a01b031615610f42576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600180546001600160a01b039384166001600160a01b03199182161790915560008054929093169116179055565b600080546001600160a01b03161561103c576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015610fcd57600080fd5b505afa158015610fe1573d6000803e3d6000fd5b505050506040513d6020811015610ff757600080fd5b505161103c576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6110b960033360008b8b8b8b60601b60601c6001600160a01b03168b8b8b604051602001808960ff1660ff1660f81b81526001018881526020018781526020018681526020018581526020018481526020018383808284378083019250505098505050505050505050604051602081830303815290604052611cfb565b98975050505050505050565b600080546001600160a01b031615611191576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561112257600080fd5b505afa158015611136573d6000803e3d6000fd5b505050506040513d602081101561114c57600080fd5b5051611191576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b611206600733600189898960601b60601c6001600160a01b0316348a8a604051602001808860ff1660ff1660f81b815260010187815260200186815260200185815260200184815260200183838082843780830192505050975050505050505050604051602081830303815290604052611cfb565b9695505050505050565b600080546001600160a01b0316156112dc576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561126d57600080fd5b505afa158015611281573d6000803e3d6000fd5b505050506040513d602081101561129757600080fd5b50516112dc576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a81b900460ff1680156112f957506112f987611cd8565b1561130a5761130787611ced565b96505b600154600160a81b900460ff168015611327575061132786611cd8565b156113385761133586611ced565b95505b610b0f8a8a8a8a8a8a8a8a8a61093d565b600080546001600160a01b031615611415576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156113a657600080fd5b505afa1580156113ba573d6000803e3d6000fd5b505050506040513d60208110156113d057600080fd5b5051611415576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b61149260073360008a8a8a8a60601b60601c6001600160a01b0316348b8b604051602001808960ff1660ff1660f81b81526001018881526020018781526020018681526020018581526020018481526020018383808284378083019250505098505050505050505050604051602081830303815290604052611cfb565b979650505050505050565b600054600160a01b900460ff1690565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156114f257600080fd5b505afa158015611506573d6000803e3d6000fd5b505050506040513d602081101561151c57600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b15801561156457600080fd5b505afa158015611578573d6000803e3d6000fd5b505050506040513d602081101561158e57600080fd5b50519050336001600160a01b038216146115dc576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a81b900460ff1661162a576040805162461bcd60e51b815260206004820152600d60248201526c4e4f545f524557524954494e4760981b604482015290519081900360640190fd5b6001805460ff60a81b19169055604080516000815290517fab1ea65fd25ce96d303e895d1bd43edddb89841544a3705d3e61fc947a5fc25b9181900360200190a15050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156116b457600080fd5b505afa1580156116c8573d6000803e3d6000fd5b505050506040513d60208110156116de57600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b15801561172657600080fd5b505afa15801561173a573d6000803e3d6000fd5b505050506040513d602081101561175057600080fd5b50519050336001600160a01b0382161461179e576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a81b900460ff16156117f1576040805162461bcd60e51b8152602060048201526011602482015270414c52454144595f524557524954494e4760781b604482015290519081900360640190fd5b6001805460ff60a81b1916600160a81b17815560408051918252517fab1ea65fd25ce96d303e895d1bd43edddb89841544a3705d3e61fc947a5fc25b9181900360200190a15050565b600080546001600160a01b031615611906576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561189757600080fd5b505afa1580156118ab573d6000803e3d6000fd5b505050506040513d60208110156118c157600080fd5b5051611906576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b61149260033360018a8a8a60601b60601c6001600160a01b03168a8a8a604051602001808860ff1660ff1660f81b815260010187815260200186815260200185815260200184815260200183838082843780830192505050975050505050505050604051602081830303815290604052611cfb565b6000546001600160a01b031681565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156119cf57600080fd5b505afa1580156119e3573d6000803e3d6000fd5b505050506040513d60208110156119f957600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b158015611a4157600080fd5b505afa158015611a55573d6000803e3d6000fd5b505050506040513d6020811015611a6b57600080fd5b50519050336001600160a01b03821614611ab9576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a01b900460ff16611b04576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4105554d15160b21b604482015290519081900360640190fd5b6001805460ff60a01b19169055604080516000815290517f9077d36bc00859b5c3f320310707208543dd35092cb0a0fe117d0c6a558b148b9181900360200190a15050565b600154600160a01b900460ff1681565b600080546001600160a01b031615611c25576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015611bb657600080fd5b505afa158015611bca573d6000803e3d6000fd5b505050506040513d6020811015611be057600080fd5b5051611c25576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6000611c4f60033386866040518083838082843760405192018290039091209350611db492505050565b9050807fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b858560405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a29392505050565b6001546001600160a01b031681565b600154600160a81b900460ff1681565b3b151590565b61111061111160901b01190190565b61111161111160901b010190565b600080611d1085858580519060200120611db4565b9050807fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b846040518080602001828103825283818151815260200191508051906020019080838360005b83811015611d72578181015183820152602001611d5a565b50505050905090810190601f168015611d9f5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2949350505050565b600154604080516302bbfad160e01b815260ff861660048201526001600160a01b03858116602483015260448201859052915160009392909216916302bbfad1913491606480830192602092919082900301818588803b158015611e1757600080fd5b505af1158015611e2b573d6000803e3d6000fd5b50505050506040513d6020811015611e4257600080fd5b505194935050505056fea2646970667358221220ed792396a49edd456f5b05e40bfc6c2098d2037e24a28a983ff70e1f51cdd64564736f6c634300060b0033", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"messageNum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"InboxMessageDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"messageNum\",\"type\":\"uint256\"}],\"name\":\"InboxMessageDeliveredFromOrigin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"PauseToggled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"RewriteToggled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newSource\",\"type\":\"address\"}],\"name\":\"WhitelistSourceUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"l2CallValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"callValueRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"createRetryableTicket\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"l2CallValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"callValueRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"createRetryableTicketNoRefundAliasRewrite\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxSubmissionCost\",\"type\":\"uint256\"}],\"name\":\"depositEth\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_whitelist\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCreateRetryablePaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isNitroReady\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseCreateRetryables\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"sendContractTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"sendL1FundedContractTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"sendL1FundedUnsignedTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"messageData\",\"type\":\"bytes\"}],\"name\":\"sendL2Message\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"messageData\",\"type\":\"bytes\"}],\"name\":\"sendL2MessageFromOrigin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"sendUnsignedTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"shouldRewriteSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"shutdownForNitro\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"msgNum\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startRewriteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stopRewriteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseCreateRetryables\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"l2CallValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"callValueRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceBid\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"unsafeCreateRetryableTicket\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSource\",\"type\":\"address\"}],\"name\":\"updateWhitelistSource\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"whitelist\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506000805460ff60a01b1916600160a01b1790556120e1806100336000396000f3fe6080604052600436106101405760003560e01c80636e6e8a6a116100b65780639fe12da51161006f5780639fe12da514610760578063a8929e0b14610775578063b4d9ec441461078a578063b75436bb1461079f578063e78cea921461081a578063fdebb9b31461082f57610140565b80636e6e8a6a146105975780636f791d2914610640578063794cfd51146106695780637ae8d8b31461067e5780638a631aa61461069357806393e59dc11461072f57610140565b8063485cc95511610108578063485cc955146102e25780635075788b1461031d5780635661777a146103c05780635e916758146103d5578063679b6ded1461045f57806367ef3ab81461050857610140565b80630f4d14e9146101455780631b871c8d146101745780631fe927cf1461021d5780632b40609a1461029857806347466f98146102af575b600080fd5b6101626004803603602081101561015b57600080fd5b5035610844565b60408051918252519081900360200190f35b610162600480360361010081101561018b57600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b8111156101df57600080fd5b8201836020820111156101f157600080fd5b803590602001918460018302840111600160201b8311171561021257600080fd5b509092509050610a31565b34801561022957600080fd5b506101626004803603602081101561024057600080fd5b810190602081018135600160201b81111561025a57600080fd5b82018360208201111561026c57600080fd5b803590602001918460018302840111600160201b8311171561028d57600080fd5b509092509050610c11565b3480156102a457600080fd5b506102ad610d7e565b005b3480156102bb57600080fd5b506102ad600480360360208110156102d257600080fd5b50356001600160a01b0316610f46565b3480156102ee57600080fd5b506102ad6004803603604081101561030557600080fd5b506001600160a01b0381358116916020013516610fe9565b34801561032957600080fd5b50610162600480360360c081101561034057600080fd5b8135916020810135916040820135916001600160a01b03606082013516916080820135919081019060c0810160a0820135600160201b81111561038257600080fd5b82018360208201111561039457600080fd5b803590602001918460018302840111600160201b831117156103b557600080fd5b509092509050611064565b3480156103cc57600080fd5b506101626111b9565b610162600480360360808110156103eb57600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b81111561042157600080fd5b82018360208201111561043357600080fd5b803590602001918460018302840111600160201b8311171561045457600080fd5b5090925090506112bf565b610162600480360361010081101561047657600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b8111156104ca57600080fd5b8201836020820111156104dc57600080fd5b803590602001918460018302840111600160201b831117156104fd57600080fd5b50909250905061140a565b610162600480360360a081101561051e57600080fd5b8135916020810135916040820135916001600160a01b036060820135169181019060a081016080820135600160201b81111561055957600080fd5b82018360208201111561056b57600080fd5b803590602001918460018302840111600160201b8311171561058c57600080fd5b50909250905061158f565b61016260048036036101008110156105ae57600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b81111561060257600080fd5b82018360208201111561061457600080fd5b803590602001918460018302840111600160201b8311171561063557600080fd5b5090925090506116e3565b34801561064c57600080fd5b506106556116f6565b604080519115158252519081900360200190f35b34801561067557600080fd5b506102ad611706565b34801561068a57600080fd5b506102ad6118c8565b34801561069f57600080fd5b50610162600480360360a08110156106b657600080fd5b8135916020810135916001600160a01b036040830135169160608101359181019060a081016080820135600160201b8111156106f157600080fd5b82018360208201111561070357600080fd5b803590602001918460018302840111600160201b8311171561072457600080fd5b509092509050611a93565b34801561073b57600080fd5b50610744611bd4565b604080516001600160a01b039092168252519081900360200190f35b34801561076c57600080fd5b506102ad611be3565b34801561078157600080fd5b50610162611da2565b34801561079657600080fd5b50610655611da8565b3480156107ab57600080fd5b50610162600480360360208110156107c257600080fd5b810190602081018135600160201b8111156107dc57600080fd5b8201836020820111156107ee57600080fd5b803590602001918460018302840111600160201b8311171561080f57600080fd5b509092509050611db8565b34801561082657600080fd5b50610744611f18565b34801561083b57600080fd5b50610655611f27565b600080546001600160a01b031615610910576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d60208110156108cb57600080fd5b5051610910576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a01b900460ff161561096a576040805162461bcd60e51b815260206004820152601860248201527710d49150551157d4915514965050931154d7d4105554d15160421b604482015290519081900360640190fd5b60015433908190600160a81b900460ff16156109b65761098982611f37565b15801561099557503233145b156109aa576109a382611f3d565b91506109b6565b6109b381611f4c565b90505b604080516001600160a01b0383166020820181905260008284018190523460608401526080830188905260a0830182905260c083019190915260e0820181905261010082018190526101208083019190915282518083039091018152610140909101909152610a29906009908490611f5a565b949350505050565b600080546001600160a01b031615610afd576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015610a8e57600080fd5b505afa158015610aa2573d6000803e3d6000fd5b505050506040513d6020811015610ab857600080fd5b5051610afd576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a01b900460ff1615610b57576040805162461bcd60e51b815260206004820152601860248201527710d49150551157d4915514965050931154d7d4105554d15160421b604482015290519081900360640190fd5b610c036009338c60601b60601c6001600160a01b03168c348d8d60601b60601c6001600160a01b03168d60601b60601c6001600160a01b03168d8d8d8d90508e8e604051602001808c81526020018b81526020018a8152602001898152602001888152602001878152602001868152602001858152602001848152602001838380828437808301925050509b505050505050505050505050604051602081830303815290604052611f5a565b9a9950505050505050505050565b600080546001600160a01b031615610cdd576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015610c6e57600080fd5b505afa158015610c82573d6000803e3d6000fd5b505050506040513d6020811015610c9857600080fd5b5051610cdd576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b333214610d1f576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b6000610d496003338686604051808383808284376040519201829003909120935061201392505050565b60405190915081907fab532385be8f1005a4b6ba8fa20a2245facb346134ac739fe9a5198dc1580b9c90600090a29392505050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610dc357600080fd5b505afa158015610dd7573d6000803e3d6000fd5b505050506040513d6020811015610ded57600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b158015610e3557600080fd5b505afa158015610e49573d6000803e3d6000fd5b505050506040513d6020811015610e5f57600080fd5b50519050336001600160a01b03821614610ead576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a01b900460ff1615610efd576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4105554d15160921b604482015290519081900360640190fd5b6001805460ff60a01b1916600160a01b17815560408051918252517f9077d36bc00859b5c3f320310707208543dd35092cb0a0fe117d0c6a558b148b9181900360200190a15050565b6000546001600160a01b03163314610f95576040805162461bcd60e51b815260206004820152600d60248201526c1393d517d19493d357d31254d5609a1b604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f37389c47920d5cc3229678a0205d0455002c07541a4139ebdce91ac2274657779181900360200190a150565b6001546001600160a01b031615611036576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600180546001600160a01b039384166001600160a01b03199182161790915560008054929093169116179055565b600080546001600160a01b031615611130576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d60208110156110eb57600080fd5b5051611130576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6111ad60033360008b8b8b8b60601b60601c6001600160a01b03168b8b8b604051602001808960ff1660ff1660f81b81526001018881526020018781526020018681526020018581526020018481526020018383808284378083019250505098505050505050505050604051602081830303815290604052611f5a565b98975050505050505050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156111fe57600080fd5b505afa158015611212573d6000803e3d6000fd5b505050506040513d602081101561122857600080fd5b50516001600160a01b0316331461127a576040805162461bcd60e51b815260206004820152601160248201527027a7262cafa12924a223a2afa7aba722a960791b604482015290519081900360640190fd5b604080516000815260208101909152611297906006903390611f5a565b6040805160008152602081019091529091506112b7906080903390611f5a565b600101905090565b600080546001600160a01b03161561138b576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561131c57600080fd5b505afa158015611330573d6000803e3d6000fd5b505050506040513d602081101561134657600080fd5b505161138b576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b611400600733600189898960601b60601c6001600160a01b0316348a8a604051602001808860ff1660ff1660f81b815260010187815260200186815260200185815260200184815260200183838082843780830192505050975050505050505050604051602081830303815290604052611f5a565b9695505050505050565b600080546001600160a01b0316156114d6576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561146757600080fd5b505afa15801561147b573d6000803e3d6000fd5b505050506040513d602081101561149157600080fd5b50516114d6576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b888801341015611522576040805162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742076616c756560701b604482015290519081900360640190fd5b600154600160a81b900460ff16801561153f575061153f87611f37565b156115505761154d87611f4c565b96505b600154600160a81b900460ff16801561156d575061156d86611f37565b1561157e5761157b86611f4c565b95505b610c038a8a8a8a8a8a8a8a8a610a31565b600080546001600160a01b03161561165b576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156115ec57600080fd5b505afa158015611600573d6000803e3d6000fd5b505050506040513d602081101561161657600080fd5b505161165b576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6116d860073360008a8a8a8a60601b60601c6001600160a01b0316348b8b604051602001808960ff1660ff1660f81b81526001018881526020018781526020018681526020018581526020018481526020018383808284378083019250505098505050505050505050604051602081830303815290604052611f5a565b979650505050505050565b6000610c038a8a8a8a8a8a8a8a8a610a31565b600054600160a01b900460ff1690565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b15801561174b57600080fd5b505afa15801561175f573d6000803e3d6000fd5b505050506040513d602081101561177557600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b1580156117bd57600080fd5b505afa1580156117d1573d6000803e3d6000fd5b505050506040513d60208110156117e757600080fd5b50519050336001600160a01b03821614611835576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a81b900460ff16611883576040805162461bcd60e51b815260206004820152600d60248201526c4e4f545f524557524954494e4760981b604482015290519081900360640190fd5b6001805460ff60a81b19169055604080516000815290517fab1ea65fd25ce96d303e895d1bd43edddb89841544a3705d3e61fc947a5fc25b9181900360200190a15050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b15801561190d57600080fd5b505afa158015611921573d6000803e3d6000fd5b505050506040513d602081101561193757600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b15801561197f57600080fd5b505afa158015611993573d6000803e3d6000fd5b505050506040513d60208110156119a957600080fd5b50519050336001600160a01b038216146119f7576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a81b900460ff1615611a4a576040805162461bcd60e51b8152602060048201526011602482015270414c52454144595f524557524954494e4760781b604482015290519081900360640190fd5b6001805460ff60a81b1916600160a81b17815560408051918252517fab1ea65fd25ce96d303e895d1bd43edddb89841544a3705d3e61fc947a5fc25b9181900360200190a15050565b600080546001600160a01b031615611b5f576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015611af057600080fd5b505afa158015611b04573d6000803e3d6000fd5b505050506040513d6020811015611b1a57600080fd5b5051611b5f576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6116d860033360018a8a8a60601b60601c6001600160a01b03168a8a8a604051602001808860ff1660ff1660f81b815260010187815260200186815260200185815260200184815260200183838082843780830192505050975050505050505050604051602081830303815290604052611f5a565b6000546001600160a01b031681565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015611c2857600080fd5b505afa158015611c3c573d6000803e3d6000fd5b505050506040513d6020811015611c5257600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b158015611c9a57600080fd5b505afa158015611cae573d6000803e3d6000fd5b505050506040513d6020811015611cc457600080fd5b50519050336001600160a01b03821614611d12576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a01b900460ff16611d5d576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4105554d15160b21b604482015290519081900360640190fd5b6001805460ff60a01b19169055604080516000815290517f9077d36bc00859b5c3f320310707208543dd35092cb0a0fe117d0c6a558b148b9181900360200190a15050565b61a4b690565b600154600160a01b900460ff1681565b600080546001600160a01b031615611e84576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015611e1557600080fd5b505afa158015611e29573d6000803e3d6000fd5b505050506040513d6020811015611e3f57600080fd5b5051611e84576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6000611eae6003338686604051808383808284376040519201829003909120935061201392505050565b9050807fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b858560405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a29392505050565b6001546001600160a01b031681565b600154600160a81b900460ff1681565b3b151590565b61111061111160901b01190190565b61111161111160901b010190565b600080611f6f85858580519060200120612013565b9050807fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b846040518080602001828103825283818151815260200191508051906020019080838360005b83811015611fd1578181015183820152602001611fb9565b50505050905090810190601f168015611ffe5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2949350505050565b600154604080516302bbfad160e01b815260ff861660048201526001600160a01b03858116602483015260448201859052915160009392909216916302bbfad1913491606480830192602092919082900301818588803b15801561207657600080fd5b505af115801561208a573d6000803e3d6000fd5b50505050506040513d60208110156120a157600080fd5b505194935050505056fea26469706673582212201d933684bc3d987de13963a4c0917e3729ecb3ead4776cbf6b69bd85123810e564736f6c634300060b0033", } // InboxABI is the input ABI used to generate the binding from. @@ -294,6 +294,37 @@ func (_Inbox *InboxCallerSession) IsMaster() (bool, error) { return _Inbox.Contract.IsMaster(&_Inbox.CallOpts) } +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_Inbox *InboxCaller) IsNitroReady(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Inbox.contract.Call(opts, &out, "isNitroReady") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_Inbox *InboxSession) IsNitroReady() (*big.Int, error) { + return _Inbox.Contract.IsNitroReady(&_Inbox.CallOpts) +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_Inbox *InboxCallerSession) IsNitroReady() (*big.Int, error) { + return _Inbox.Contract.IsNitroReady(&_Inbox.CallOpts) +} + // ShouldRewriteSender is a free data retrieval call binding the contract method 0xfdebb9b3. // // Solidity: function shouldRewriteSender() view returns(bool) @@ -587,6 +618,27 @@ func (_Inbox *InboxTransactorSession) SendUnsignedTransaction(maxGas *big.Int, g return _Inbox.Contract.SendUnsignedTransaction(&_Inbox.TransactOpts, maxGas, gasPriceBid, nonce, destAddr, amount, data) } +// ShutdownForNitro is a paid mutator transaction binding the contract method 0x5661777a. +// +// Solidity: function shutdownForNitro() returns(uint256 msgNum) +func (_Inbox *InboxTransactor) ShutdownForNitro(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Inbox.contract.Transact(opts, "shutdownForNitro") +} + +// ShutdownForNitro is a paid mutator transaction binding the contract method 0x5661777a. +// +// Solidity: function shutdownForNitro() returns(uint256 msgNum) +func (_Inbox *InboxSession) ShutdownForNitro() (*types.Transaction, error) { + return _Inbox.Contract.ShutdownForNitro(&_Inbox.TransactOpts) +} + +// ShutdownForNitro is a paid mutator transaction binding the contract method 0x5661777a. +// +// Solidity: function shutdownForNitro() returns(uint256 msgNum) +func (_Inbox *InboxTransactorSession) ShutdownForNitro() (*types.Transaction, error) { + return _Inbox.Contract.ShutdownForNitro(&_Inbox.TransactOpts) +} + // StartRewriteAddress is a paid mutator transaction binding the contract method 0x7ae8d8b3. // // Solidity: function startRewriteAddress() returns() @@ -650,6 +702,27 @@ func (_Inbox *InboxTransactorSession) UnpauseCreateRetryables() (*types.Transact return _Inbox.Contract.UnpauseCreateRetryables(&_Inbox.TransactOpts) } +// UnsafeCreateRetryableTicket is a paid mutator transaction binding the contract method 0x6e6e8a6a. +// +// Solidity: function unsafeCreateRetryableTicket(address destAddr, uint256 l2CallValue, uint256 maxSubmissionCost, address excessFeeRefundAddress, address callValueRefundAddress, uint256 maxGas, uint256 gasPriceBid, bytes data) payable returns(uint256) +func (_Inbox *InboxTransactor) UnsafeCreateRetryableTicket(opts *bind.TransactOpts, destAddr common.Address, l2CallValue *big.Int, maxSubmissionCost *big.Int, excessFeeRefundAddress common.Address, callValueRefundAddress common.Address, maxGas *big.Int, gasPriceBid *big.Int, data []byte) (*types.Transaction, error) { + return _Inbox.contract.Transact(opts, "unsafeCreateRetryableTicket", destAddr, l2CallValue, maxSubmissionCost, excessFeeRefundAddress, callValueRefundAddress, maxGas, gasPriceBid, data) +} + +// UnsafeCreateRetryableTicket is a paid mutator transaction binding the contract method 0x6e6e8a6a. +// +// Solidity: function unsafeCreateRetryableTicket(address destAddr, uint256 l2CallValue, uint256 maxSubmissionCost, address excessFeeRefundAddress, address callValueRefundAddress, uint256 maxGas, uint256 gasPriceBid, bytes data) payable returns(uint256) +func (_Inbox *InboxSession) UnsafeCreateRetryableTicket(destAddr common.Address, l2CallValue *big.Int, maxSubmissionCost *big.Int, excessFeeRefundAddress common.Address, callValueRefundAddress common.Address, maxGas *big.Int, gasPriceBid *big.Int, data []byte) (*types.Transaction, error) { + return _Inbox.Contract.UnsafeCreateRetryableTicket(&_Inbox.TransactOpts, destAddr, l2CallValue, maxSubmissionCost, excessFeeRefundAddress, callValueRefundAddress, maxGas, gasPriceBid, data) +} + +// UnsafeCreateRetryableTicket is a paid mutator transaction binding the contract method 0x6e6e8a6a. +// +// Solidity: function unsafeCreateRetryableTicket(address destAddr, uint256 l2CallValue, uint256 maxSubmissionCost, address excessFeeRefundAddress, address callValueRefundAddress, uint256 maxGas, uint256 gasPriceBid, bytes data) payable returns(uint256) +func (_Inbox *InboxTransactorSession) UnsafeCreateRetryableTicket(destAddr common.Address, l2CallValue *big.Int, maxSubmissionCost *big.Int, excessFeeRefundAddress common.Address, callValueRefundAddress common.Address, maxGas *big.Int, gasPriceBid *big.Int, data []byte) (*types.Transaction, error) { + return _Inbox.Contract.UnsafeCreateRetryableTicket(&_Inbox.TransactOpts, destAddr, l2CallValue, maxSubmissionCost, excessFeeRefundAddress, callValueRefundAddress, maxGas, gasPriceBid, data) +} + // UpdateWhitelistSource is a paid mutator transaction binding the contract method 0x47466f98. // // Solidity: function updateWhitelistSource(address newSource) returns() diff --git a/packages/arb-util/ethbridgecontracts/Outbox.go b/packages/arb-util/ethbridgecontracts/Outbox.go index 7bd1eac37f..79ab26eb78 100755 --- a/packages/arb-util/ethbridgecontracts/Outbox.go +++ b/packages/arb-util/ethbridgecontracts/Outbox.go @@ -30,8 +30,8 @@ var ( // OutboxMetaData contains all meta data concerning the Outbox contract. var OutboxMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"outboxEntryIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"transactionIndex\",\"type\":\"uint256\"}],\"name\":\"OutBoxTransactionExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchNum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outboxEntryIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numInBatch\",\"type\":\"uint256\"}],\"name\":\"OutboxEntryCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"OUTBOX_VERSION\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"l2Block\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l1Block\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l2Timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"calldataForL1\",\"type\":\"bytes\"}],\"name\":\"calculateItemHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"path\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"item\",\"type\":\"bytes32\"}],\"name\":\"calculateMerkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"l2Block\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l1Block\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l2Timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"calldataForL1\",\"type\":\"bytes\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rollup\",\"type\":\"address\"},{\"internalType\":\"contractIBridge\",\"name\":\"_bridge\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1BatchNum\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1Block\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1EthBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1OutputId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1Sender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1Timestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"outboxEntries\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNum\",\"type\":\"uint256\"}],\"name\":\"outboxEntryExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sendsData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"sendLengths\",\"type\":\"uint256[]\"}],\"name\":\"processOutgoingMessages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506000805460ff191660011790556113158061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638515bc6a116100925780638515bc6a146102ed5780639229bab6146102f55780639c5cfe0b146103125780639f0c04bf1461040e578063b0f30537146104ad578063c75184df146104b5578063cb23bcb5146104d9578063e78cea92146104e1578063f1fd3a39146104e9576100ea565b80627436d3146100ef5780630c726847146101a75780631198527114610267578063465477901461026f578063485cc955146102775780636f791d29146102a557806372f2a8c7146102c157806380648b02146102c9575b600080fd5b6101956004803603606081101561010557600080fd5b810190602081018135600160201b81111561011f57600080fd5b82018360208201111561013157600080fd5b803590602001918460208302840111600160201b8311171561015257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135610506565b60408051918252519081900360200190f35b610265600480360360408110156101bd57600080fd5b810190602081018135600160201b8111156101d757600080fd5b8201836020820111156101e957600080fd5b803590602001918460018302840111600160201b8311171561020a57600080fd5b919390929091602081019035600160201b81111561022757600080fd5b82018360208201111561023957600080fd5b803590602001918460208302840111600160201b8311171561025a57600080fd5b509092509050610541565b005b61019561062d565b610195610643565b6102656004803603604081101561028d57600080fd5b506001600160a01b0381358116916020013516610652565b6102ad6106dc565b604080519115158252519081900360200190f35b6101956106e5565b6102d16106eb565b604080516001600160a01b039092168252519081900360200190f35b6101956106fa565b6101956004803603602081101561030b57600080fd5b5035610710565b610265600480360361014081101561032957600080fd5b81359190810190604081016020820135600160201b81111561034a57600080fd5b82018360208201111561035c57600080fd5b803590602001918460208302840111600160201b8311171561037d57600080fd5b919390928235926001600160a01b03602082013581169360408301359091169260608301359260808101359260a08201359260c08301359261010081019060e00135600160201b8111156103d057600080fd5b8201836020820111156103e257600080fd5b803590602001918460018302840111600160201b8311171561040357600080fd5b509092509050610722565b610195600480360360e081101561042457600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359160808201359160a08101359181019060e0810160c0820135600160201b81111561046f57600080fd5b82018360208201111561048157600080fd5b803590602001918460018302840111600160201b831117156104a257600080fd5b509092509050610afa565b610195610b9a565b6104bd610ba9565b604080516001600160801b039092168252519081900360200190f35b6102d1610bae565b6102d1610bc2565b6102ad600480360360208110156104ff57600080fd5b5035610bd1565b60006105398484846040516020018082815260200191505060405160208183030381529060405280519060200120610be5565b949350505050565b60005461010090046001600160a01b03163314610593576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b806000805b82811015610624576106028783888888868181106105b257fe5b905060200201358601926105c8939291906112b7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610cb392505050565b84848281811061060e57fe5b6020029190910135929092019150600101610598565b50505050505050565b600454600160801b90046001600160801b031690565b6003546001600160801b031690565b60005461010090046001600160a01b0316156106a4576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b60008054610100600160a81b0319166101006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b60005460ff1690565b60055490565b6006546001600160a01b031690565b600354600160801b90046001600160801b031690565b60026020526000908152604090205481565b6000806107358a8a8a8a8a8a8a8a610afa565b90506107848e8e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d84610e1b565b91508d8a6001600160a01b03168a6001600160a01b03167f20af7f3bbfe38132b8900ae295cd9c8d1914be7052d061a511f3f728dab189648e6040518082815260200191505060405180910390a4506107db611270565b60036040518060c00160405290816000820160009054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016000820160109054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016001820160009054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016001820160109054906101000a90046001600160801b03166001600160801b03166001600160801b03168152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152505090506040518060c00160405280896001600160801b03168152602001886001600160801b03168152602001876001600160801b031681526020018f6001600160801b031681526020018381526020018b6001600160a01b0316815250600360008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a8154816001600160801b0302191690836001600160801b0316021790555060408201518160010160006101000a8154816001600160801b0302191690836001600160801b0316021790555060608201518160010160106101000a8154816001600160801b0302191690836001600160801b031602179055506080820151816002015560a08201518160030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050610a6a898686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ffa92505050565b80516003805460208401516001600160801b03199182166001600160801b03948516178416600160801b9185168202179092556040840151600480546060870151931691851691909117841691909316909102179055608081015160055560a00151600680546001600160a01b0319166001600160a01b0390921691909117905550505050505050505050505050565b600060038960601b60601c6001600160a01b03168960601b60601c6001600160a01b0316898989898989604051602001808a60ff1660ff1660f81b815260010189815260200188815260200187815260200186815260200185815260200184815260200183838082843780830192505050995050505050505050505060405160208183030381529060405280519060200120905098975050505050505050565b6004546001600160801b031690565b600181565b60005461010090046001600160a01b031681565b6001546001600160a01b031681565b600090815260026020526040902054151590565b8251600090610100811115610bf957600080fd5b8260005b82811015610ca95760028606610c5657868181518110610c1957fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150610c9b565b81878281518110610c6357fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101610bfd565b5095945050505050565b805160009082908290610cc257fe5b01602001516001600160f81b0319161415610e18578051606114610d1a576040805162461bcd60e51b815260206004820152600a6024820152690848288be988a9c8ea8960b31b604482015290519081900360640190fd5b6000610d2d82600163ffffffff61121716565b9050610d3881610bd1565b15610d81576040805162461bcd60e51b8152602060048201526014602482015273454e5452595f414c52454144595f45584953545360601b604482015290519081900360640190fd5b6000610d9483602163ffffffff61121716565b90506000610da984604163ffffffff61121716565b9050610db36112a5565b5060408051602080820183528382526000868152600282528390208251905582518681529081018490528083018590529151909185917fe5ccc8d7080a4904b2f4e42d91e8f06b13fe6cb2181ad1fe14644e856b44c1319181900360600190a2505050505b50565b6000610100845110610e65576040805162461bcd60e51b815260206004820152600e60248201526d50524f4f465f544f4f5f4c4f4e4760901b604482015290519081900360640190fd5b835160020a8310610eb0576040805162461bcd60e51b815260206004820152601060248201526f1410551217d393d517d352539253505360821b604482015290519081900360640190fd5b6000610ebd858585610506565b6000878152600260205260409020805491925090610f14576040805162461bcd60e51b815260206004820152600f60248201526e4e4f5f4f5554424f585f454e54525960881b604482015290519081900360640190fd5b8551604080516020808201899052818301939093528151808203830181526060909101825280519083012060008181526001850190935291205460ff1615610f93576040805162461bcd60e51b815260206004820152600d60248201526c1053149150511657d4d4115395609a1b604482015290519081900360640190fd5b81548314610fd3576040805162461bcd60e51b815260206004820152600860248201526710905117d493d3d560c21b604482015290519081900360640190fd5b6000818152600192830160205260409020805460ff19169092179091559695505050505050565b600154604051639e5d4c4960e01b81526001600160a01b03858116600483019081526024830186905260606044840181815286516064860152865160009692959490921693639e5d4c49938a938a938a93909160849091019060208501908083838e5b8381101561107557818101518382015260200161105d565b50505050905090810190601f1680156110a25780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156110c357600080fd5b505af11580156110d7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561110057600080fd5b815160208301805160405192949293830192919084600160201b82111561112657600080fd5b90830190602082018581111561113b57600080fd5b8251600160201b81118282018810171561115457600080fd5b82525081516020918201929091019080838360005b83811015611181578181015183820152602001611169565b50505050905090810190601f1680156111ae5780820380516001836020036101000a031916815260200191505b506040525050509150915081611210578051156111ce5780518082602001fd5b6040805162461bcd60e51b81526020600482015260126024820152711094925111d157d0d0531317d1905253115160721b604482015290519081900360640190fd5b5050505050565b60008160200183511015611267576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60408051602081019091526000815290565b600080858511156112c6578182fd5b838611156112d2578182fd5b505082019391909203915056fea2646970667358221220767004b2eded0b2e68c20232247b168ceca5eb5578398f78770ead63ded5a1b964736f6c634300060b0033", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"outboxEntryIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"transactionIndex\",\"type\":\"uint256\"}],\"name\":\"OutBoxTransactionExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchNum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outboxEntryIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"outputRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numInBatch\",\"type\":\"uint256\"}],\"name\":\"OutboxEntryCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"OUTBOX_VERSION\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"l2Block\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l1Block\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l2Timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"calldataForL1\",\"type\":\"bytes\"}],\"name\":\"calculateItemHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"path\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"item\",\"type\":\"bytes32\"}],\"name\":\"calculateMerkleRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"l2Sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"l2Block\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l1Block\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l2Timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"calldataForL1\",\"type\":\"bytes\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rollup\",\"type\":\"address\"},{\"internalType\":\"contractIBridge\",\"name\":\"_bridge\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isNitroReady\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1BatchNum\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1Block\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1EthBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1OutputId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1Sender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2ToL1Timestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"outboxEntries\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNum\",\"type\":\"uint256\"}],\"name\":\"outboxEntryExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sendsData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"sendLengths\",\"type\":\"uint256[]\"}],\"name\":\"processOutgoingMessages\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"newBridge\",\"type\":\"address\"}],\"name\":\"setBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506000805460ff1916600117905561145a8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106101105760003560e01c80638dd14802116100ad578063b0f3053711610071578063b0f3053714610501578063c75184df14610509578063cb23bcb51461052d578063e78cea9214610535578063f1fd3a391461053d57610110565b80638dd148021461031b5780639229bab6146103415780639c5cfe0b1461035e5780639f0c04bf1461045a578063a8929e0b146104f957610110565b80627436d3146101155780630c726847146101cd578063119852711461028d5780634654779014610295578063485cc9551461029d5780636f791d29146102cb57806372f2a8c7146102e757806380648b02146102ef5780638515bc6a14610313575b600080fd5b6101bb6004803603606081101561012b57600080fd5b810190602081018135600160201b81111561014557600080fd5b82018360208201111561015757600080fd5b803590602001918460208302840111600160201b8311171561017857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020013561055a565b60408051918252519081900360200190f35b61028b600480360360408110156101e357600080fd5b810190602081018135600160201b8111156101fd57600080fd5b82018360208201111561020f57600080fd5b803590602001918460018302840111600160201b8311171561023057600080fd5b919390929091602081019035600160201b81111561024d57600080fd5b82018360208201111561025f57600080fd5b803590602001918460208302840111600160201b8311171561028057600080fd5b509092509050610595565b005b6101bb610681565b6101bb610697565b61028b600480360360408110156102b357600080fd5b506001600160a01b03813581169160200135166106a6565b6102d3610730565b604080519115158252519081900360200190f35b6101bb610739565b6102f761073f565b604080516001600160a01b039092168252519081900360200190f35b6101bb61074e565b61028b6004803603602081101561033157600080fd5b50356001600160a01b0316610764565b6101bb6004803603602081101561035757600080fd5b503561084f565b61028b600480360361014081101561037557600080fd5b81359190810190604081016020820135600160201b81111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460208302840111600160201b831117156103c957600080fd5b919390928235926001600160a01b03602082013581169360408301359091169260608301359260808101359260a08201359260c08301359261010081019060e00135600160201b81111561041c57600080fd5b82018360208201111561042e57600080fd5b803590602001918460018302840111600160201b8311171561044f57600080fd5b509092509050610861565b6101bb600480360360e081101561047057600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359160808201359160a08101359181019060e0810160c0820135600160201b8111156104bb57600080fd5b8201836020820111156104cd57600080fd5b803590602001918460018302840111600160201b831117156104ee57600080fd5b509092509050610c39565b6101bb610cd9565b6101bb610cdf565b610511610cee565b604080516001600160801b039092168252519081900360200190f35b6102f7610cf3565b6102f7610d07565b6102d36004803603602081101561055357600080fd5b5035610d16565b600061058d8484846040516020018082815260200191505060405160208183030381529060405280519060200120610d2a565b949350505050565b60005461010090046001600160a01b031633146105e7576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b806000805b828110156106785761065687838888888681811061060657fe5b9050602002013586019261061c939291906113fc565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610df892505050565b84848281811061066257fe5b60200291909101359290920191506001016105ec565b50505050505050565b600454600160801b90046001600160801b031690565b6003546001600160801b031690565b60005461010090046001600160a01b0316156106f8576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b60008054610100600160a81b0319166101006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b60005460ff1690565b60055490565b6006546001600160a01b031690565b600354600160801b90046001600160801b031690565b600160009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107b257600080fd5b505afa1580156107c6573d6000803e3d6000fd5b505050506040513d60208110156107dc57600080fd5b50516001600160a01b0316331461082d576040805162461bcd60e51b815260206004820152601060248201526f2727aa2fa12924a223a2afa7aba722a960811b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60026020526000908152604090205481565b6000806108748a8a8a8a8a8a8a8a610c39565b90506108c38e8e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d84610f60565b91508d8a6001600160a01b03168a6001600160a01b03167f20af7f3bbfe38132b8900ae295cd9c8d1914be7052d061a511f3f728dab189648e6040518082815260200191505060405180910390a45061091a6113b5565b60036040518060c00160405290816000820160009054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016000820160109054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016001820160009054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016001820160109054906101000a90046001600160801b03166001600160801b03166001600160801b03168152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152505090506040518060c00160405280896001600160801b03168152602001886001600160801b03168152602001876001600160801b031681526020018f6001600160801b031681526020018381526020018b6001600160a01b0316815250600360008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a8154816001600160801b0302191690836001600160801b0316021790555060408201518160010160006101000a8154816001600160801b0302191690836001600160801b0316021790555060608201518160010160106101000a8154816001600160801b0302191690836001600160801b031602179055506080820151816002015560a08201518160030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050610ba9898686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061113f92505050565b80516003805460208401516001600160801b03199182166001600160801b03948516178416600160801b9185168202179092556040840151600480546060870151931691851691909117841691909316909102179055608081015160055560a00151600680546001600160a01b0319166001600160a01b0390921691909117905550505050505050505050505050565b600060038960601b60601c6001600160a01b03168960601b60601c6001600160a01b0316898989898989604051602001808a60ff1660ff1660f81b815260010189815260200188815260200187815260200186815260200185815260200184815260200183838082843780830192505050995050505050505050505060405160208183030381529060405280519060200120905098975050505050505050565b61a4b490565b6004546001600160801b031690565b600181565b60005461010090046001600160a01b031681565b6001546001600160a01b031681565b600090815260026020526040902054151590565b8251600090610100811115610d3e57600080fd5b8260005b82811015610dee5760028606610d9b57868181518110610d5e57fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150610de0565b81878281518110610da857fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101610d42565b5095945050505050565b805160009082908290610e0757fe5b01602001516001600160f81b0319161415610f5d578051606114610e5f576040805162461bcd60e51b815260206004820152600a6024820152690848288be988a9c8ea8960b31b604482015290519081900360640190fd5b6000610e7282600163ffffffff61135c16565b9050610e7d81610d16565b15610ec6576040805162461bcd60e51b8152602060048201526014602482015273454e5452595f414c52454144595f45584953545360601b604482015290519081900360640190fd5b6000610ed983602163ffffffff61135c16565b90506000610eee84604163ffffffff61135c16565b9050610ef86113ea565b5060408051602080820183528382526000868152600282528390208251905582518681529081018490528083018590529151909185917fe5ccc8d7080a4904b2f4e42d91e8f06b13fe6cb2181ad1fe14644e856b44c1319181900360600190a2505050505b50565b6000610100845110610faa576040805162461bcd60e51b815260206004820152600e60248201526d50524f4f465f544f4f5f4c4f4e4760901b604482015290519081900360640190fd5b835160020a8310610ff5576040805162461bcd60e51b815260206004820152601060248201526f1410551217d393d517d352539253505360821b604482015290519081900360640190fd5b600061100285858561055a565b6000878152600260205260409020805491925090611059576040805162461bcd60e51b815260206004820152600f60248201526e4e4f5f4f5554424f585f454e54525960881b604482015290519081900360640190fd5b8551604080516020808201899052818301939093528151808203830181526060909101825280519083012060008181526001850190935291205460ff16156110d8576040805162461bcd60e51b815260206004820152600d60248201526c1053149150511657d4d4115395609a1b604482015290519081900360640190fd5b81548314611118576040805162461bcd60e51b815260206004820152600860248201526710905117d493d3d560c21b604482015290519081900360640190fd5b6000818152600192830160205260409020805460ff19169092179091559695505050505050565b600154604051639e5d4c4960e01b81526001600160a01b03858116600483019081526024830186905260606044840181815286516064860152865160009692959490921693639e5d4c49938a938a938a93909160849091019060208501908083838e5b838110156111ba5781810151838201526020016111a2565b50505050905090810190601f1680156111e75780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561120857600080fd5b505af115801561121c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561124557600080fd5b815160208301805160405192949293830192919084600160201b82111561126b57600080fd5b90830190602082018581111561128057600080fd5b8251600160201b81118282018810171561129957600080fd5b82525081516020918201929091019080838360005b838110156112c65781810151838201526020016112ae565b50505050905090810190601f1680156112f35780820380516001836020036101000a031916815260200191505b506040525050509150915081611355578051156113135780518082602001fd5b6040805162461bcd60e51b81526020600482015260126024820152711094925111d157d0d0531317d1905253115160721b604482015290519081900360640190fd5b5050505050565b600081602001835110156113ac576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60408051602081019091526000815290565b6000808585111561140b578182fd5b83861115611417578182fd5b505082019391909203915056fea2646970667358221220b8a07fdd4002ff00965732e20a6a2b65fe9c9f128e8325843424ab200c3aff1a64736f6c634300060b0033", } // OutboxABI is the input ABI used to generate the binding from. @@ -356,6 +356,37 @@ func (_Outbox *OutboxCallerSession) IsMaster() (bool, error) { return _Outbox.Contract.IsMaster(&_Outbox.CallOpts) } +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_Outbox *OutboxCaller) IsNitroReady(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Outbox.contract.Call(opts, &out, "isNitroReady") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_Outbox *OutboxSession) IsNitroReady() (*big.Int, error) { + return _Outbox.Contract.IsNitroReady(&_Outbox.CallOpts) +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_Outbox *OutboxCallerSession) IsNitroReady() (*big.Int, error) { + return _Outbox.Contract.IsNitroReady(&_Outbox.CallOpts) +} + // L2ToL1BatchNum is a free data retrieval call binding the contract method 0x11985271. // // Solidity: function l2ToL1BatchNum() view returns(uint256) @@ -698,6 +729,27 @@ func (_Outbox *OutboxTransactorSession) ProcessOutgoingMessages(sendsData []byte return _Outbox.Contract.ProcessOutgoingMessages(&_Outbox.TransactOpts, sendsData, sendLengths) } +// SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. +// +// Solidity: function setBridge(address newBridge) returns() +func (_Outbox *OutboxTransactor) SetBridge(opts *bind.TransactOpts, newBridge common.Address) (*types.Transaction, error) { + return _Outbox.contract.Transact(opts, "setBridge", newBridge) +} + +// SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. +// +// Solidity: function setBridge(address newBridge) returns() +func (_Outbox *OutboxSession) SetBridge(newBridge common.Address) (*types.Transaction, error) { + return _Outbox.Contract.SetBridge(&_Outbox.TransactOpts, newBridge) +} + +// SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. +// +// Solidity: function setBridge(address newBridge) returns() +func (_Outbox *OutboxTransactorSession) SetBridge(newBridge common.Address) (*types.Transaction, error) { + return _Outbox.Contract.SetBridge(&_Outbox.TransactOpts, newBridge) +} + // OutboxOutBoxTransactionExecutedIterator is returned from FilterOutBoxTransactionExecuted and is used to iterate over the raw logs and unpacked data for OutBoxTransactionExecuted events raised by the Outbox contract. type OutboxOutBoxTransactionExecutedIterator struct { Event *OutboxOutBoxTransactionExecuted // Event containing the contract specifics and raw log diff --git a/packages/arb-util/ethbridgecontracts/RollupAdminFacet.go b/packages/arb-util/ethbridgecontracts/RollupAdminFacet.go index 87a2fb35c4..2f63552c49 100755 --- a/packages/arb-util/ethbridgecontracts/RollupAdminFacet.go +++ b/packages/arb-util/ethbridgecontracts/RollupAdminFacet.go @@ -30,8 +30,8 @@ var ( // RollupAdminFacetMetaData contains all meta data concerning the RollupAdminFacet contract. var RollupAdminFacetMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterSendAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterSendCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterLogAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterLogCount\",\"type\":\"uint256\"}],\"name\":\"NodeConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"parentNodeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"nodeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"executionHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inboxMaxCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterInboxBatchEndCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterInboxBatchAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32[3][2]\",\"name\":\"assertionBytes32Fields\",\"type\":\"bytes32[3][2]\"},{\"indexed\":false,\"internalType\":\"uint256[4][2]\",\"name\":\"assertionIntFields\",\"type\":\"uint256[4][2]\"}],\"name\":\"NodeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"NodeRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"OwnerFunctionCalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"challengeContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asserter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"challengedNode\",\"type\":\"uint256\"}],\"name\":\"RollupChallengeStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"machineHash\",\"type\":\"bytes32\"}],\"name\":\"RollupCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalBalance\",\"type\":\"uint256\"}],\"name\":\"UserStakeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalBalance\",\"type\":\"uint256\"}],\"name\":\"UserWithdrawableFundsUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"STORAGE_GAP_1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STORAGE_GAP_2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"_stakerMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"latestStakedNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountStaked\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"currentChallenge\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isStaked\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"amountStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbGasSpeedLimitPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"avmGasSpeedLimitPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeExecutionBisectionDegree\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeFactory\",\"outputs\":[{\"internalType\":\"contractIChallengeFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"confirmPeriodBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"currentChallenge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedBridge\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraChallengeTimeBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstUnresolvedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"beforeSendAcc\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sendsData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"sendLengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"afterSendCount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"afterLogAcc\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"afterLogCount\",\"type\":\"uint256\"}],\"name\":\"forceConfirmNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expectedNodeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[3][2]\",\"name\":\"assertionBytes32Fields\",\"type\":\"bytes32[3][2]\"},{\"internalType\":\"uint256[4][2]\",\"name\":\"assertionIntFields\",\"type\":\"uint256[4][2]\"},{\"internalType\":\"bytes\",\"name\":\"sequencerBatchProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"beforeProposedBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"beforeInboxMaxCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"prevNode\",\"type\":\"uint256\"}],\"name\":\"forceCreateNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"staker\",\"type\":\"address[]\"}],\"name\":\"forceRefundStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"stakerA\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"stakerB\",\"type\":\"address[]\"}],\"name\":\"forceResolveChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"getNode\",\"outputs\":[{\"internalType\":\"contractINode\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getNodeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stakerNum\",\"type\":\"uint256\"}],\"name\":\"getStakerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isZombie\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastStakeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfirmed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestNodeCreated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"latestStakedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumAssertionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nodeFactory\",\"outputs\":[{\"internalType\":\"contractINodeFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outbox\",\"outputs\":[{\"internalType\":\"contractIOutbox\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"_outbox\",\"type\":\"address\"}],\"name\":\"removeOldOutbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resume\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupEventBridge\",\"outputs\":[{\"internalType\":\"contractRollupEventBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerBridge\",\"outputs\":[{\"internalType\":\"contractISequencerInbox\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newAvmGasSpeedLimitPerBlock\",\"type\":\"uint256\"}],\"name\":\"setAvmGasSpeedLimitPerBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newBaseStake\",\"type\":\"uint256\"}],\"name\":\"setBaseStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newChallengeExecutionBisectionDegree\",\"type\":\"uint256\"}],\"name\":\"setChallengeExecutionBisectionDegree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newConfirmPeriod\",\"type\":\"uint256\"}],\"name\":\"setConfirmPeriodBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newExtraTimeBlocks\",\"type\":\"uint256\"}],\"name\":\"setExtraChallengeTimeBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdminFacet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newUserFacet\",\"type\":\"address\"}],\"name\":\"setFacets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_inbox\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_enabled\",\"type\":\"bool\"}],\"name\":\"setInbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSequencer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isSequencer\",\"type\":\"bool\"}],\"name\":\"setIsSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newPeriod\",\"type\":\"uint256\"}],\"name\":\"setMinimumAssertionPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIOutbox\",\"name\":\"_outbox\",\"type\":\"address\"}],\"name\":\"setOutbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newSequencerInboxMaxDelayBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newSequencerInboxMaxDelaySeconds\",\"type\":\"uint256\"}],\"name\":\"setSequencerInboxMaxDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newStakeToken\",\"type\":\"address\"}],\"name\":\"setStakeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_validator\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"_val\",\"type\":\"bool[]\"}],\"name\":\"setValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"whitelist\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"user\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"val\",\"type\":\"bool[]\"}],\"name\":\"setWhitelistEntries\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakerCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"whitelist\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newWhitelist\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateWhitelistConsumers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeBeacon\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawableFunds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"}],\"name\":\"zombieAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zombieCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"}],\"name\":\"zombieLatestStakedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506000805460ff19908116600117909155600b805490911690556137e2806100396000396000f3fe608060405234801561001057600080fd5b506004361061032f5760003560e01c80637c75c298116101b4578063d01e6602116100fa578063e8bd49221161009d578063e8bd492214610b97578063ef40a67014610bf3578063f33e1fac14610c19578063f38c937914610c36578063f51de41b14610d59578063f53f5afa14610d61578063f8d1f19414610e37578063ff204f3b14610e545761032f565b8063d01e660214610b1c578063d735e21d14610b39578063d7445bc814610b41578063d93fe9c414610b49578063dc72a33b14610b51578063dff6978714610b59578063e45b7ce614610b61578063e4781e1014610b8f5761032f565b806391c657e81161016257806391c657e8146107c8578063948d6588146107ee5780639e8a713f1461080b5780639ea28e6514610813578063a3ffb772146108a1578063a5cc82f8146109c4578063ce11e6ab146109e1578063cf47bb84146109e95761032f565b80637c75c298146106bc5780637f4320ce1461075d5780638456cb5914610765578063848bf9181461076d5780638640ce5f1461079b5780638da5cb5b146107a35780639161d535146107ab5761032f565b8063567ca41b1161027957806365f7f80d1161022757806365f7f80d14610597578063661d27221461059f57806369fd251c146106595780636aef131a1461067f5780636f791d291461069c57806376e7e23b146106a4578063771b2f97146106ac5780637ba9534a146106b45761032f565b8063567ca41b146104fa5780635c975abb146105205780635dbaf68b1461053c5780635e8ef106146105445780636177fd181461054c57806362a82d7d1461057257806363721d6b1461058f5761032f565b80632f30cabd116102e15780632f30cabd1461041d5780633e55c0c7146104435780633e96576e146104675780633ea410981461048d57806340b570f4146104aa57806345e38b64146104cd5780634f0f4aa9146104d557806351ed6a30146104f25761032f565b80630397d45814610334578063046f7da21461035c57806306ae58511461036457806313af4035146103815780631f956632146103a757806327035859146103d55780632e7acfa614610403575b600080fd5b61035a6004803603602081101561034a57600080fd5b50356001600160a01b0316610e7a565b005b61035a610eb2565b61035a6004803603602081101561037a57600080fd5b5035610ed6565b61035a6004803603602081101561039757600080fd5b50356001600160a01b0316610ef8565b61035a600480360360408110156103bd57600080fd5b506001600160a01b0381351690602001351515610f30565b61035a600480360360408110156103eb57600080fd5b506001600160a01b0381358116916020013516610fbc565b61040b61104c565b60408051918252519081900360200190f35b61040b6004803603602081101561043357600080fd5b50356001600160a01b0316611052565b61044b611071565b604080516001600160a01b039092168252519081900360200190f35b61040b6004803603602081101561047d57600080fd5b50356001600160a01b0316611080565b61035a600480360360208110156104a357600080fd5b503561109e565b61035a600480360360408110156104c057600080fd5b50803590602001356110c0565b61040b61114a565b61044b600480360360208110156104eb57600080fd5b5035611150565b61044b61116b565b61035a6004803603602081101561051057600080fd5b50356001600160a01b031661117a565b610528611252565b604080519115158252519081900360200190f35b61044b61125b565b61040b61126a565b6105286004803603602081101561056257600080fd5b50356001600160a01b0316611270565b61044b6004803603602081101561058857600080fd5b5035611298565b61040b6112c2565b61040b6112c8565b61035a600480360360608110156105b557600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156105e857600080fd5b8201836020820111156105fa57600080fd5b803590602001918460208302840111600160201b8311171561061b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506112ce945050505050565b61044b6004803603602081101561066f57600080fd5b50356001600160a01b0316611394565b61035a6004803603602081101561069557600080fd5b50356113b5565b6105286113d7565b61040b6113e0565b61040b6113e6565b61040b6113ec565b61035a600480360360208110156106d257600080fd5b810190602081018135600160201b8111156106ec57600080fd5b8201836020820111156106fe57600080fd5b803590602001918460208302840111600160201b8311171561071f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506113f2945050505050565b61040b6114af565b61035a6114b5565b61035a6004803603604081101561078357600080fd5b506001600160a01b03813581169160200135166114d9565b61040b611567565b61044b61156d565b61035a600480360360208110156107c157600080fd5b503561157c565b610528600480360360208110156107de57600080fd5b50356001600160a01b031661159e565b61035a6004803603602081101561080457600080fd5b50356115f8565b61044b61161a565b61035a600480360361026081101561082a57600080fd5b813591602081019160e08201919081019061020081016101e0820135600160201b81111561085757600080fd5b82018360208201111561086957600080fd5b803590602001918460018302840111600160201b8311171561088a57600080fd5b919350915080359060208101359060400135611629565b61035a600480360360408110156108b757600080fd5b810190602081018135600160201b8111156108d157600080fd5b8201836020820111156108e357600080fd5b803590602001918460208302840111600160201b8311171561090457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561095357600080fd5b82018360208201111561096557600080fd5b803590602001918460208302840111600160201b8311171561098657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611889945050505050565b61035a600480360360208110156109da57600080fd5b5035611957565b61044b611979565b61035a600480360360608110156109ff57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610a2957600080fd5b820183602082011115610a3b57600080fd5b803590602001918460208302840111600160201b83111715610a5c57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610aab57600080fd5b820183602082011115610abd57600080fd5b803590602001918460208302840111600160201b83111715610ade57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611988945050505050565b61044b60048036036020811015610b3257600080fd5b5035611acf565b61040b611afe565b61040b611b04565b61044b611b0a565b61040b611b19565b61040b611b1f565b61035a60048036036040811015610b7757600080fd5b506001600160a01b0381351690602001351515611b25565b61040b611bb1565b610bbd60048036036020811015610bad57600080fd5b50356001600160a01b0316611bb7565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b61040b60048036036020811015610c0957600080fd5b50356001600160a01b0316611bf3565b61040b60048036036020811015610c2f57600080fd5b5035611c11565b61035a60048036036040811015610c4c57600080fd5b810190602081018135600160201b811115610c6657600080fd5b820183602082011115610c7857600080fd5b803590602001918460208302840111600160201b83111715610c9957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ce857600080fd5b820183602082011115610cfa57600080fd5b803590602001918460208302840111600160201b83111715610d1b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611c39945050505050565b61044b611e01565b61035a600480360360e0811015610d7757600080fd5b813591602081013591810190606081016040820135600160201b811115610d9d57600080fd5b820183602082011115610daf57600080fd5b803590602001918460018302840111600160201b83111715610dd057600080fd5b919390929091602081019035600160201b811115610ded57600080fd5b820183602082011115610dff57600080fd5b803590602001918460208302840111600160201b83111715610e2057600080fd5b919350915080359060208101359060400135611e10565b61040b60048036036020811015610e4d57600080fd5b5035611eb3565b61035a60048036036020811015610e6a57600080fd5b50356001600160a01b0316611ec5565b601780546001600160a01b0319166001600160a01b038316179055604051600d9060008051602061378d83398151915290600090a250565b610eba611f63565b60405160049060008051602061378d83398151915290600090a2565b600f819055604051600c9060008051602061378d83398151915290600090a250565b601680546001600160a01b0319166001600160a01b03831617905560405160079060008051602061378d83398151915290600090a250565b60115460408051630fcab31960e11b81526001600160a01b038581166004830152841515602483015291519190921691631f95663291604480830192600092919082900301818387803b158015610f8657600080fd5b505af1158015610f9a573d6000803e3d6000fd5b50506040516013925060008051602061378d8339815191529150600090a25050565b81601c600081548110610fcb57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080601c60018154811061100857fe5b6000918252602082200180546001600160a01b0319166001600160a01b03939093169290921790915560405160059160008051602061378d83398151915291a25050565b600c5481565b6001600160a01b0381166000908152600a60205260409020545b919050565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b600c81905560405160099060008051602061378d83398151915290600090a250565b601154604080516326a407d560e11b8152600481018590526024810184905290516001600160a01b0390921691634d480faa9160448082019260009290919082900301818387803b15801561111457600080fd5b505af1158015611128573d6000803e3d6000fd5b5050604051600e925060008051602061378d8339815191529150600090a25050565b60185481565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b6012546001600160a01b03828116911614156111ca576040805162461bcd60e51b815260206004820152600a602482015269086aaa4be9eaaa8849eb60b31b604482015290519081900360640190fd5b601054604080516319dc7ae560e31b81526001600160a01b038481166004830152600060248301819052925193169263cee3d7289260448084019391929182900301818387803b15801561121d57600080fd5b505af1158015611231573d6000803e3d6000fd5b50506040516001925060008051602061378d8339815191529150600090a250565b600b5460ff1690565b6014546001600160a01b031681565b600e5490565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b6000600782815481106112a757fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b604080516337ca261760e01b81526001600160a01b038481166004830190815260248301938452845160448401528451918716936337ca261793879387939291606401906020808601910280838360005b8381101561133757818101518382015260200161131f565b505050509050019350505050600060405180830381600087803b15801561135d57600080fd5b505af1158015611371573d6000803e3d6000fd5b50506040516011925060008051602061378d8339815191529150600090a2505050565b6001600160a01b039081166000908152600860205260409020600301541690565b601b81905560405160109060008051602061378d83398151915290600090a250565b60005460ff1690565b600f5481565b600d5481565b60035490565b6113fa611252565b611442576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60005b81518110156114915761146c82828151811061145d57fe5b60200260200101516000612003565b5061148982828151811061147c57fe5b60200260200101516120d9565b600101611445565b5060405160169060008051602061378d83398151915290600090a250565b601a5481565b6114bd61218d565b60405160039060008051602061378d83398151915290600090a2565b816001600160a01b0316633659cfe6826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561153157600080fd5b505af1158015611545573d6000803e3d6000fd5b50506040516014925060008051602061378d8339815191529150600090a25050565b60045490565b6016546001600160a01b031681565b600d819055604051600a9060008051602061378d83398151915290600090a250565b6000805b6009548110156115ef57600981815481106115b957fe5b60009182526020909120600290910201546001600160a01b03848116911614156115e757600191505061106c565b6001016115a2565b50600092915050565b601881905560405160089060008051602061378d83398151915290600090a250565b6013546001600160a01b031681565b611631611252565b611679576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6116816112c8565b81146116cc576040805162461bcd60e51b815260206004820152601560248201527413d3931657d310551154d517d0d3d3919254935151605a1b604482015290519081900360640190fd5b6116d46136be565b60408051808201909152611807908960026000835b8282101561172a57604080516060818101909252908084028601906003908390839080828437600092019190915250505081526001909101906020016116e9565b50506040805180820190915291508a905060026000835b828210156117825760408051608081810190925290808402860190600490839083908082843760009201919091525050508152600190910190602001611741565b505050508686601160009054906101000a90046001600160a01b03166001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b1580156117d657600080fd5b505afa1580156117ea573d6000803e3d6000fd5b505050506040513d602081101561180057600080fd5b5051612210565b6040805160c081018252848152600c546020820152600e54918101919091526011546001600160a01b039081166060830152601354811660808301526015541660a08201529091506118639082908a908a908a908a908f61225e565b5060405160179060008051602061378d83398151915290600090a2505050505050505050565b80518251146118ce576040805162461bcd60e51b815260206004820152600c60248201526b0aea49e9c8ebe988a9c8ea8960a31b604482015290519081900360640190fd5b60005b8251811015611938578181815181106118e657fe5b6020026020010151601d60008584815181106118fe57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016118d1565b5060405160069060008051602061378d83398151915290600090a25050565b600e819055604051600b9060008051602061378d83398151915290600090a250565b6012546001600160a01b031681565b80518251146119ce576040805162461bcd60e51b815260206004820152600d60248201526c1253959053125117d253941555609a1b604482015290519081900360640190fd5b60408051633b99adf760e01b8152600481019182528351604482015283516001600160a01b03861692633b99adf792869286929182916024820191606401906020808801910280838360005b83811015611a32578181015183820152602001611a1a565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015611a71578181015183820152602001611a59565b50505050905001945050505050600060405180830381600087803b158015611a9857600080fd5b505af1158015611aac573d6000803e3d6000fd5b50506040516012925060008051602061378d8339815191529150600090a2505050565b600060098281548110611ade57fe5b60009182526020909120600290910201546001600160a01b031692915050565b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b6010546040805163722dbe7360e11b81526001600160a01b03858116600483015284151560248301529151919092169163e45b7ce691604480830192600092919082900301818387803b158015611b7b57600080fd5b505af1158015611b8f573d6000803e3d6000fd5b50506040516002925060008051602061378d8339815191529150600090a25050565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b6001600160a01b031660009081526008602052604090206002015490565b600060098281548110611c2057fe5b9060005260206000209060020201600101549050919050565b611c41611252565b611c89576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b8051825114611cce576040805162461bcd60e51b815260206004820152600c60248201526b0aea49e9c8ebe988a9c8ea8960a31b604482015290519081900360640190fd5b60005b8251811015611de2576000611d0c848381518110611ceb57fe5b6020026020010151848481518110611cff57fe5b6020026020010151612918565b90506001600160a01b038116611d58576040805162461bcd60e51b815260206004820152600c60248201526b1393d517d25397d0d210531360a21b604482015290519081900360640190fd5b611d74848381518110611d6757fe5b60200260200101516129de565b611d83838381518110611d6757fe5b806001600160a01b03166214ebe76040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611dbd57600080fd5b505af1158015611dd1573d6000803e3d6000fd5b505060019093019250611cd1915050565b5060405160159060008051602061378d83398151915290600090a25050565b6010546001600160a01b031681565b611e18611252565b611e60576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b601254601354611e8e918b918b918b918b918b918b918b918b918b916001600160a01b039182169116612a08565b60405160189060008051602061378d83398151915290600090a2505050505050505050565b60009081526006602052604090205490565b601280546001600160a01b0319166001600160a01b03838116918217909255601054604080516319dc7ae560e31b81526004810193909352600160248401525192169163cee3d7289160448082019260009290919082900301818387803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b50506040516000925060008051602061378d83398151915291508290a250565b611f6b611252565b611fb3576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611fe6612cd9565b604080516001600160a01b039092168252519081900360200190a1565b6001600160a01b0382166000908152600860205260408120600281015480841115612068576040805162461bcd60e51b815260206004820152601060248201526f544f4f5f4c4954544c455f5354414b4560801b604482015290519081900360640190fd5b600061207a828663ffffffff612cdd16565b60028401869055905061208d8682612d3a565b604080518381526020810187905281516001600160a01b038916927febd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6928290030190a295945050505050565b6001600160a01b0381811660008181526008602090815260408083208151808301909252938152600180850154928201928352600980549182018155909352517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af600290930292830180546001600160a01b031916919095161790935591517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b09092019190915561218982612dc5565b5050565b612195611252565b156121da576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611fe6612cd9565b6122186136be565b60408051808201909152865186518291612233918888612eeb565b8152602001612252886001602002015188600160200201514387612eeb565b90529695505050505050565b60006122686136e3565b61227189612f89565b60e0820152835161228190611150565b81606001906001600160a01b031690816001600160a01b03168152505083606001516001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b1580156122db57600080fd5b505afa1580156122ef573d6000803e3d6000fd5b505050506040513d602081101561230557600080fd5b5051815260608101516040805163380ed4c760e11b815290516001600160a01b039092169163701da98e91600480820192602092909190829003018186803b15801561235057600080fd5b505afa158015612364573d6000803e3d6000fd5b505050506040513d602081101561237a57600080fd5b5051895161238790612fab565b146123cb576040805162461bcd60e51b815260206004820152600f60248201526e0a0a48aacbea6a882a88abe9082a69608b1b604482015290519081900360640190fd5b805160208a015160400151111561241a576040805162461bcd60e51b815260206004820152600e60248201526d12539093d617d41054d517d1539160921b604482015290519081900360640190fd5b83606001516001600160a01b031663dc1b7b1f87878c60200151604001516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604080518083038186803b15801561249d57600080fd5b505afa1580156124b1573d6000803e3d6000fd5b505050506040513d60408110156124c757600080fd5b5080516020909101516101208301526101008201526124e589613040565b81604001818152505061250a84604001518260e0015186602001518460600151613071565b8160c0018181525050600081606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255257600080fd5b505afa158015612566573d6000803e3d6000fd5b505050506040513d602081101561257c57600080fd5b50511160a0820181905215612606576125fc81606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125cb57600080fd5b505afa1580156125df573d6000803e3d6000fd5b505050506040513d60208110156125f557600080fd5b5051611eb3565b6080820152612617565b835161261190611eb3565b60808201525b8360a001516001600160a01b031663d45ab2b56126378b60200151612fab565b6126468c8560400151436131f7565b61264f8d613214565b88600001518660c001516040518663ffffffff1660e01b81526004018086815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b1580156126ab57600080fd5b505af11580156126bf573d6000803e3d6000fd5b505050506040513d60208110156126d557600080fd5b50516001600160a01b0316602082015260006126ef6113ec565b600101905081606001516001600160a01b0316631bc09d0a826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561273e57600080fd5b505af1158015612752573d6000803e3d6000fd5b505050506127738260a0015183608001518460400151856101200151613244565b92508383146127c0576040805162461bcd60e51b81526020600482015260146024820152730aa9c8ab0a08a86a88a88be9c9e888abe9082a6960631b604482015290519081900360640190fd5b6127ce8260200151846132ab565b6080850151855160c084015160408051638b8ca19960e01b81526004810186905260248101939093526044830191909152336064830152516001600160a01b0390921691638b8ca1999160848082019260009290919082900301818387803b15801561283957600080fd5b505af115801561284d573d6000803e3d6000fd5b505050505061285f8460000151611eb3565b6128676113ec565b7f8016306209aff73e79f274cf38a41928996f746e2953111902e1f55be1713a5484846040015185600001518661010001518761012001518f8f6040518088815260200187815260200186815260200185815260200184815260200183600260600280828437600083820152601f01601f191690910190508261010080828437600083820152604051601f909101601f1916909201829003995090975050505050505050a350979650505050505050565b6001600160a01b03808316600090815260086020526040808220848416835290822060038201549293919290911680612982576040805162461bcd60e51b81526020600482015260076024820152661393d7d0d2105360ca1b604482015290519081900360640190fd5b60038201546001600160a01b038281169116146129d5576040805162461bcd60e51b815260206004820152600c60248201526b1112519197d25397d0d2105360a21b604482015290519081900360640190fd5b95945050505050565b6001600160a01b0316600090815260086020526040902060030180546001600160a01b0319169055565b6000612a898a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508d6132f5565b90506000612a968d611150565b9050612aa58c83888a896133f6565b816001600160a01b03166397bdc5106040518163ffffffff1660e01b815260040160206040518083038186803b158015612ade57600080fd5b505afa158015612af2573d6000803e3d6000fd5b505050506040513d6020811015612b0857600080fd5b505114612b4b576040805162461bcd60e51b815260206004820152600c60248201526b434f4e4649524d5f4441544160a01b604482015290519081900360640190fd5b836001600160a01b0316630c7268478c8c8c8c6040518563ffffffff1660e01b81526004018080602001806020018381038352878782818152602001925080828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b158015612bed57600080fd5b505af1158015612c01573d6000803e3d6000fd5b50505050612c1060015461343d565b60018d81558d01600255604080516316b9109b60e01b8152600481018f905290516001600160a01b038516916316b9109b91602480830192600092919082900301818387803b158015612c6257600080fd5b505af1158015612c76573d6000803e3d6000fd5b505050508c7f2400bd6e429cfcd98fe43a75bbbe4702c59c99d636100690130cc1ebb611c5a2838989896040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050505050505050565b3390565b600082821115612d34576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b0382166000908152600a602052604081205490612d64828463ffffffff6134bf16565b6001600160a01b0385166000818152600a60209081526040918290208490558151868152908101849052815193945091927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae29281900390910190a250505050565b6001600160a01b03811660009081526008602052604090208054600780546000198101908110612df157fe5b600091825260209091200154600780546001600160a01b039092169183908110612e1757fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806008600060078481548110612e5757fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556007805480612e8757fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03949094168152600890935250506040812081815560018101829055600281019190915560030180546001600160a81b0319169055565b612ef3613737565b604080516101208101825285518152865160208201529081018560016020020151815260200185600260048110612f2657fe5b6020020151815260200185600360048110612f3d57fe5b6020020151815260200186600160038110612f5457fe5b6020020151815260200186600260038110612f6b57fe5b60200201518152602001848152602001838152509050949350505050565b805151602082015151600091612fa5919063ffffffff612cdd16565b92915050565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b80518051602083015151600092612fa592918290039061305f90613520565b61306c8660200151613520565b613555565b6000806130a58661309961308c82600163ffffffff612cdd16565b889063ffffffff6134bf16565b9063ffffffff61359316565b9050613134816131286130be438863ffffffff6134bf16565b866001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130f757600080fd5b505afa15801561310b573d6000803e3d6000fd5b505050506040513d602081101561312157600080fd5b50516135fa565b9063ffffffff6134bf16565b91506000836001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561317157600080fd5b505afa158015613185573d6000803e3d6000fd5b505050506040513d602081101561319b57600080fd5b5051905080156131ed576131ea836131b283611150565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130f757600080fd5b92505b5050949350505050565b600061320c8383866020015160400151613610565b949350505050565b805160a09081015160208301519182015160c08301516060840151608090940151600094612fa5949392916133f6565b60008085613253576000613256565b60015b905080858585604051602001808560ff1660ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120915050949350505050565b60038054600101808255600090815260056020908152604080832080546001600160a01b0319166001600160a01b0397909716969096179095559154815260069091529190912055565b81518351600091829184835b838110156133a857600088828151811061331757fe5b60200260200101519050838187011115613367576040805162461bcd60e51b815260206004820152600c60248201526b2220aa20afa7ab22a9292aa760a11b604482015290519081900360640190fd5b6020868b0181018290206040805180840196909652858101919091528051808603820181526060909501905283519301929092209190940193600101613301565b508184146133eb576040805162461bcd60e51b815260206004820152600b60248201526a08882a882be988a9c8ea8960ab1b604482015290519081900360640190fd5b979650505050505050565b60408051602080820197909752808201959095526060850192909252608084019290925260a0808401929092528051808403909201825260c0909201909152805191012090565b60008181526005602052604080822054815163083197ef60e41b815291516001600160a01b03909116926383197ef0926004808201939182900301818387803b15801561348957600080fd5b505af115801561349d573d6000803e3d6000fd5b50505060009182525060056020526040902080546001600160a01b0319169055565b600082820183811015613519576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000612fa58260000151613550846040015185602001518660a0015187606001518860c001518960800151613647565b613692565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b60008082116135e9576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816135f257fe5b049392505050565b60008183116136095781613519565b5090919050565b6040805160208082019590955280820193909352606080840192909252805180840390920182526080909201909152805191012090565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60405180604001604052806136d1613737565b81526020016136de613737565b905290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101200160405280600081526020016000801916815260200160008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152509056feea8787f128d10b2cc0317b0c3960f9ad447f7f6c1ed189db1083ccffd20f456ea26469706673582212205140af610e014fe48ccf2243227e246896e7e89af6d3a7bc0356a4b7de18b84864736f6c634300060b0033", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"challenge\",\"type\":\"address\"}],\"name\":\"ChallengeDestroyedInMigration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterSendAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterSendCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterLogAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterLogCount\",\"type\":\"uint256\"}],\"name\":\"NodeConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"parentNodeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"nodeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"executionHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inboxMaxCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterInboxBatchEndCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterInboxBatchAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32[3][2]\",\"name\":\"assertionBytes32Fields\",\"type\":\"bytes32[3][2]\"},{\"indexed\":false,\"internalType\":\"uint256[4][2]\",\"name\":\"assertionIntFields\",\"type\":\"uint256[4][2]\"}],\"name\":\"NodeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"NodeDestroyedInMigration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"NodeRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"OwnerFunctionCalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"challengeContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asserter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"challengedNode\",\"type\":\"uint256\"}],\"name\":\"RollupChallengeStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"machineHash\",\"type\":\"bytes32\"}],\"name\":\"RollupCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"StakerWithdrawnInMigration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalBalance\",\"type\":\"uint256\"}],\"name\":\"UserStakeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalBalance\",\"type\":\"uint256\"}],\"name\":\"UserWithdrawableFundsUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"STORAGE_GAP_1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STORAGE_GAP_2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"_stakerMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"latestStakedNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountStaked\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"currentChallenge\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isStaked\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"amountStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbGasSpeedLimitPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"avmGasSpeedLimitPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeExecutionBisectionDegree\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeFactory\",\"outputs\":[{\"internalType\":\"contractIChallengeFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"confirmPeriodBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"currentChallenge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedBridge\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraChallengeTimeBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstUnresolvedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"beforeSendAcc\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sendsData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"sendLengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"afterSendCount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"afterLogAcc\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"afterLogCount\",\"type\":\"uint256\"}],\"name\":\"forceConfirmNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expectedNodeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[3][2]\",\"name\":\"assertionBytes32Fields\",\"type\":\"bytes32[3][2]\"},{\"internalType\":\"uint256[4][2]\",\"name\":\"assertionIntFields\",\"type\":\"uint256[4][2]\"},{\"internalType\":\"bytes\",\"name\":\"sequencerBatchProof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"beforeProposedBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"beforeInboxMaxCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"prevNode\",\"type\":\"uint256\"}],\"name\":\"forceCreateNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"staker\",\"type\":\"address[]\"}],\"name\":\"forceRefundStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"stakerA\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"stakerB\",\"type\":\"address[]\"}],\"name\":\"forceResolveChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"getNode\",\"outputs\":[{\"internalType\":\"contractINode\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getNodeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stakerNum\",\"type\":\"uint256\"}],\"name\":\"getStakerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isNitroReady\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isZombie\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastStakeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfirmed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestNodeCreated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"latestStakedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumAssertionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nodeFactory\",\"outputs\":[{\"internalType\":\"contractINodeFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outbox\",\"outputs\":[{\"internalType\":\"contractIOutbox\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"_outbox\",\"type\":\"address\"}],\"name\":\"removeOldOutbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resume\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupEventBridge\",\"outputs\":[{\"internalType\":\"contractRollupEventBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerBridge\",\"outputs\":[{\"internalType\":\"contractISequencerInbox\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newAvmGasSpeedLimitPerBlock\",\"type\":\"uint256\"}],\"name\":\"setAvmGasSpeedLimitPerBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newBaseStake\",\"type\":\"uint256\"}],\"name\":\"setBaseStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newChallengeExecutionBisectionDegree\",\"type\":\"uint256\"}],\"name\":\"setChallengeExecutionBisectionDegree\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newConfirmPeriod\",\"type\":\"uint256\"}],\"name\":\"setConfirmPeriodBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newExtraTimeBlocks\",\"type\":\"uint256\"}],\"name\":\"setExtraChallengeTimeBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdminFacet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newUserFacet\",\"type\":\"address\"}],\"name\":\"setFacets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_inbox\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_enabled\",\"type\":\"bool\"}],\"name\":\"setInbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newSequencer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isSequencer\",\"type\":\"bool\"}],\"name\":\"setIsSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newPeriod\",\"type\":\"uint256\"}],\"name\":\"setMinimumAssertionPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIOutbox\",\"name\":\"_outbox\",\"type\":\"address\"}],\"name\":\"setOutbox\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newSequencerInboxMaxDelayBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newSequencerInboxMaxDelaySeconds\",\"type\":\"uint256\"}],\"name\":\"setSequencerInboxMaxDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newStakeToken\",\"type\":\"address\"}],\"name\":\"setStakeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_validator\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"_val\",\"type\":\"bool[]\"}],\"name\":\"setValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"whitelist\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"user\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"val\",\"type\":\"bool[]\"}],\"name\":\"setWhitelistEntries\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"finalNodeNum\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"destroyAlternatives\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"destroyChallenges\",\"type\":\"bool\"}],\"name\":\"shutdownForNitro\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"shutdownForNitroBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"shutdownForNitroMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakerCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractOwnable\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"undoShutdownForNitro\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"whitelist\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newWhitelist\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"updateWhitelistConsumers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeBeacon\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawableFunds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"}],\"name\":\"zombieAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zombieCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"}],\"name\":\"zombieLatestStakedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506000805460ff19908116600117909155600b80549091169055613fb6806100396000396000f3fe608060405234801561001057600080fd5b50600436106103715760003560e01c80637c75c298116101d5578063cf47bb8411610105578063e4781e10116100a8578063e4781e1014610c4c578063e8bd492214610c54578063ef40a67014610cb0578063f33e1fac14610cd6578063f38c937914610cf3578063f51de41b14610e16578063f53f5afa14610e1e578063f8d1f19414610ef4578063ff204f3b14610f1157610371565b8063cf47bb8414610aa6578063d01e660214610bd9578063d735e21d14610bf6578063d7445bc814610bfe578063d93fe9c414610c06578063dc72a33b14610c0e578063dff6978714610c16578063e45b7ce614610c1e57610371565b80639161d535116101785780639161d5351461086057806391c657e81461087d578063948d6588146108a35780639e8a713f146108c05780639ea28e65146108c8578063a3ffb77214610956578063a5cc82f814610a79578063a8929e0b14610a96578063ce11e6ab14610a9e57610371565b80637c75c298146107615780637e6c255f146108025780637f4320ce1461080a5780637f60abbb146108125780638456cb591461081a578063848bf918146108225780638640ce5f146108505780638da5cb5b1461085857610371565b806351ed6a30116102b057806365f7f80d1161025357806365f7f80d1461060e578063661d27221461061657806369fd251c146106d05780636aef131a146106f65780636d435421146107135780636f791d291461074157806376e7e23b14610749578063771b2f97146107515780637ba9534a1461075957610371565b806351ed6a301461057d578063567ca41b146105855780635c975abb146105ab5780635dbaf68b146105b35780635e8ef106146105bb5780636177fd18146105c357806362a82d7d146105e957806363721d6b1461060657610371565b80632f30cabd116103185780632f30cabd1461048c578063313a04fa146104b25780633e55c0c7146104ce5780633e96576e146104f25780633ea410981461051857806340b570f41461053557806345e38b64146105585780634f0f4aa91461056057610371565b80630397d45814610376578063046f7da21461039e57806306ae5851146103a657806313af4035146103c35780631d0ada65146103e95780631f9566321461041657806327035859146104445780632e7acfa614610472575b600080fd5b61039c6004803603602081101561038c57600080fd5b50356001600160a01b0316610f37565b005b61039c610f6f565b61039c600480360360208110156103bc57600080fd5b5035610f93565b61039c600480360360208110156103d957600080fd5b50356001600160a01b0316610fb5565b61039c600480360360608110156103ff57600080fd5b508035906020810135151590604001351515610fed565b61039c6004803603604081101561042c57600080fd5b506001600160a01b0381351690602001351515611538565b61039c6004803603604081101561045a57600080fd5b506001600160a01b03813581169160200135166115c4565b61047a611654565b60408051918252519081900360200190f35b61047a600480360360208110156104a257600080fd5b50356001600160a01b031661165a565b6104ba611679565b604080519115158252519081900360200190f35b6104d6611682565b604080516001600160a01b039092168252519081900360200190f35b61047a6004803603602081101561050857600080fd5b50356001600160a01b0316611691565b61039c6004803603602081101561052e57600080fd5b50356116af565b61039c6004803603604081101561054b57600080fd5b50803590602001356116d1565b61047a61175b565b6104d66004803603602081101561057657600080fd5b5035611761565b6104d661177c565b61039c6004803603602081101561059b57600080fd5b50356001600160a01b031661178b565b6104ba611863565b6104d661186c565b61047a61187b565b6104ba600480360360208110156105d957600080fd5b50356001600160a01b0316611881565b6104d6600480360360208110156105ff57600080fd5b50356118a9565b61047a6118d3565b61047a6118d9565b61039c6004803603606081101561062c57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561065f57600080fd5b82018360208201111561067157600080fd5b803590602001918460208302840111600160201b8311171561069257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506118df945050505050565b6104d6600480360360208110156106e657600080fd5b50356001600160a01b03166119a5565b61039c6004803603602081101561070c57600080fd5b50356119c6565b61039c6004803603604081101561072957600080fd5b506001600160a01b03813581169160200135166119e8565b6104ba611a76565b61047a611a7f565b61047a611a85565b61047a611a8b565b61039c6004803603602081101561077757600080fd5b810190602081018135600160201b81111561079157600080fd5b8201836020820111156107a357600080fd5b803590602001918460208302840111600160201b831117156107c457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611a91945050505050565b61039c611b45565b61047a611c03565b61047a611c09565b61039c611c0f565b61039c6004803603604081101561083857600080fd5b506001600160a01b0381358116916020013516611c33565b61047a611cc1565b6104d6611cc7565b61039c6004803603602081101561087657600080fd5b5035611cd6565b6104ba6004803603602081101561089357600080fd5b50356001600160a01b0316611cf8565b61039c600480360360208110156108b957600080fd5b5035611d52565b6104d6611d74565b61039c60048036036102608110156108df57600080fd5b813591602081019160e08201919081019061020081016101e0820135600160201b81111561090c57600080fd5b82018360208201111561091e57600080fd5b803590602001918460018302840111600160201b8311171561093f57600080fd5b919350915080359060208101359060400135611d83565b61039c6004803603604081101561096c57600080fd5b810190602081018135600160201b81111561098657600080fd5b82018360208201111561099857600080fd5b803590602001918460208302840111600160201b831117156109b957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610a0857600080fd5b820183602082011115610a1a57600080fd5b803590602001918460208302840111600160201b83111715610a3b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611fda945050505050565b61039c60048036036020811015610a8f57600080fd5b50356120a8565b61047a6120ca565b6104d66120d0565b61039c60048036036060811015610abc57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610ae657600080fd5b820183602082011115610af857600080fd5b803590602001918460208302840111600160201b83111715610b1957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b6857600080fd5b820183602082011115610b7a57600080fd5b803590602001918460208302840111600160201b83111715610b9b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506120df945050505050565b6104d660048036036020811015610bef57600080fd5b5035612226565b61047a612255565b61047a61225b565b6104d6612261565b61047a612270565b61047a612276565b61039c60048036036040811015610c3457600080fd5b506001600160a01b038135169060200135151561227c565b61047a612308565b610c7a60048036036020811015610c6a57600080fd5b50356001600160a01b031661230e565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b61047a60048036036020811015610cc657600080fd5b50356001600160a01b031661234a565b61047a60048036036020811015610cec57600080fd5b5035612368565b61039c60048036036040811015610d0957600080fd5b810190602081018135600160201b811115610d2357600080fd5b820183602082011115610d3557600080fd5b803590602001918460208302840111600160201b83111715610d5657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610da557600080fd5b820183602082011115610db757600080fd5b803590602001918460208302840111600160201b83111715610dd857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612390945050505050565b6104d661254f565b61039c600480360360e0811015610e3457600080fd5b813591602081013591810190606081016040820135600160201b811115610e5a57600080fd5b820183602082011115610e6c57600080fd5b803590602001918460018302840111600160201b83111715610e8d57600080fd5b919390929091602081019035600160201b811115610eaa57600080fd5b820183602082011115610ebc57600080fd5b803590602001918460208302840111600160201b83111715610edd57600080fd5b91935091508035906020810135906040013561255e565b61047a60048036036020811015610f0a57600080fd5b50356125f8565b61039c60048036036020811015610f2757600080fd5b50356001600160a01b031661260a565b601780546001600160a01b0319166001600160a01b038316179055604051600d90600080516020613f6183398151915290600090a250565b610f776126a8565b604051600490600080516020613f6183398151915290600090a2565b600f819055604051600c90600080516020613f6183398151915290600090a250565b601680546001600160a01b0319166001600160a01b038316179055604051600790600080516020613f6183398151915290600090a250565b610ff5611863565b1561103a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b611042611679565b1561108c576040805162461bcd60e51b8152602060048201526015602482015274414c52454144595f53485554444f574e5f4d4f444560581b604482015290519081900360640190fd5b60006110966118d9565b905060006110a2611a8b565b9050845b8282146111c757808214156111305760006110c083611761565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156110fb57600080fd5b505afa15801561110f573d6000803e3d6000fd5b505050506040513d602081101561112557600080fd5b505191506111bb9050565b8461117e576040805162461bcd60e51b8152602060048201526019602482015278105315115493905512559154d7d393d517d156141150d51151603a1b604482015290519081900360640190fd5b6111878261273f565b6040805183815290517fc48f1661fe65917dbe9d175ac4cb62063ef44afe989dcd3dbf470ac5a1c77bcb9181900360200190a15b600019909101906110a6565b60006111d1612276565b905060608167ffffffffffffffff811180156111ec57600080fd5b50604051908082528060200260200182016040528015611216578160200160208202803683370190505b50905060005b828167ffffffffffffffff161015611277576112418167ffffffffffffffff166118a9565b828267ffffffffffffffff168151811061125757fe5b6001600160a01b039092166020928302919091019091015260010161121c565b5060005b828167ffffffffffffffff161015611507576000828267ffffffffffffffff16815181106112a557fe5b6020026020010151905060006112ba826119a5565b90506001600160a01b038116156114955788611316576040805162461bcd60e51b815260206004820152601660248201527510d2105313115391d157d393d517d156141150d5115160521b604482015290519081900360640190fd5b6000816001600160a01b031663bb4af0b16040518163ffffffff1660e01b815260040160206040518083038186803b15801561135157600080fd5b505afa158015611365573d6000803e3d6000fd5b505050506040513d602081101561137b57600080fd5b5051604080516329a6d87160e11b815290519192506000916001600160a01b0385169163534db0e2916004808301926020929190829003018186803b1580156113c357600080fd5b505afa1580156113d7573d6000803e3d6000fd5b505050506040513d60208110156113ed57600080fd5b505190506113fa826127c1565b611403816127c1565b826001600160a01b03166214ebe76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561143d57600080fd5b505af1158015611451573d6000803e3d6000fd5b5050604080516001600160a01b038716815290517fec0b2d27905d678228bae2ed41ea32ea8bdbdd62e81edec23035cbde03f122a29350908190036020019150a150505b60006114a86114a384611691565b611761565b6001600160a01b031614156114fd576114c0826127eb565b604080516001600160a01b038416815290517fe695a52cb984a997f48f43d18e30b3ea892d024ca5410f74e5fded60b4a033ef9181900360200190a15b505060010161127b565b5043601e55611514612863565b604051601990600080516020613f6183398151915290600090a25050505050505050565b60115460408051630fcab31960e11b81526001600160a01b038581166004830152841515602483015291519190921691631f95663291604480830192600092919082900301818387803b15801561158e57600080fd5b505af11580156115a2573d6000803e3d6000fd5b505060405160139250600080516020613f618339815191529150600090a25050565b81601c6000815481106115d357fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080601c60018154811061161057fe5b6000918252602082200180546001600160a01b0319166001600160a01b039390931692909217909155604051600591600080516020613f6183398151915291a25050565b600c5481565b6001600160a01b0381166000908152600a60205260409020545b919050565b601e5443101590565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b600c819055604051600990600080516020613f6183398151915290600090a250565b601154604080516326a407d560e11b8152600481018590526024810184905290516001600160a01b0390921691634d480faa9160448082019260009290919082900301818387803b15801561172557600080fd5b505af1158015611739573d6000803e3d6000fd5b5050604051600e9250600080516020613f618339815191529150600090a25050565b60185481565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b6012546001600160a01b03828116911614156117db576040805162461bcd60e51b815260206004820152600a602482015269086aaa4be9eaaa8849eb60b31b604482015290519081900360640190fd5b601054604080516319dc7ae560e31b81526001600160a01b038481166004830152600060248301819052925193169263cee3d7289260448084019391929182900301818387803b15801561182e57600080fd5b505af1158015611842573d6000803e3d6000fd5b505060405160019250600080516020613f618339815191529150600090a250565b600b5460ff1690565b6014546001600160a01b031681565b600e5490565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b6000600782815481106118b857fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b604080516337ca261760e01b81526001600160a01b038481166004830190815260248301938452845160448401528451918716936337ca261793879387939291606401906020808601910280838360005b83811015611948578181015183820152602001611930565b505050509050019350505050600060405180830381600087803b15801561196e57600080fd5b505af1158015611982573d6000803e3d6000fd5b505060405160119250600080516020613f618339815191529150600090a2505050565b6001600160a01b039081166000908152600860205260409020600301541690565b601b819055604051601090600080516020613f6183398151915290600090a250565b816001600160a01b031663f2fde38b826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b158015611a4057600080fd5b505af1158015611a54573d6000803e3d6000fd5b5050604051601b9250600080516020613f618339815191529150600090a25050565b60005460ff1690565b600f5481565b600d5481565b60035490565b611a99611863565b611ad8576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b60005b8151811015611b2757611b02828281518110611af357fe5b602002602001015160006128e6565b50611b1f828281518110611b1257fe5b60200260200101516129bc565b600101611adb565b50604051601690600080516020613f6183398151915290600090a250565b611b4d611863565b611b8c576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b611b94611679565b611bd9576040805162461bcd60e51b81526020600482015260116024820152704e4f545f53485554444f574e5f4d4f444560781b604482015290519081900360640190fd5b600019601e55611be76126a8565b604051601a90600080516020613f6183398151915290600090a2565b601a5481565b601e5481565b611c17612863565b604051600390600080516020613f6183398151915290600090a2565b816001600160a01b0316633659cfe6826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b158015611c8b57600080fd5b505af1158015611c9f573d6000803e3d6000fd5b505060405160149250600080516020613f618339815191529150600090a25050565b60045490565b6016546001600160a01b031681565b600d819055604051600a90600080516020613f6183398151915290600090a250565b6000805b600954811015611d495760098181548110611d1357fe5b60009182526020909120600290910201546001600160a01b0384811691161415611d41576001915050611674565b600101611cfc565b50600092915050565b6018819055604051600890600080516020613f6183398151915290600090a250565b6013546001600160a01b031681565b611d8b611863565b611dca576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b611dd26118d9565b8114611e1d576040805162461bcd60e51b815260206004820152601560248201527413d3931657d310551154d517d0d3d3919254935151605a1b604482015290519081900360640190fd5b611e25613e72565b60408051808201909152611f58908960026000835b82821015611e7b5760408051606081810190925290808402860190600390839083908082843760009201919091525050508152600190910190602001611e3a565b50506040805180820190915291508a905060026000835b82821015611ed35760408051608081810190925290808402860190600490839083908082843760009201919091525050508152600190910190602001611e92565b505050508686601160009054906101000a90046001600160a01b03166001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2757600080fd5b505afa158015611f3b573d6000803e3d6000fd5b505050506040513d6020811015611f5157600080fd5b5051612a70565b6040805160c081018252848152600c546020820152600e54918101919091526011546001600160a01b039081166060830152601354811660808301526015541660a0820152909150611fb49082908a908a908a908a908f612abe565b50604051601790600080516020613f6183398151915290600090a2505050505050505050565b805182511461201f576040805162461bcd60e51b815260206004820152600c60248201526b0aea49e9c8ebe988a9c8ea8960a31b604482015290519081900360640190fd5b60005b82518110156120895781818151811061203757fe5b6020026020010151601d600085848151811061204f57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101612022565b50604051600690600080516020613f6183398151915290600090a25050565b600e819055604051600b90600080516020613f6183398151915290600090a250565b61a4b290565b6012546001600160a01b031681565b8051825114612125576040805162461bcd60e51b815260206004820152600d60248201526c1253959053125117d253941555609a1b604482015290519081900360640190fd5b60408051633b99adf760e01b8152600481019182528351604482015283516001600160a01b03861692633b99adf792869286929182916024820191606401906020808801910280838360005b83811015612189578181015183820152602001612171565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156121c85781810151838201526020016121b0565b50505050905001945050505050600060405180830381600087803b1580156121ef57600080fd5b505af1158015612203573d6000803e3d6000fd5b505060405160129250600080516020613f618339815191529150600090a2505050565b60006009828154811061223557fe5b60009182526020909120600290910201546001600160a01b031692915050565b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b6010546040805163722dbe7360e11b81526001600160a01b03858116600483015284151560248301529151919092169163e45b7ce691604480830192600092919082900301818387803b1580156122d257600080fd5b505af11580156122e6573d6000803e3d6000fd5b505060405160029250600080516020613f618339815191529150600090a25050565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b6001600160a01b031660009081526008602052604090206002015490565b60006009828154811061237757fe5b9060005260206000209060020201600101549050919050565b612398611863565b6123d7576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b805182511461241c576040805162461bcd60e51b815260206004820152600c60248201526b0aea49e9c8ebe988a9c8ea8960a31b604482015290519081900360640190fd5b60005b825181101561253057600061245a84838151811061243957fe5b602002602001015184848151811061244d57fe5b6020026020010151613178565b90506001600160a01b0381166124a6576040805162461bcd60e51b815260206004820152600c60248201526b1393d517d25397d0d210531360a21b604482015290519081900360640190fd5b6124c28483815181106124b557fe5b60200260200101516127c1565b6124d18383815181106124b557fe5b806001600160a01b03166214ebe76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561250b57600080fd5b505af115801561251f573d6000803e3d6000fd5b50506001909301925061241f915050565b50604051601590600080516020613f6183398151915290600090a25050565b6010546001600160a01b031681565b612566611863565b6125a5576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b6012546013546125d3918b918b918b918b918b918b918b918b918b916001600160a01b03918216911661323e565b604051601890600080516020613f6183398151915290600090a2505050505050505050565b60009081526006602052604090205490565b601280546001600160a01b0319166001600160a01b03838116918217909255601054604080516319dc7ae560e31b81526004810193909352600160248401525192169163cee3d7289160448082019260009290919082900301818387803b15801561267457600080fd5b505af1158015612688573d6000803e3d6000fd5b505060405160009250600080516020613f6183398151915291508290a250565b6126b0611863565b6126ef576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61272261350f565b604080516001600160a01b039092168252519081900360200190a1565b60008181526005602052604080822054815163083197ef60e41b815291516001600160a01b03909116926383197ef0926004808201939182900301818387803b15801561278b57600080fd5b505af115801561279f573d6000803e3d6000fd5b50505060009182525060056020526040902080546001600160a01b0319169055565b6001600160a01b0316600090815260086020526040902060030180546001600160a01b0319169055565b6001600160a01b038116600090815260086020526040902060028101546128128382613513565b61281b8361359e565b604080518281526000602082015281516001600160a01b038616927febd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6928290030190a2505050565b61286b611863565b156128b0576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861272261350f565b6001600160a01b038216600090815260086020526040812060028101548084111561294b576040805162461bcd60e51b815260206004820152601060248201526f544f4f5f4c4954544c455f5354414b4560801b604482015290519081900360640190fd5b600061295d828663ffffffff6136c416565b6002840186905590506129708682613513565b604080518381526020810187905281516001600160a01b038916927febd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6928290030190a295945050505050565b6001600160a01b0381811660008181526008602090815260408083208151808301909252938152600180850154928201928352600980549182018155909352517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af600290930292830180546001600160a01b031916919095161790935591517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b090920191909155612a6c8261359e565b5050565b612a78613e72565b60408051808201909152865186518291612a93918888613721565b8152602001612ab2886001602002015188600160200201514387613721565b90529695505050505050565b6000612ac8613e97565b612ad1896137bf565b60e08201528351612ae190611761565b81606001906001600160a01b031690816001600160a01b03168152505083606001516001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3b57600080fd5b505afa158015612b4f573d6000803e3d6000fd5b505050506040513d6020811015612b6557600080fd5b5051815260608101516040805163380ed4c760e11b815290516001600160a01b039092169163701da98e91600480820192602092909190829003018186803b158015612bb057600080fd5b505afa158015612bc4573d6000803e3d6000fd5b505050506040513d6020811015612bda57600080fd5b50518951612be7906137e1565b14612c2b576040805162461bcd60e51b815260206004820152600f60248201526e0a0a48aacbea6a882a88abe9082a69608b1b604482015290519081900360640190fd5b805160208a0151604001511115612c7a576040805162461bcd60e51b815260206004820152600e60248201526d12539093d617d41054d517d1539160921b604482015290519081900360640190fd5b83606001516001600160a01b031663dc1b7b1f87878c60200151604001516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604080518083038186803b158015612cfd57600080fd5b505afa158015612d11573d6000803e3d6000fd5b505050506040513d6040811015612d2757600080fd5b508051602090910151610120830152610100820152612d4589613876565b816040018181525050612d6a84604001518260e00151866020015184606001516138a7565b8160c0018181525050600081606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b158015612db257600080fd5b505afa158015612dc6573d6000803e3d6000fd5b505050506040513d6020811015612ddc57600080fd5b50511160a0820181905215612e6657612e5c81606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e2b57600080fd5b505afa158015612e3f573d6000803e3d6000fd5b505050506040513d6020811015612e5557600080fd5b50516125f8565b6080820152612e77565b8351612e71906125f8565b60808201525b8360a001516001600160a01b031663d45ab2b5612e978b602001516137e1565b612ea68c856040015143613a2d565b612eaf8d613a4a565b88600001518660c001516040518663ffffffff1660e01b81526004018086815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015612f0b57600080fd5b505af1158015612f1f573d6000803e3d6000fd5b505050506040513d6020811015612f3557600080fd5b50516001600160a01b031660208201526000612f4f611a8b565b600101905081606001516001600160a01b0316631bc09d0a826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612f9e57600080fd5b505af1158015612fb2573d6000803e3d6000fd5b50505050612fd38260a0015183608001518460400151856101200151613a7a565b9250838314613020576040805162461bcd60e51b81526020600482015260146024820152730aa9c8ab0a08a86a88a88be9c9e888abe9082a6960631b604482015290519081900360640190fd5b61302e826020015184613ae1565b6080850151855160c084015160408051638b8ca19960e01b81526004810186905260248101939093526044830191909152336064830152516001600160a01b0390921691638b8ca1999160848082019260009290919082900301818387803b15801561309957600080fd5b505af11580156130ad573d6000803e3d6000fd5b50505050506130bf84600001516125f8565b6130c7611a8b565b7f8016306209aff73e79f274cf38a41928996f746e2953111902e1f55be1713a5484846040015185600001518661010001518761012001518f8f6040518088815260200187815260200186815260200185815260200184815260200183600260600280828437600083820152601f01601f191690910190508261010080828437600083820152604051601f909101601f1916909201829003995090975050505050505050a350979650505050505050565b6001600160a01b038083166000908152600860205260408082208484168352908220600382015492939192909116806131e2576040805162461bcd60e51b81526020600482015260076024820152661393d7d0d2105360ca1b604482015290519081900360640190fd5b60038201546001600160a01b03828116911614613235576040805162461bcd60e51b815260206004820152600c60248201526b1112519197d25397d0d2105360a21b604482015290519081900360640190fd5b95945050505050565b60006132bf8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508d613b2b565b905060006132cc8d611761565b90506132db8c83888a89613c2c565b816001600160a01b03166397bdc5106040518163ffffffff1660e01b815260040160206040518083038186803b15801561331457600080fd5b505afa158015613328573d6000803e3d6000fd5b505050506040513d602081101561333e57600080fd5b505114613381576040805162461bcd60e51b815260206004820152600c60248201526b434f4e4649524d5f4441544160a01b604482015290519081900360640190fd5b836001600160a01b0316630c7268478c8c8c8c6040518563ffffffff1660e01b81526004018080602001806020018381038352878782818152602001925080828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801561342357600080fd5b505af1158015613437573d6000803e3d6000fd5b5050505061344660015461273f565b60018d81558d01600255604080516316b9109b60e01b8152600481018f905290516001600160a01b038516916316b9109b91602480830192600092919082900301818387803b15801561349857600080fd5b505af11580156134ac573d6000803e3d6000fd5b505050508c7f2400bd6e429cfcd98fe43a75bbbe4702c59c99d636100690130cc1ebb611c5a2838989896040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050505050505050565b3390565b6001600160a01b0382166000908152600a60205260408120549061353d828463ffffffff613c7316565b6001600160a01b0385166000818152600a60209081526040918290208490558151868152908101849052815193945091927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae29281900390910190a250505050565b6001600160a01b038116600090815260086020526040902080546007805460001981019081106135ca57fe5b600091825260209091200154600780546001600160a01b0390921691839081106135f057fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600860006007848154811061363057fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902055600780548061366057fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03949094168152600890935250506040812081815560018101829055600281019190915560030180546001600160a81b0319169055565b60008282111561371b576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b613729613eeb565b60408051610120810182528551815286516020820152908101856001602002015181526020018560026004811061375c57fe5b602002015181526020018560036004811061377357fe5b602002015181526020018660016003811061378a57fe5b60200201518152602001866002600381106137a157fe5b60200201518152602001848152602001838152509050949350505050565b8051516020820151516000916137db919063ffffffff6136c416565b92915050565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b805180516020830151516000926137db92918290039061389590613cd4565b6138a28660200151613cd4565b613d09565b6000806138db866138cf6138c282600163ffffffff6136c416565b889063ffffffff613c7316565b9063ffffffff613d4716565b905061396a8161395e6138f4438863ffffffff613c7316565b866001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561392d57600080fd5b505afa158015613941573d6000803e3d6000fd5b505050506040513d602081101561395757600080fd5b5051613dae565b9063ffffffff613c7316565b91506000836001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156139a757600080fd5b505afa1580156139bb573d6000803e3d6000fd5b505050506040513d60208110156139d157600080fd5b505190508015613a2357613a20836139e883611761565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561392d57600080fd5b92505b5050949350505050565b6000613a428383866020015160400151613dc4565b949350505050565b805160a09081015160208301519182015160c083015160608401516080909401516000946137db94939291613c2c565b60008085613a89576000613a8c565b60015b905080858585604051602001808560ff1660ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120915050949350505050565b60038054600101808255600090815260056020908152604080832080546001600160a01b0319166001600160a01b0397909716969096179095559154815260069091529190912055565b81518351600091829184835b83811015613bde576000888281518110613b4d57fe5b60200260200101519050838187011115613b9d576040805162461bcd60e51b815260206004820152600c60248201526b2220aa20afa7ab22a9292aa760a11b604482015290519081900360640190fd5b6020868b0181018290206040805180840196909652858101919091528051808603820181526060909501905283519301929092209190940193600101613b37565b50818414613c21576040805162461bcd60e51b815260206004820152600b60248201526a08882a882be988a9c8ea8960ab1b604482015290519081900360640190fd5b979650505050505050565b60408051602080820197909752808201959095526060850192909252608084019290925260a0808401929092528051808403909201825260c0909201909152805191012090565b600082820183811015613ccd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006137db8260000151613d04846040015185602001518660a0015187606001518860c001518960800151613dfb565b613e46565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b6000808211613d9d576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381613da657fe5b049392505050565b6000818311613dbd5781613ccd565b5090919050565b6040805160208082019590955280820193909352606080840192909252805180840390920182526080909201909152805191012090565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6040518060400160405280613e85613eeb565b8152602001613e92613eeb565b905290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101200160405280600081526020016000801916815260200160008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152509056fe5061757361626c653a206e6f7420706175736564000000000000000000000000ea8787f128d10b2cc0317b0c3960f9ad447f7f6c1ed189db1083ccffd20f456ea2646970667358221220e791981d28606560ce5b1b12a67e3d55219868cebbf9fbfd786f0fc78dc6131264736f6c634300060b0033", } // RollupAdminFacetABI is the input ABI used to generate the binding from. @@ -788,6 +788,37 @@ func (_RollupAdminFacet *RollupAdminFacetCallerSession) IsMaster() (bool, error) return _RollupAdminFacet.Contract.IsMaster(&_RollupAdminFacet.CallOpts) } +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_RollupAdminFacet *RollupAdminFacetCaller) IsNitroReady(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _RollupAdminFacet.contract.Call(opts, &out, "isNitroReady") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_RollupAdminFacet *RollupAdminFacetSession) IsNitroReady() (*big.Int, error) { + return _RollupAdminFacet.Contract.IsNitroReady(&_RollupAdminFacet.CallOpts) +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_RollupAdminFacet *RollupAdminFacetCallerSession) IsNitroReady() (*big.Int, error) { + return _RollupAdminFacet.Contract.IsNitroReady(&_RollupAdminFacet.CallOpts) +} + // IsStaked is a free data retrieval call binding the contract method 0x6177fd18. // // Solidity: function isStaked(address staker) view returns(bool) @@ -1191,6 +1222,68 @@ func (_RollupAdminFacet *RollupAdminFacetCallerSession) SequencerBridge() (commo return _RollupAdminFacet.Contract.SequencerBridge(&_RollupAdminFacet.CallOpts) } +// ShutdownForNitroBlock is a free data retrieval call binding the contract method 0x7f60abbb. +// +// Solidity: function shutdownForNitroBlock() view returns(uint256) +func (_RollupAdminFacet *RollupAdminFacetCaller) ShutdownForNitroBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _RollupAdminFacet.contract.Call(opts, &out, "shutdownForNitroBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ShutdownForNitroBlock is a free data retrieval call binding the contract method 0x7f60abbb. +// +// Solidity: function shutdownForNitroBlock() view returns(uint256) +func (_RollupAdminFacet *RollupAdminFacetSession) ShutdownForNitroBlock() (*big.Int, error) { + return _RollupAdminFacet.Contract.ShutdownForNitroBlock(&_RollupAdminFacet.CallOpts) +} + +// ShutdownForNitroBlock is a free data retrieval call binding the contract method 0x7f60abbb. +// +// Solidity: function shutdownForNitroBlock() view returns(uint256) +func (_RollupAdminFacet *RollupAdminFacetCallerSession) ShutdownForNitroBlock() (*big.Int, error) { + return _RollupAdminFacet.Contract.ShutdownForNitroBlock(&_RollupAdminFacet.CallOpts) +} + +// ShutdownForNitroMode is a free data retrieval call binding the contract method 0x313a04fa. +// +// Solidity: function shutdownForNitroMode() view returns(bool) +func (_RollupAdminFacet *RollupAdminFacetCaller) ShutdownForNitroMode(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _RollupAdminFacet.contract.Call(opts, &out, "shutdownForNitroMode") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// ShutdownForNitroMode is a free data retrieval call binding the contract method 0x313a04fa. +// +// Solidity: function shutdownForNitroMode() view returns(bool) +func (_RollupAdminFacet *RollupAdminFacetSession) ShutdownForNitroMode() (bool, error) { + return _RollupAdminFacet.Contract.ShutdownForNitroMode(&_RollupAdminFacet.CallOpts) +} + +// ShutdownForNitroMode is a free data retrieval call binding the contract method 0x313a04fa. +// +// Solidity: function shutdownForNitroMode() view returns(bool) +func (_RollupAdminFacet *RollupAdminFacetCallerSession) ShutdownForNitroMode() (bool, error) { + return _RollupAdminFacet.Contract.ShutdownForNitroMode(&_RollupAdminFacet.CallOpts) +} + // StakeToken is a free data retrieval call binding the contract method 0x51ed6a30. // // Solidity: function stakeToken() view returns(address) @@ -1839,6 +1932,69 @@ func (_RollupAdminFacet *RollupAdminFacetTransactorSession) SetWhitelistEntries( return _RollupAdminFacet.Contract.SetWhitelistEntries(&_RollupAdminFacet.TransactOpts, whitelist, user, val) } +// ShutdownForNitro is a paid mutator transaction binding the contract method 0x1d0ada65. +// +// Solidity: function shutdownForNitro(uint256 finalNodeNum, bool destroyAlternatives, bool destroyChallenges) returns() +func (_RollupAdminFacet *RollupAdminFacetTransactor) ShutdownForNitro(opts *bind.TransactOpts, finalNodeNum *big.Int, destroyAlternatives bool, destroyChallenges bool) (*types.Transaction, error) { + return _RollupAdminFacet.contract.Transact(opts, "shutdownForNitro", finalNodeNum, destroyAlternatives, destroyChallenges) +} + +// ShutdownForNitro is a paid mutator transaction binding the contract method 0x1d0ada65. +// +// Solidity: function shutdownForNitro(uint256 finalNodeNum, bool destroyAlternatives, bool destroyChallenges) returns() +func (_RollupAdminFacet *RollupAdminFacetSession) ShutdownForNitro(finalNodeNum *big.Int, destroyAlternatives bool, destroyChallenges bool) (*types.Transaction, error) { + return _RollupAdminFacet.Contract.ShutdownForNitro(&_RollupAdminFacet.TransactOpts, finalNodeNum, destroyAlternatives, destroyChallenges) +} + +// ShutdownForNitro is a paid mutator transaction binding the contract method 0x1d0ada65. +// +// Solidity: function shutdownForNitro(uint256 finalNodeNum, bool destroyAlternatives, bool destroyChallenges) returns() +func (_RollupAdminFacet *RollupAdminFacetTransactorSession) ShutdownForNitro(finalNodeNum *big.Int, destroyAlternatives bool, destroyChallenges bool) (*types.Transaction, error) { + return _RollupAdminFacet.Contract.ShutdownForNitro(&_RollupAdminFacet.TransactOpts, finalNodeNum, destroyAlternatives, destroyChallenges) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0x6d435421. +// +// Solidity: function transferOwnership(address target, address newOwner) returns() +func (_RollupAdminFacet *RollupAdminFacetTransactor) TransferOwnership(opts *bind.TransactOpts, target common.Address, newOwner common.Address) (*types.Transaction, error) { + return _RollupAdminFacet.contract.Transact(opts, "transferOwnership", target, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0x6d435421. +// +// Solidity: function transferOwnership(address target, address newOwner) returns() +func (_RollupAdminFacet *RollupAdminFacetSession) TransferOwnership(target common.Address, newOwner common.Address) (*types.Transaction, error) { + return _RollupAdminFacet.Contract.TransferOwnership(&_RollupAdminFacet.TransactOpts, target, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0x6d435421. +// +// Solidity: function transferOwnership(address target, address newOwner) returns() +func (_RollupAdminFacet *RollupAdminFacetTransactorSession) TransferOwnership(target common.Address, newOwner common.Address) (*types.Transaction, error) { + return _RollupAdminFacet.Contract.TransferOwnership(&_RollupAdminFacet.TransactOpts, target, newOwner) +} + +// UndoShutdownForNitro is a paid mutator transaction binding the contract method 0x7e6c255f. +// +// Solidity: function undoShutdownForNitro() returns() +func (_RollupAdminFacet *RollupAdminFacetTransactor) UndoShutdownForNitro(opts *bind.TransactOpts) (*types.Transaction, error) { + return _RollupAdminFacet.contract.Transact(opts, "undoShutdownForNitro") +} + +// UndoShutdownForNitro is a paid mutator transaction binding the contract method 0x7e6c255f. +// +// Solidity: function undoShutdownForNitro() returns() +func (_RollupAdminFacet *RollupAdminFacetSession) UndoShutdownForNitro() (*types.Transaction, error) { + return _RollupAdminFacet.Contract.UndoShutdownForNitro(&_RollupAdminFacet.TransactOpts) +} + +// UndoShutdownForNitro is a paid mutator transaction binding the contract method 0x7e6c255f. +// +// Solidity: function undoShutdownForNitro() returns() +func (_RollupAdminFacet *RollupAdminFacetTransactorSession) UndoShutdownForNitro() (*types.Transaction, error) { + return _RollupAdminFacet.Contract.UndoShutdownForNitro(&_RollupAdminFacet.TransactOpts) +} + // UpdateWhitelistConsumers is a paid mutator transaction binding the contract method 0x661d2722. // // Solidity: function updateWhitelistConsumers(address whitelist, address newWhitelist, address[] targets) returns() @@ -1881,6 +2037,140 @@ func (_RollupAdminFacet *RollupAdminFacetTransactorSession) UpgradeBeacon(beacon return _RollupAdminFacet.Contract.UpgradeBeacon(&_RollupAdminFacet.TransactOpts, beacon, newImplementation) } +// RollupAdminFacetChallengeDestroyedInMigrationIterator is returned from FilterChallengeDestroyedInMigration and is used to iterate over the raw logs and unpacked data for ChallengeDestroyedInMigration events raised by the RollupAdminFacet contract. +type RollupAdminFacetChallengeDestroyedInMigrationIterator struct { + Event *RollupAdminFacetChallengeDestroyedInMigration // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RollupAdminFacetChallengeDestroyedInMigrationIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RollupAdminFacetChallengeDestroyedInMigration) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RollupAdminFacetChallengeDestroyedInMigration) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RollupAdminFacetChallengeDestroyedInMigrationIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RollupAdminFacetChallengeDestroyedInMigrationIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RollupAdminFacetChallengeDestroyedInMigration represents a ChallengeDestroyedInMigration event raised by the RollupAdminFacet contract. +type RollupAdminFacetChallengeDestroyedInMigration struct { + Challenge common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChallengeDestroyedInMigration is a free log retrieval operation binding the contract event 0xec0b2d27905d678228bae2ed41ea32ea8bdbdd62e81edec23035cbde03f122a2. +// +// Solidity: event ChallengeDestroyedInMigration(address challenge) +func (_RollupAdminFacet *RollupAdminFacetFilterer) FilterChallengeDestroyedInMigration(opts *bind.FilterOpts) (*RollupAdminFacetChallengeDestroyedInMigrationIterator, error) { + + logs, sub, err := _RollupAdminFacet.contract.FilterLogs(opts, "ChallengeDestroyedInMigration") + if err != nil { + return nil, err + } + return &RollupAdminFacetChallengeDestroyedInMigrationIterator{contract: _RollupAdminFacet.contract, event: "ChallengeDestroyedInMigration", logs: logs, sub: sub}, nil +} + +// WatchChallengeDestroyedInMigration is a free log subscription operation binding the contract event 0xec0b2d27905d678228bae2ed41ea32ea8bdbdd62e81edec23035cbde03f122a2. +// +// Solidity: event ChallengeDestroyedInMigration(address challenge) +func (_RollupAdminFacet *RollupAdminFacetFilterer) WatchChallengeDestroyedInMigration(opts *bind.WatchOpts, sink chan<- *RollupAdminFacetChallengeDestroyedInMigration) (event.Subscription, error) { + + logs, sub, err := _RollupAdminFacet.contract.WatchLogs(opts, "ChallengeDestroyedInMigration") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RollupAdminFacetChallengeDestroyedInMigration) + if err := _RollupAdminFacet.contract.UnpackLog(event, "ChallengeDestroyedInMigration", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseChallengeDestroyedInMigration is a log parse operation binding the contract event 0xec0b2d27905d678228bae2ed41ea32ea8bdbdd62e81edec23035cbde03f122a2. +// +// Solidity: event ChallengeDestroyedInMigration(address challenge) +func (_RollupAdminFacet *RollupAdminFacetFilterer) ParseChallengeDestroyedInMigration(log types.Log) (*RollupAdminFacetChallengeDestroyedInMigration, error) { + event := new(RollupAdminFacetChallengeDestroyedInMigration) + if err := _RollupAdminFacet.contract.UnpackLog(event, "ChallengeDestroyedInMigration", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // RollupAdminFacetNodeConfirmedIterator is returned from FilterNodeConfirmed and is used to iterate over the raw logs and unpacked data for NodeConfirmed events raised by the RollupAdminFacet contract. type RollupAdminFacetNodeConfirmedIterator struct { Event *RollupAdminFacetNodeConfirmed // Event containing the contract specifics and raw log @@ -2189,6 +2479,140 @@ func (_RollupAdminFacet *RollupAdminFacetFilterer) ParseNodeCreated(log types.Lo return event, nil } +// RollupAdminFacetNodeDestroyedInMigrationIterator is returned from FilterNodeDestroyedInMigration and is used to iterate over the raw logs and unpacked data for NodeDestroyedInMigration events raised by the RollupAdminFacet contract. +type RollupAdminFacetNodeDestroyedInMigrationIterator struct { + Event *RollupAdminFacetNodeDestroyedInMigration // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RollupAdminFacetNodeDestroyedInMigrationIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RollupAdminFacetNodeDestroyedInMigration) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RollupAdminFacetNodeDestroyedInMigration) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RollupAdminFacetNodeDestroyedInMigrationIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RollupAdminFacetNodeDestroyedInMigrationIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RollupAdminFacetNodeDestroyedInMigration represents a NodeDestroyedInMigration event raised by the RollupAdminFacet contract. +type RollupAdminFacetNodeDestroyedInMigration struct { + NodeNum *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNodeDestroyedInMigration is a free log retrieval operation binding the contract event 0xc48f1661fe65917dbe9d175ac4cb62063ef44afe989dcd3dbf470ac5a1c77bcb. +// +// Solidity: event NodeDestroyedInMigration(uint256 nodeNum) +func (_RollupAdminFacet *RollupAdminFacetFilterer) FilterNodeDestroyedInMigration(opts *bind.FilterOpts) (*RollupAdminFacetNodeDestroyedInMigrationIterator, error) { + + logs, sub, err := _RollupAdminFacet.contract.FilterLogs(opts, "NodeDestroyedInMigration") + if err != nil { + return nil, err + } + return &RollupAdminFacetNodeDestroyedInMigrationIterator{contract: _RollupAdminFacet.contract, event: "NodeDestroyedInMigration", logs: logs, sub: sub}, nil +} + +// WatchNodeDestroyedInMigration is a free log subscription operation binding the contract event 0xc48f1661fe65917dbe9d175ac4cb62063ef44afe989dcd3dbf470ac5a1c77bcb. +// +// Solidity: event NodeDestroyedInMigration(uint256 nodeNum) +func (_RollupAdminFacet *RollupAdminFacetFilterer) WatchNodeDestroyedInMigration(opts *bind.WatchOpts, sink chan<- *RollupAdminFacetNodeDestroyedInMigration) (event.Subscription, error) { + + logs, sub, err := _RollupAdminFacet.contract.WatchLogs(opts, "NodeDestroyedInMigration") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RollupAdminFacetNodeDestroyedInMigration) + if err := _RollupAdminFacet.contract.UnpackLog(event, "NodeDestroyedInMigration", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseNodeDestroyedInMigration is a log parse operation binding the contract event 0xc48f1661fe65917dbe9d175ac4cb62063ef44afe989dcd3dbf470ac5a1c77bcb. +// +// Solidity: event NodeDestroyedInMigration(uint256 nodeNum) +func (_RollupAdminFacet *RollupAdminFacetFilterer) ParseNodeDestroyedInMigration(log types.Log) (*RollupAdminFacetNodeDestroyedInMigration, error) { + event := new(RollupAdminFacetNodeDestroyedInMigration) + if err := _RollupAdminFacet.contract.UnpackLog(event, "NodeDestroyedInMigration", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // RollupAdminFacetNodeRejectedIterator is returned from FilterNodeRejected and is used to iterate over the raw logs and unpacked data for NodeRejected events raised by the RollupAdminFacet contract. type RollupAdminFacetNodeRejectedIterator struct { Event *RollupAdminFacetNodeRejected // Event containing the contract specifics and raw log @@ -2892,6 +3316,140 @@ func (_RollupAdminFacet *RollupAdminFacetFilterer) ParseRollupCreated(log types. return event, nil } +// RollupAdminFacetStakerWithdrawnInMigrationIterator is returned from FilterStakerWithdrawnInMigration and is used to iterate over the raw logs and unpacked data for StakerWithdrawnInMigration events raised by the RollupAdminFacet contract. +type RollupAdminFacetStakerWithdrawnInMigrationIterator struct { + Event *RollupAdminFacetStakerWithdrawnInMigration // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RollupAdminFacetStakerWithdrawnInMigrationIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RollupAdminFacetStakerWithdrawnInMigration) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RollupAdminFacetStakerWithdrawnInMigration) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RollupAdminFacetStakerWithdrawnInMigrationIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RollupAdminFacetStakerWithdrawnInMigrationIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RollupAdminFacetStakerWithdrawnInMigration represents a StakerWithdrawnInMigration event raised by the RollupAdminFacet contract. +type RollupAdminFacetStakerWithdrawnInMigration struct { + Staker common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStakerWithdrawnInMigration is a free log retrieval operation binding the contract event 0xe695a52cb984a997f48f43d18e30b3ea892d024ca5410f74e5fded60b4a033ef. +// +// Solidity: event StakerWithdrawnInMigration(address staker) +func (_RollupAdminFacet *RollupAdminFacetFilterer) FilterStakerWithdrawnInMigration(opts *bind.FilterOpts) (*RollupAdminFacetStakerWithdrawnInMigrationIterator, error) { + + logs, sub, err := _RollupAdminFacet.contract.FilterLogs(opts, "StakerWithdrawnInMigration") + if err != nil { + return nil, err + } + return &RollupAdminFacetStakerWithdrawnInMigrationIterator{contract: _RollupAdminFacet.contract, event: "StakerWithdrawnInMigration", logs: logs, sub: sub}, nil +} + +// WatchStakerWithdrawnInMigration is a free log subscription operation binding the contract event 0xe695a52cb984a997f48f43d18e30b3ea892d024ca5410f74e5fded60b4a033ef. +// +// Solidity: event StakerWithdrawnInMigration(address staker) +func (_RollupAdminFacet *RollupAdminFacetFilterer) WatchStakerWithdrawnInMigration(opts *bind.WatchOpts, sink chan<- *RollupAdminFacetStakerWithdrawnInMigration) (event.Subscription, error) { + + logs, sub, err := _RollupAdminFacet.contract.WatchLogs(opts, "StakerWithdrawnInMigration") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RollupAdminFacetStakerWithdrawnInMigration) + if err := _RollupAdminFacet.contract.UnpackLog(event, "StakerWithdrawnInMigration", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseStakerWithdrawnInMigration is a log parse operation binding the contract event 0xe695a52cb984a997f48f43d18e30b3ea892d024ca5410f74e5fded60b4a033ef. +// +// Solidity: event StakerWithdrawnInMigration(address staker) +func (_RollupAdminFacet *RollupAdminFacetFilterer) ParseStakerWithdrawnInMigration(log types.Log) (*RollupAdminFacetStakerWithdrawnInMigration, error) { + event := new(RollupAdminFacetStakerWithdrawnInMigration) + if err := _RollupAdminFacet.contract.UnpackLog(event, "StakerWithdrawnInMigration", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // RollupAdminFacetUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the RollupAdminFacet contract. type RollupAdminFacetUnpausedIterator struct { Event *RollupAdminFacetUnpaused // Event containing the contract specifics and raw log diff --git a/packages/arb-util/ethbridgecontracts/RollupCreator.go b/packages/arb-util/ethbridgecontracts/RollupCreator.go index 022a68c15c..c4491ab81a 100755 --- a/packages/arb-util/ethbridgecontracts/RollupCreator.go +++ b/packages/arb-util/ethbridgecontracts/RollupCreator.go @@ -31,7 +31,7 @@ var ( // RollupCreatorMetaData contains all meta data concerning the RollupCreator contract. var RollupCreatorMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rollupAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"inboxAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminProxy\",\"type\":\"address\"}],\"name\":\"RollupCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"TemplatesUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridgeCreator\",\"outputs\":[{\"internalType\":\"contractBridgeCreator\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_machineHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_confirmPeriodBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_extraChallengeTimeBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_avmGasSpeedLimitPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_baseStake\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_stakeToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rollupOwner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sequencer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelaySeconds\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraConfig\",\"type\":\"bytes\"}],\"name\":\"createRollup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nodeFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupAdminFacet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupTemplate\",\"outputs\":[{\"internalType\":\"contractICloneable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupUserFacet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractBridgeCreator\",\"name\":\"_bridgeCreator\",\"type\":\"address\"},{\"internalType\":\"contractICloneable\",\"name\":\"_rollupTemplate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_challengeFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_nodeFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rollupAdminFacet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rollupUserFacet\",\"type\":\"address\"}],\"name\":\"setTemplates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b612308806100866000396000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c80638da5cb5b116200007b5780638da5cb5b1462000211578063b6454962146200021b578063d93fe9c41462000225578063edb18091146200022f578063f2fde38b1462000239578063f860cefa146200026257620000b8565b806301183c8914620000bd5780634b1ef03014620001105780635dbaf68b14620001f3578063715018a614620001fd5780638689d9961462000207575b600080fd5b6200010e600480360360c0811015620000d557600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a00135166200026c565b005b620001d760048036036101608110156200012957600080fd5b8135916020810135916040820135916060810135916080820135916001600160a01b0360a082013581169260c083013582169260e08101359092169161010081013591610120820135919081019061016081016101408201356401000000008111156200019557600080fd5b820183602082011115620001a857600080fd5b80359060200191846001830284011164010000000083111715620001cb57600080fd5b50909250905062000367565b604080516001600160a01b039092168252519081900360200190f35b620001d76200041f565b6200010e6200042e565b620001d7620004e0565b620001d7620004ef565b620001d7620004fe565b620001d76200050d565b620001d76200051c565b6200010e600480360360208110156200025157600080fd5b50356001600160a01b03166200052b565b620001d762000635565b6200027662000644565b6001600160a01b031662000289620004ef565b6001600160a01b031614620002d4576040805162461bcd60e51b81526020600482018190526024820152600080516020620022b3833981519152604482015290519081900360640190fd5b600180546001600160a01b03199081166001600160a01b0389811691909117909255600280548216888416179055600380548216878416179055600480548216868416179055600580548216858416179055600680549091169183169190911790556040517fc9d3947d22fa124aaec4c7e8c919f79016e2d7b48eee10568375d98b86460d1b90600090a1505050505050565b60006200040e6040518061016001604052808f81526020018e81526020018d81526020018c81526020018b81526020018a6001600160a01b03168152602001896001600160a01b03168152602001886001600160a01b0316815260200187815260200186815260200185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505091525062000648565b9d9c50505050505050505050505050565b6003546001600160a01b031681565b6200043862000644565b6001600160a01b03166200044b620004ef565b6001600160a01b03161462000496576040805162461bcd60e51b81526020600482018190526024820152600080516020620022b3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6002546001600160a01b031681565b6000546001600160a01b031690565b6006546001600160a01b031681565b6004546001600160a01b031681565b6005546001600160a01b031681565b6200053562000644565b6001600160a01b031662000548620004ef565b6001600160a01b03161462000593576040805162461bcd60e51b81526020600482018190526024820152600080516020620022b3833981519152604482015290519081900360640190fd5b6001600160a01b038116620005da5760405162461bcd60e51b81526004018080602001828103825260268152602001806200228d6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b60006200065462000bc8565b604051620006629062000c04565b604051809103906000f0801580156200067f573d6000803e3d6000fd5b506001600160a01b03908116808352600254604051921691620006a29062000c12565b6001600160a01b03928316815291166020820152606060408083018290526000918301829052519182900360a0019190f080158015620006e6573d6000803e3d6000fd5b506001600160a01b0390811660c08301819052600154835160e08701516040805163953b221960e01b81529286166004840152602483019490945284166044820152915192169163953b22199160648082019260a0929091908290030181600087803b1580156200075657600080fd5b505af11580156200076b573d6000803e3d6000fd5b505050506040513d60a08110156200078257600080fd5b5080516020808301516040808501516060808701516080978801516001600160a01b0390811660a08b015290811697890197909752908616908701529084168582015291831690840152825160c0860151825163f2fde38b60e01b81529084166004820152915192169163f2fde38b9160248082019260009290919082900301818387803b1580156200081457600080fd5b505af115801562000829573d6000803e3d6000fd5b505050508060c001516001600160a01b0316637b6abd9c8460000151604051806080016040528087602001518152602001876040015181526020018760600151815260200187608001518152508660a001518760c001518861014001516040518060c0016040528089602001516001600160a01b03166001600160a01b0316815260200189604001516001600160a01b03166001600160a01b031681526020018960a001516001600160a01b03166001600160a01b0316815260200189608001516001600160a01b03166001600160a01b03168152602001600360009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001600460009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152506040518060400160405280600560009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001600660009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681525060405180604001604052808d610100015181526020018d61012001518152506040518963ffffffff1660e01b81526004018089815260200188600460200280838360005b8381101562000a1a57818101518382015260200162000a00565b5050506001600160a01b03808c169490920193845250881660208301525060408101906060018560c080838360005b8381101562000a6357818101518382015260200162000a49565b5050505090500184600260200280838360005b8381101562000a9057818101518382015260200162000a76565b5050505090500183600260200280838360005b8381101562000abd57818101518382015260200162000aa3565b50505050905001828103825286818151815260200191508051906020019080838360005b8381101562000afb57818101518382015260200162000ae1565b50505050905090810190601f16801562000b295780820380516001836020036101000a031916815260200191505b509950505050505050505050600060405180830381600087803b15801562000b5057600080fd5b505af115801562000b65573d6000803e3d6000fd5b50505060c082015160608301518351604080516001600160a01b039384168152918316602083015280519290931693507fd508a734b33000eb18068aa34f20f8014fa578d682a9d355017efcd93e1b4f1092908290030190a260c0015192915050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b61090c8062000c2183390190565b610d60806200152d8339019056fe608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b610886806100866000396000f3fe60806040526004361061006b5760003560e01c8063204e1c7a14610070578063715018a6146100bf5780637eff275e146100d65780638da5cb5b146101115780639623609d1461012657806399a88ec4146101e5578063f2fde38b14610220578063f3b7dead14610253575b600080fd5b34801561007c57600080fd5b506100a36004803603602081101561009357600080fd5b50356001600160a01b0316610286565b604080516001600160a01b039092168252519081900360200190f35b3480156100cb57600080fd5b506100d4610318565b005b3480156100e257600080fd5b506100d4600480360360408110156100f957600080fd5b506001600160a01b03813581169160200135166103c4565b34801561011d57600080fd5b506100a361049a565b6100d46004803603606081101561013c57600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561017057600080fd5b82018360208201111561018257600080fd5b803590602001918460018302840111640100000000831117156101a457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506104a9945050505050565b3480156101f157600080fd5b506100d46004803603604081101561020857600080fd5b506001600160a01b03813581169160200135166105eb565b34801561022c57600080fd5b506100d46004803603602081101561024357600080fd5b50356001600160a01b03166106a5565b34801561025f57600080fd5b506100a36004803603602081101561027657600080fd5b50356001600160a01b03166107a7565b6000806060836001600160a01b03166040518080635c60da1b60e01b8152506004019050600060405180830381855afa9150503d80600081146102e5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ea565b606091505b5091509150816102f957600080fd5b80806020019051602081101561030e57600080fd5b5051949350505050565b610320610806565b6001600160a01b031661033161049a565b6001600160a01b03161461037a576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103cc610806565b6001600160a01b03166103dd61049a565b6001600160a01b031614610426576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b816001600160a01b0316638f283970826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047e57600080fd5b505af1158015610492573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031690565b6104b1610806565b6001600160a01b03166104c261049a565b6001600160a01b03161461050b576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b826001600160a01b0316634f1ef2863484846040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610581578181015183820152602001610569565b50505050905090810190601f1680156105ae5780820380516001836020036101000a031916815260200191505b5093505050506000604051808303818588803b1580156105cd57600080fd5b505af11580156105e1573d6000803e3d6000fd5b5050505050505050565b6105f3610806565b6001600160a01b031661060461049a565b6001600160a01b03161461064d576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b816001600160a01b0316633659cfe6826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047e57600080fd5b6106ad610806565b6001600160a01b03166106be61049a565b6001600160a01b031614610707576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b6001600160a01b03811661074c5760405162461bcd60e51b815260040180806020018281038252602681526020018061080b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806060836001600160a01b031660405180806303e1469160e61b8152506004019050600060405180830381855afa9150503d80600081146102e5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ea565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122005019646333ea388b0c67bda202f0b0f9e694623274a3b0b0cd706bdc2821b5464736f6c634300060b0033608060405260405162000d6038038062000d60833981810160405260608110156200002957600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200005557600080fd5b9083019060208201858111156200006b57600080fd5b82516401000000008111828201881017156200008657600080fd5b82525081516020918201929091019080838360005b83811015620000b55781810151838201526020016200009b565b50505050905090810190601f168015620000e35780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e696d706c656d656e746174696f6e0000000082525190819003601c01902086935084925060008051602062000cbd8339815191526000199091011490506200013c57fe5b62000150826001600160e01b03620001e016565b80511562000171576200016f82826200024660201b620003841760201c565b505b5050604080517f656970313936372e70726f78792e61646d696e000000000000000000000000008152905190819003601301902060008051602062000c9d83398151915260001990910114620001c357fe5b620001d7826001600160e01b036200027e16565b50505062000461565b620001f6816200029160201b620003b01760201c565b620002335760405162461bcd60e51b815260040180806020018281038252603681526020018062000d046036913960400191505060405180910390fd5b60008051602062000cbd83398151915255565b606062000277838360405180606001604052806027815260200162000cdd602791396001600160e01b036200029716565b9392505050565b60008051602062000c9d83398151915255565b3b151590565b6060620002ad846001600160e01b036200029116565b620002ea5760405162461bcd60e51b815260040180806020018281038252602681526020018062000d3a6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106200032a5780518252601f19909201916020918201910162000309565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146200038c576040519150601f19603f3d011682016040523d82523d6000602084013e62000391565b606091505b509092509050620003ad8282866001600160e01b03620003b716565b9695505050505050565b60608315620003c857508162000277565b825115620003d95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620004255781810151838201526020016200040b565b50505050905090810190601f168015620004535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b61082c80620004716000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610262565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b031661029f565b34801561018857600080fd5b5061012d610359565b6101996103b6565b6101a96101a4610416565b61043b565b565b6101b361045f565b6001600160a01b0316336001600160a01b031614156101da576101d581610484565b6101e2565b6101e2610191565b50565b6101ed61045f565b6001600160a01b0316336001600160a01b031614156102555761020f83610484565b61024f8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038492505050565b5061025d565b61025d610191565b505050565b600061026c61045f565b6001600160a01b0316336001600160a01b031614156102945761028d610416565b905061029c565b61029c610191565b90565b6102a761045f565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103055760405162461bcd60e51b815260040180806020018281038252603a8152602001806106f8603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e61045f565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c4565b600061036361045f565b6001600160a01b0316336001600160a01b031614156102945761028d61045f565b60606103a98383604051806060016040528060278152602001610732602791396104e8565b9392505050565b3b151590565b6103be61045f565b6001600160a01b0316336001600160a01b0316141561040e5760405162461bcd60e51b81526004018080602001828103825260428152602001806107b56042913960600191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045a573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61048d816105eb565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b60606104f3846103b0565b61052e5760405162461bcd60e51b815260040180806020018281038252602681526020018061078f6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b6020831061056c5780518252601f19909201916020918201910161054d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146105cc576040519150601f19603f3d011682016040523d82523d6000602084013e6105d1565b606091505b50915091506105e1828286610653565b9695505050505050565b6105f4816103b0565b61062f5760405162461bcd60e51b81526004018080602001828103825260368152602001806107596036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b606083156106625750816103a9565b8251156106725782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156106bc5781810151838201526020016106a4565b50505050905090810190601f1680156106e95780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f2061646472657373416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65645570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e74726163745472616e73706172656e745570677261646561626c6550726f78793a2061646d696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172676574a2646970667358221220175110956fa0a7ff1615f55e1422acff6edcec0099d7ea0bae101f4f6228c8bd64736f6c634300060b0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65645570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220f6b3e9aeccc922d33ca3bc41cf313aad1cf3f49ab226f49a8e36484dd4b64f8f64736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b612308806100866000396000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c80638da5cb5b116200007b5780638da5cb5b1462000211578063b6454962146200021b578063d93fe9c41462000225578063edb18091146200022f578063f2fde38b1462000239578063f860cefa146200026257620000b8565b806301183c8914620000bd5780634b1ef03014620001105780635dbaf68b14620001f3578063715018a614620001fd5780638689d9961462000207575b600080fd5b6200010e600480360360c0811015620000d557600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a00135166200026c565b005b620001d760048036036101608110156200012957600080fd5b8135916020810135916040820135916060810135916080820135916001600160a01b0360a082013581169260c083013582169260e08101359092169161010081013591610120820135919081019061016081016101408201356401000000008111156200019557600080fd5b820183602082011115620001a857600080fd5b80359060200191846001830284011164010000000083111715620001cb57600080fd5b50909250905062000367565b604080516001600160a01b039092168252519081900360200190f35b620001d76200041f565b6200010e6200042e565b620001d7620004e0565b620001d7620004ef565b620001d7620004fe565b620001d76200050d565b620001d76200051c565b6200010e600480360360208110156200025157600080fd5b50356001600160a01b03166200052b565b620001d762000635565b6200027662000644565b6001600160a01b031662000289620004ef565b6001600160a01b031614620002d4576040805162461bcd60e51b81526020600482018190526024820152600080516020620022b3833981519152604482015290519081900360640190fd5b600180546001600160a01b03199081166001600160a01b0389811691909117909255600280548216888416179055600380548216878416179055600480548216868416179055600580548216858416179055600680549091169183169190911790556040517fc9d3947d22fa124aaec4c7e8c919f79016e2d7b48eee10568375d98b86460d1b90600090a1505050505050565b60006200040e6040518061016001604052808f81526020018e81526020018d81526020018c81526020018b81526020018a6001600160a01b03168152602001896001600160a01b03168152602001886001600160a01b0316815260200187815260200186815260200185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505091525062000648565b9d9c50505050505050505050505050565b6003546001600160a01b031681565b6200043862000644565b6001600160a01b03166200044b620004ef565b6001600160a01b03161462000496576040805162461bcd60e51b81526020600482018190526024820152600080516020620022b3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6002546001600160a01b031681565b6000546001600160a01b031690565b6006546001600160a01b031681565b6004546001600160a01b031681565b6005546001600160a01b031681565b6200053562000644565b6001600160a01b031662000548620004ef565b6001600160a01b03161462000593576040805162461bcd60e51b81526020600482018190526024820152600080516020620022b3833981519152604482015290519081900360640190fd5b6001600160a01b038116620005da5760405162461bcd60e51b81526004018080602001828103825260268152602001806200228d6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b60006200065462000bc8565b604051620006629062000c04565b604051809103906000f0801580156200067f573d6000803e3d6000fd5b506001600160a01b03908116808352600254604051921691620006a29062000c12565b6001600160a01b03928316815291166020820152606060408083018290526000918301829052519182900360a0019190f080158015620006e6573d6000803e3d6000fd5b506001600160a01b0390811660c08301819052600154835160e08701516040805163953b221960e01b81529286166004840152602483019490945284166044820152915192169163953b22199160648082019260a0929091908290030181600087803b1580156200075657600080fd5b505af11580156200076b573d6000803e3d6000fd5b505050506040513d60a08110156200078257600080fd5b5080516020808301516040808501516060808701516080978801516001600160a01b0390811660a08b015290811697890197909752908616908701529084168582015291831690840152825160c0860151825163f2fde38b60e01b81529084166004820152915192169163f2fde38b9160248082019260009290919082900301818387803b1580156200081457600080fd5b505af115801562000829573d6000803e3d6000fd5b505050508060c001516001600160a01b0316637b6abd9c8460000151604051806080016040528087602001518152602001876040015181526020018760600151815260200187608001518152508660a001518760c001518861014001516040518060c0016040528089602001516001600160a01b03166001600160a01b0316815260200189604001516001600160a01b03166001600160a01b031681526020018960a001516001600160a01b03166001600160a01b0316815260200189608001516001600160a01b03166001600160a01b03168152602001600360009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001600460009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152506040518060400160405280600560009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001600660009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681525060405180604001604052808d610100015181526020018d61012001518152506040518963ffffffff1660e01b81526004018089815260200188600460200280838360005b8381101562000a1a57818101518382015260200162000a00565b5050506001600160a01b03808c169490920193845250881660208301525060408101906060018560c080838360005b8381101562000a6357818101518382015260200162000a49565b5050505090500184600260200280838360005b8381101562000a9057818101518382015260200162000a76565b5050505090500183600260200280838360005b8381101562000abd57818101518382015260200162000aa3565b50505050905001828103825286818151815260200191508051906020019080838360005b8381101562000afb57818101518382015260200162000ae1565b50505050905090810190601f16801562000b295780820380516001836020036101000a031916815260200191505b509950505050505050505050600060405180830381600087803b15801562000b5057600080fd5b505af115801562000b65573d6000803e3d6000fd5b50505060c082015160608301518351604080516001600160a01b039384168152918316602083015280519290931693507fd508a734b33000eb18068aa34f20f8014fa578d682a9d355017efcd93e1b4f1092908290030190a260c0015192915050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b61090c8062000c2183390190565b610d60806200152d8339019056fe608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b610886806100866000396000f3fe60806040526004361061006b5760003560e01c8063204e1c7a14610070578063715018a6146100bf5780637eff275e146100d65780638da5cb5b146101115780639623609d1461012657806399a88ec4146101e5578063f2fde38b14610220578063f3b7dead14610253575b600080fd5b34801561007c57600080fd5b506100a36004803603602081101561009357600080fd5b50356001600160a01b0316610286565b604080516001600160a01b039092168252519081900360200190f35b3480156100cb57600080fd5b506100d4610318565b005b3480156100e257600080fd5b506100d4600480360360408110156100f957600080fd5b506001600160a01b03813581169160200135166103c4565b34801561011d57600080fd5b506100a361049a565b6100d46004803603606081101561013c57600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561017057600080fd5b82018360208201111561018257600080fd5b803590602001918460018302840111640100000000831117156101a457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506104a9945050505050565b3480156101f157600080fd5b506100d46004803603604081101561020857600080fd5b506001600160a01b03813581169160200135166105eb565b34801561022c57600080fd5b506100d46004803603602081101561024357600080fd5b50356001600160a01b03166106a5565b34801561025f57600080fd5b506100a36004803603602081101561027657600080fd5b50356001600160a01b03166107a7565b6000806060836001600160a01b03166040518080635c60da1b60e01b8152506004019050600060405180830381855afa9150503d80600081146102e5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ea565b606091505b5091509150816102f957600080fd5b80806020019051602081101561030e57600080fd5b5051949350505050565b610320610806565b6001600160a01b031661033161049a565b6001600160a01b03161461037a576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103cc610806565b6001600160a01b03166103dd61049a565b6001600160a01b031614610426576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b816001600160a01b0316638f283970826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047e57600080fd5b505af1158015610492573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031690565b6104b1610806565b6001600160a01b03166104c261049a565b6001600160a01b03161461050b576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b826001600160a01b0316634f1ef2863484846040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610581578181015183820152602001610569565b50505050905090810190601f1680156105ae5780820380516001836020036101000a031916815260200191505b5093505050506000604051808303818588803b1580156105cd57600080fd5b505af11580156105e1573d6000803e3d6000fd5b5050505050505050565b6105f3610806565b6001600160a01b031661060461049a565b6001600160a01b03161461064d576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b816001600160a01b0316633659cfe6826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047e57600080fd5b6106ad610806565b6001600160a01b03166106be61049a565b6001600160a01b031614610707576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b6001600160a01b03811661074c5760405162461bcd60e51b815260040180806020018281038252602681526020018061080b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806060836001600160a01b031660405180806303e1469160e61b8152506004019050600060405180830381855afa9150503d80600081146102e5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ea565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122005019646333ea388b0c67bda202f0b0f9e694623274a3b0b0cd706bdc2821b5464736f6c634300060b0033608060405260405162000d6038038062000d60833981810160405260608110156200002957600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200005557600080fd5b9083019060208201858111156200006b57600080fd5b82516401000000008111828201881017156200008657600080fd5b82525081516020918201929091019080838360005b83811015620000b55781810151838201526020016200009b565b50505050905090810190601f168015620000e35780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e696d706c656d656e746174696f6e0000000082525190819003601c01902086935084925060008051602062000cbd8339815191526000199091011490506200013c57fe5b62000150826001600160e01b03620001e016565b80511562000171576200016f82826200024660201b620003841760201c565b505b5050604080517f656970313936372e70726f78792e61646d696e000000000000000000000000008152905190819003601301902060008051602062000c9d83398151915260001990910114620001c357fe5b620001d7826001600160e01b036200027e16565b50505062000461565b620001f6816200029160201b620003b01760201c565b620002335760405162461bcd60e51b815260040180806020018281038252603681526020018062000d046036913960400191505060405180910390fd5b60008051602062000cbd83398151915255565b606062000277838360405180606001604052806027815260200162000cdd602791396001600160e01b036200029716565b9392505050565b60008051602062000c9d83398151915255565b3b151590565b6060620002ad846001600160e01b036200029116565b620002ea5760405162461bcd60e51b815260040180806020018281038252602681526020018062000d3a6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106200032a5780518252601f19909201916020918201910162000309565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146200038c576040519150601f19603f3d011682016040523d82523d6000602084013e62000391565b606091505b509092509050620003ad8282866001600160e01b03620003b716565b9695505050505050565b60608315620003c857508162000277565b825115620003d95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620004255781810151838201526020016200040b565b50505050905090810190601f168015620004535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b61082c80620004716000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610262565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b031661029f565b34801561018857600080fd5b5061012d610359565b6101996103b6565b6101a96101a4610416565b61043b565b565b6101b361045f565b6001600160a01b0316336001600160a01b031614156101da576101d581610484565b6101e2565b6101e2610191565b50565b6101ed61045f565b6001600160a01b0316336001600160a01b031614156102555761020f83610484565b61024f8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038492505050565b5061025d565b61025d610191565b505050565b600061026c61045f565b6001600160a01b0316336001600160a01b031614156102945761028d610416565b905061029c565b61029c610191565b90565b6102a761045f565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103055760405162461bcd60e51b815260040180806020018281038252603a8152602001806106f8603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e61045f565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c4565b600061036361045f565b6001600160a01b0316336001600160a01b031614156102945761028d61045f565b60606103a98383604051806060016040528060278152602001610732602791396104e8565b9392505050565b3b151590565b6103be61045f565b6001600160a01b0316336001600160a01b0316141561040e5760405162461bcd60e51b81526004018080602001828103825260428152602001806107b56042913960600191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045a573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61048d816105eb565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b60606104f3846103b0565b61052e5760405162461bcd60e51b815260040180806020018281038252602681526020018061078f6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b6020831061056c5780518252601f19909201916020918201910161054d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146105cc576040519150601f19603f3d011682016040523d82523d6000602084013e6105d1565b606091505b50915091506105e1828286610653565b9695505050505050565b6105f4816103b0565b61062f5760405162461bcd60e51b81526004018080602001828103825260368152602001806107596036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b606083156106625750816103a9565b8251156106725782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156106bc5781810151838201526020016106a4565b50505050905090810190601f1680156106e95780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f2061646472657373416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65645570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e74726163745472616e73706172656e745570677261646561626c6550726f78793a2061646d696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172676574a2646970667358221220175110956fa0a7ff1615f55e1422acff6edcec0099d7ea0bae101f4f6228c8bd64736f6c634300060b0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65645570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220947481173478df5b3625bab9cf93470884ae5d7da7f192cb0d1506a66e7b35ad64736f6c634300060b0033", } // RollupCreatorABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgecontracts/RollupUserFacet.go b/packages/arb-util/ethbridgecontracts/RollupUserFacet.go index 0d772406e9..5fc92ca7bb 100755 --- a/packages/arb-util/ethbridgecontracts/RollupUserFacet.go +++ b/packages/arb-util/ethbridgecontracts/RollupUserFacet.go @@ -30,8 +30,8 @@ var ( // RollupUserFacetMetaData contains all meta data concerning the RollupUserFacet contract. var RollupUserFacetMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterSendAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterSendCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterLogAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterLogCount\",\"type\":\"uint256\"}],\"name\":\"NodeConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"parentNodeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"nodeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"executionHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inboxMaxCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterInboxBatchEndCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterInboxBatchAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32[3][2]\",\"name\":\"assertionBytes32Fields\",\"type\":\"bytes32[3][2]\"},{\"indexed\":false,\"internalType\":\"uint256[4][2]\",\"name\":\"assertionIntFields\",\"type\":\"uint256[4][2]\"}],\"name\":\"NodeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"NodeRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"challengeContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asserter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"challengedNode\",\"type\":\"uint256\"}],\"name\":\"RollupChallengeStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"machineHash\",\"type\":\"bytes32\"}],\"name\":\"RollupCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalBalance\",\"type\":\"uint256\"}],\"name\":\"UserStakeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalBalance\",\"type\":\"uint256\"}],\"name\":\"UserWithdrawableFundsUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"STORAGE_GAP_1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STORAGE_GAP_2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"_stakerMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"latestStakedNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountStaked\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"currentChallenge\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isStaked\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"}],\"name\":\"addToDeposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"amountStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbGasSpeedLimitPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"avmGasSpeedLimitPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeExecutionBisectionDegree\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeFactory\",\"outputs\":[{\"internalType\":\"contractIChallengeFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"winningStaker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"losingStaker\",\"type\":\"address\"}],\"name\":\"completeChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"beforeSendAcc\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sendsData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"sendLengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"afterSendCount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"afterLogAcc\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"afterLogCount\",\"type\":\"uint256\"}],\"name\":\"confirmNextNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"confirmPeriodBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractINode\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"countStakedZombies\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable[2]\",\"name\":\"stakers\",\"type\":\"address[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"nodeNums\",\"type\":\"uint256[2]\"},{\"internalType\":\"bytes32[2]\",\"name\":\"executionHashes\",\"type\":\"bytes32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"proposedTimes\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"maxMessageCounts\",\"type\":\"uint256[2]\"}],\"name\":\"createChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"currentChallenge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRequiredStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedBridge\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraChallengeTimeBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstUnresolvedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"getNode\",\"outputs\":[{\"internalType\":\"contractINode\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getNodeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stakerNum\",\"type\":\"uint256\"}],\"name\":\"getStakerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stakeToken\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isZombie\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastStakeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfirmed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestNodeCreated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"latestStakedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumAssertionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nodeFactory\",\"outputs\":[{\"internalType\":\"contractINodeFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outbox\",\"outputs\":[{\"internalType\":\"contractIOutbox\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"target\",\"type\":\"uint256\"}],\"name\":\"reduceDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"}],\"name\":\"rejectNextNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"}],\"name\":\"removeOldZombies\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNodes\",\"type\":\"uint256\"}],\"name\":\"removeZombie\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"requireUnresolved\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requireUnresolvedExists\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"firstUnresolvedNodeNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"latestCreatedNode\",\"type\":\"uint256\"}],\"name\":\"requiredStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"}],\"name\":\"returnOldDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupEventBridge\",\"outputs\":[{\"internalType\":\"contractRollupEventBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerBridge\",\"outputs\":[{\"internalType\":\"contractISequencerInbox\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"nodeHash\",\"type\":\"bytes32\"}],\"name\":\"stakeOnExistingNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expectedNodeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[3][2]\",\"name\":\"assertionBytes32Fields\",\"type\":\"bytes32[3][2]\"},{\"internalType\":\"uint256[4][2]\",\"name\":\"assertionIntFields\",\"type\":\"uint256[4][2]\"},{\"internalType\":\"uint256\",\"name\":\"beforeProposedBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"beforeInboxMaxCount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"sequencerBatchProof\",\"type\":\"bytes\"}],\"name\":\"stakeOnNewNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakerCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"withdrawStakerFunds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawableFunds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"}],\"name\":\"zombieAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zombieCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"}],\"name\":\"zombieLatestStakedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506000805460ff19908116600117909155600b80549091169055615430806100396000396000f3fe6080604052600436106102eb5760003560e01c80637427be5111610186578063d735e21d116100d7578063edfd03ed11610085578063edfd03ed14610a2b578063ef40a67014610a55578063f31d863f14610a88578063f33e1fac14610b66578063f51de41b14610b90578063f8d1f19414610ba5578063fa7803e614610bcf576102eb565b8063d735e21d14610944578063d7445bc814610959578063d93fe9c41461096e578063dc72a33b14610983578063dff6978714610998578063e4781e10146109ad578063e8bd4922146109c2576102eb565b80638640ce5f116101345780638640ce5f146108605780638da5cb5b1461087557806391c657e81461088a5780639e8a713f146108bd578063c4d66de8146108d2578063ce11e6ab14610905578063d01e66021461091a576102eb565b80637427be511461077657806376e7e23b146107a9578063771b2f97146107be5780637ba9534a146107d35780637e2d2155146107e85780637f4320ce1461081857806381fbc98a1461082d576102eb565b806351ed6a301161024057806363721d6b116101ee57806363721d6b1461068657806365f7f80d1461069b57806367425daf146106b057806369fd251c146106c55780636b94c33b146106f85780636f791d291461072b5780636f7d002614610740576102eb565b806351ed6a30146105b95780635c975abb146105ce5780635dbaf68b146105f75780635e8ef1061461060c5780635f576db6146106215780636177fd181461062957806362a82d7d1461065c576102eb565b80633fe386271161029d5780633fe3862714610437578063414f23fe146104d457806345c5b2c71461050457806345e38b641461052a578063488ed1a91461053f5780634d26732d1461057a5780634f0f4aa91461058f576102eb565b806304a28064146102f05780631e83d30f146103355780632b2af0ab146103615780632e7acfa61461038b5780632f30cabd146103a05780633e55c0c7146103d35780633e96576e14610404575b600080fd5b3480156102fc57600080fd5b506103236004803603602081101561031357600080fd5b50356001600160a01b0316610c0a565b60408051918252519081900360200190f35b34801561034157600080fd5b5061035f6004803603602081101561035857600080fd5b5035610ccb565b005b34801561036d57600080fd5b5061035f6004803603602081101561038457600080fd5b5035610d97565b34801561039757600080fd5b50610323610e33565b3480156103ac57600080fd5b50610323600480360360208110156103c357600080fd5b50356001600160a01b0316610e39565b3480156103df57600080fd5b506103e8610e54565b604080516001600160a01b039092168252519081900360200190f35b34801561041057600080fd5b506103236004803603602081101561042757600080fd5b50356001600160a01b0316610e63565b34801561044357600080fd5b5061035f600480360361024081101561045b57600080fd5b813591602081019160e08201916101e08101359161020082013591908101906102408101610220820135600160201b81111561049657600080fd5b8201836020820111156104a857600080fd5b803590602001918460018302840111600160201b831117156104c957600080fd5b509092509050610e81565b3480156104e057600080fd5b5061035f600480360360408110156104f757600080fd5b50803590602001356112f5565b61035f6004803603602081101561051a57600080fd5b50356001600160a01b0316611554565b34801561053657600080fd5b506103236115fa565b34801561054b57600080fd5b5061035f600480360361014081101561056357600080fd5b50604081016080820160c083016101008401611600565b34801561058657600080fd5b50610323611f29565b34801561059b57600080fd5b506103e8600480360360208110156105b257600080fd5b5035611f4e565b3480156105c557600080fd5b506103e8611f69565b3480156105da57600080fd5b506105e3611f78565b604080519115158252519081900360200190f35b34801561060357600080fd5b506103e8611f81565b34801561061857600080fd5b50610323611f90565b61035f611f96565b34801561063557600080fd5b506105e36004803603602081101561064c57600080fd5b50356001600160a01b031661203d565b34801561066857600080fd5b506103e86004803603602081101561067f57600080fd5b5035612065565b34801561069257600080fd5b5061032361208f565b3480156106a757600080fd5b50610323612095565b3480156106bc57600080fd5b5061035f61209b565b3480156106d157600080fd5b506103e8600480360360208110156106e857600080fd5b50356001600160a01b0316612105565b34801561070457600080fd5b5061035f6004803603602081101561071b57600080fd5b50356001600160a01b0316612126565b34801561073757600080fd5b506105e361257a565b34801561074c57600080fd5b506103236004803603606081101561076357600080fd5b5080359060208101359060400135612583565b34801561078257600080fd5b5061035f6004803603602081101561079957600080fd5b50356001600160a01b031661259a565b3480156107b557600080fd5b50610323612699565b3480156107ca57600080fd5b5061032361269f565b3480156107df57600080fd5b506103236126a5565b3480156107f457600080fd5b5061035f6004803603604081101561080b57600080fd5b50803590602001356126ab565b34801561082457600080fd5b506103236128e8565b34801561083957600080fd5b506103236004803603602081101561085057600080fd5b50356001600160a01b03166128ee565b34801561086c57600080fd5b506103236129d5565b34801561088157600080fd5b506103e86129db565b34801561089657600080fd5b506105e3600480360360208110156108ad57600080fd5b50356001600160a01b03166129ea565b3480156108c957600080fd5b506103e8612a44565b3480156108de57600080fd5b5061035f600480360360208110156108f557600080fd5b50356001600160a01b0316612a53565b34801561091157600080fd5b506103e8612aa2565b34801561092657600080fd5b506103e86004803603602081101561093d57600080fd5b5035612ab1565b34801561095057600080fd5b50610323612ae0565b34801561096557600080fd5b50610323612ae6565b34801561097a57600080fd5b506103e8612aec565b34801561098f57600080fd5b50610323612afb565b3480156109a457600080fd5b50610323612b01565b3480156109b957600080fd5b50610323612b07565b3480156109ce57600080fd5b506109f5600480360360208110156109e557600080fd5b50356001600160a01b0316612b0d565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b348015610a3757600080fd5b5061035f60048036036020811015610a4e57600080fd5b5035612b49565b348015610a6157600080fd5b5061032360048036036020811015610a7857600080fd5b50356001600160a01b0316612c4a565b348015610a9457600080fd5b5061035f600480360360c0811015610aab57600080fd5b81359190810190604081016020820135600160201b811115610acc57600080fd5b820183602082011115610ade57600080fd5b803590602001918460018302840111600160201b83111715610aff57600080fd5b919390929091602081019035600160201b811115610b1c57600080fd5b820183602082011115610b2e57600080fd5b803590602001918460208302840111600160201b83111715610b4f57600080fd5b919350915080359060208101359060400135612c68565b348015610b7257600080fd5b5061032360048036036020811015610b8957600080fd5b5035612fc0565b348015610b9c57600080fd5b506103e8612fe8565b348015610bb157600080fd5b5061032360048036036020811015610bc857600080fd5b5035612ff7565b348015610bdb57600080fd5b5061035f60048036036040811015610bf257600080fd5b506001600160a01b0381358116916020013516613009565b600080610c1561208f565b90506000805b82811015610cc157846001600160a01b0316639168ae72610c3b83612ab1565b6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610c8157600080fd5b505afa158015610c95573d6000803e3d6000fd5b505050506040513d6020811015610cab57600080fd5b505115610cb9576001909101905b600101610c1b565b509150505b919050565b336000908152601d602052604090205460ff16610d1f576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b610d27611f78565b15610d67576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b610d70336130bd565b6000610d7a611f29565b905080821015610d88578091505b610d923383613154565b505050565b610d9f612ae0565b811015610de5576040805162461bcd60e51b815260206004820152600f60248201526e1053149150511657d11150d2511151608a1b604482015290519081900360640190fd5b610ded6126a5565b811115610e30576040805162461bcd60e51b815260206004820152600c60248201526b1113d154d39517d1561254d560a21b604482015290519081900360640190fd5b50565b600c5481565b6001600160a01b03166000908152600a602052604090205490565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b336000908152601d602052604090205460ff16610ed5576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b610edd611f78565b15610f1d576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b610f263361203d565b610f64576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b610f6c6152ac565b6040805180820190915261109f908860026000835b82821015610fc25760408051606081810190925290808402860190600390839083908082843760009201919091525050508152600190910190602001610f81565b505060408051808201909152915089905060026000835b8282101561101a5760408051608081810190925290808402860190600490839083908082843760009201919091525050508152600190910190602001610fd9565b505050508787601160009054906101000a90046001600160a01b03166001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b15801561106e57600080fd5b505afa158015611082573d6000803e3d6000fd5b505050506040513d602081101561109857600080fd5b505161321a565b805160e001519091506000906110bc90439063ffffffff61326816565b9050601854811015611102576040805162461bcd60e51b815260206004820152600a60248201526954494d455f44454c544160b01b604482015290519081900360640190fd5b600061110d836132c5565b9050826000015161010001518360200151604001511015806111425750600e5461113e90839063ffffffff6132e116565b8110155b8061116e5750825160609081015160208501519091015160649161116c919063ffffffff61326816565b145b6111ab576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d350531360ba1b604482015290519081900360640190fd5b82516060908101516020850151909101516064916111cf919063ffffffff61326816565b1115611213576040805162461bcd60e51b815260206004820152600e60248201526d544f4f5f4d414e595f53454e445360901b604482015290519081900360640190fd5b611239600461122d600e54856132e190919063ffffffff16565b9063ffffffff6132e116565b811115611279576040805162461bcd60e51b8152602060048201526009602482015268544f4f5f4c4152474560b81b604482015290519081900360640190fd5b50506112d681888886866040518060c0016040528061129733610e63565b8152600c546020820152600e5460408201526011546001600160a01b039081166060830152601354811660808301526015541660a0909101528e61333a565b506112eb336112e36126a5565b600c546139f4565b5050505050505050565b336000908152601d602052604090205460ff16611349576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b611351611f78565b15611391576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61139a3361203d565b6113d8576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b806113e283612ff7565b14611421576040805162461bcd60e51b815260206004820152600a6024820152694e4f44455f52454f524760b01b604482015290519081900360640190fd5b611429612ae0565b821015801561143f575061143b6126a5565b8211155b611488576040805162461bcd60e51b81526020600482015260156024820152744e4f44455f4e554d5f4f55545f4f465f52414e474560581b604482015290519081900360640190fd5b600061149383611f4e565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ce57600080fd5b505afa1580156114e2573d6000803e3d6000fd5b505050506040513d60208110156114f857600080fd5b505161150333610e63565b14611547576040805162461bcd60e51b815260206004820152600f60248201526e2727aa2fa9aa20a5a2a22fa82922ab60891b604482015290519081900360640190fd5b610d923384600c546139f4565b336000908152601d602052604090205460ff166115a8576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6115b0611f78565b156115f0576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b610e308134613b8d565b60185481565b336000908152601d602052604090205460ff16611654576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61165c611f78565b1561169c576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b60208401358435106116e3576040805162461bcd60e51b815260206004820152600b60248201526a2ba927a723afa7a92222a960a91b604482015290519081900360640190fd5b6116eb6126a5565b60208501351115611732576040805162461bcd60e51b815260206004820152600c60248201526b1393d517d41493d413d4d15160a21b604482015290519081900360640190fd5b833561173c612095565b10611782576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d0d3d3919254935151607a1b604482015290519081900360640190fd5b600061179485825b6020020135611f4e565b905060006117a386600161178a565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156117de57600080fd5b505afa1580156117f2573d6000803e3d6000fd5b505050506040513d602081101561180857600080fd5b5051604080516311e7249560e21b815290516001600160a01b0385169163479c9254916004808301926020929190829003018186803b15801561184a57600080fd5b505afa15801561185e573d6000803e3d6000fd5b505050506040513d602081101561187457600080fd5b5051146118b4576040805162461bcd60e51b81526020600482015260096024820152682224a3232fa82922ab60b91b604482015290519081900360640190fd5b6118ce8760005b60200201356001600160a01b03166130bd565b6118d98760016118bb565b604080516348b4573960e11b81526001600160a01b03893581166004830152915191841691639168ae7291602480820192602092909190829003018186803b15801561192457600080fd5b505afa158015611938573d6000803e3d6000fd5b505050506040513d602081101561194e57600080fd5b5051611996576040805162461bcd60e51b815260206004820152601260248201527114d51052d1548c57d393d517d4d51052d15160721b604482015290519081900360640190fd5b604080516348b4573960e11b81526001600160a01b0360208a81013582166004840152925190841692639168ae729260248082019391829003018186803b1580156119e057600080fd5b505afa1580156119f4573d6000803e3d6000fd5b505050506040513d6020811015611a0a57600080fd5b5051611a52576040805162461bcd60e51b815260206004820152601260248201527114d51052d1548c97d393d517d4d51052d15160721b604482015290519081900360640190fd5b611a67853585358560005b6020020135613c3c565b826001600160a01b0316635b8b22806040518163ffffffff1660e01b815260040160206040518083038186803b158015611aa057600080fd5b505afa158015611ab4573d6000803e3d6000fd5b505050506040513d6020811015611aca57600080fd5b505114611b0b576040805162461bcd60e51b815260206004820152600a6024820152694348414c5f484153483160b01b604482015290519081900360640190fd5b611b2060208087013590860135856001611a5d565b816001600160a01b0316635b8b22806040518163ffffffff1660e01b815260040160206040518083038186803b158015611b5957600080fd5b505afa158015611b6d573d6000803e3d6000fd5b505050506040513d6020811015611b8357600080fd5b505114611bc4576040805162461bcd60e51b815260206004820152600a60248201526921a420a62fa420a9a41960b11b604482015290519081900360640190fd5b6000611d3e611c61600d54611c5588600060028110611bdf57fe5b6020020135876001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c1d57600080fd5b505afa158015611c31573d6000803e3d6000fd5b505050506040513d6020811015611c4757600080fd5b50519063ffffffff61326816565b9063ffffffff613c7316565b611cce856001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015611c9d57600080fd5b505afa158015611cb1573d6000803e3d6000fd5b505050506040513d6020811015611cc757600080fd5b5051611f4e565b6001600160a01b031663d7ff5e356040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0657600080fd5b505afa158015611d1a573d6000803e3d6000fd5b505050506040513d6020811015611d3057600080fd5b50519063ffffffff613c7316565b90506020850135811015611d7857611d706001600160a01b0389351689600160200201356001600160a01b0316613ccd565b505050611f22565b6014546000906001600160a01b0390811690638ecaab119030908a35908935908e35168e600160200201356001600160a01b0316611dd08d600060028110611dbc57fe5b60200201358a61326890919063ffffffff16565b611dea8e600160200201358b61326890919063ffffffff16565b601154601054604080516001600160e01b031960e08d901b1681526001600160a01b039a8b166004820152602481019990995260448901979097529488166064880152928716608487015260a486019190915260c4850152841660e484015290921661010482015290516101248083019260209291908290030181600087803b158015611e7657600080fd5b505af1158015611e8a573d6000803e3d6000fd5b505050506040513d6020811015611ea057600080fd5b50519050611ec96001600160a01b038a35168a600160200201356001600160a01b031683613d54565b604080516001600160a01b038b35811682526020808d01358216908301528a35828401529151918316917fa5256d19d4ddaf646f4b5c1861b8d4c08238e6356b8ae36dcc49ac67fda758799181900360600190a2505050505b5050505050565b600080611f34612ae0565b9050611f484382611f436126a5565b613d9e565b91505090565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b600b5460ff1690565b6014546001600160a01b031681565b600e5490565b336000908152601d602052604090205460ff16611fea576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b611ff2611f78565b15612032576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61203b34614055565b565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b60006007828154811061207457fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b60006120a5612ae0565b90506120af612095565b811180156120c457506120c06126a5565b8111155b610e30576040805162461bcd60e51b815260206004820152600d60248201526c1393d7d553949154d3d3159151609a1b604482015290519081900360640190fd5b6001600160a01b039081166000908152600860205260409020600301541690565b336000908152601d602052604090205460ff1661217a576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612182611f78565b156121c2576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b6121ca61209b565b60006121d4612095565b905060006121e0612ae0565b905060006121ed82611f4e565b905082816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561222957600080fd5b505afa15801561223d573d6000803e3d6000fd5b505050506040513d602081101561225357600080fd5b505114156124dc576122648461203d565b6122a2576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b6122b36122ae85610e63565b610d97565b806001600160a01b0316639168ae72856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561230957600080fd5b505afa15801561231d573d6000803e3d6000fd5b505050506040513d602081101561233357600080fd5b50511561237a576040805162461bcd60e51b815260206004820152601060248201526f14d51052d15117d3d397d5105491d15560821b604482015290519081900360640190fd5b806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b1580156123b357600080fd5b505afa1580156123c7573d6000803e3d6000fd5b505050506123d483611f4e565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b15801561240c57600080fd5b505afa158015612420573d6000803e3d6000fd5b5050505061242e6000612b49565b61243781610c0a565b816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b15801561247057600080fd5b505afa158015612484573d6000803e3d6000fd5b505050506040513d602081101561249a57600080fd5b5051146124dc576040805162461bcd60e51b815260206004820152600b60248201526a4841535f5354414b45525360a81b604482015290519081900360640190fd5b6124e4614261565b60135460408051630c2a09ad60e21b81526004810185905290516001600160a01b03909216916330a826b49160248082019260009290919082900301818387803b15801561253157600080fd5b505af1158015612545573d6000803e3d6000fd5b50506040518492507f9f7eee12f08e41a1d1a617e76576aa2d6a1e06dbdd72d817e62b6e8dfdebe2a39150600090a250505050565b60005460ff1690565b6000612590848484613d9e565b90505b9392505050565b336000908152601d602052604090205460ff166125ee576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6125f6611f78565b15612636576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61263e612095565b61264782610e63565b1115612687576040805162461bcd60e51b815260206004820152600a6024820152691513d3d7d49150d1539560b21b604482015290519081900360640190fd5b612690816130bd565b610e3081614277565b600f5481565b600d5481565b60035490565b336000908152601d602052604090205460ff166126ff576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612707611f78565b15612747576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61274f61208f565b821115612794576040805162461bcd60e51b815260206004820152600e60248201526d4e4f5f535543485f5a4f4d42494560901b604482015290519081900360640190fd5b600061279f83612ab1565b905060006127ac84612fc0565b90506000806127b9612ae0565b90505b8083101580156127cb57508482105b156128c05760006127db84611f4e565b9050806001600160a01b03166396a9fdc0866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561283557600080fd5b505af1158015612849573d6000803e3d6000fd5b50505050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561288657600080fd5b505afa15801561289a573d6000803e3d6000fd5b505050506040513d60208110156128b057600080fd5b50519350506001909101906127bc565b808310156128d6576128d1866142dd565b6128e0565b6128e08684614379565b505050505050565b601a5481565b336000908152601d602052604081205460ff16612942576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61294a611f78565b1561298a576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b6000612995336143a0565b6040519091506001600160a01b0384169082156108fc029083906000818181858888f193505050501580156129ce573d6000803e3d6000fd5b5092915050565b60045490565b6016546001600160a01b031681565b6000805b600954811015612a3b5760098181548110612a0557fe5b60009182526020909120600290910201546001600160a01b0384811691161415612a33576001915050610cc6565b6001016129ee565b50600092915050565b6013546001600160a01b031681565b6001600160a01b03811615610e30576040805162461bcd60e51b815260206004820152601060248201526f1393d7d513d2d15397d0531313d5d15160821b604482015290519081900360640190fd5b6012546001600160a01b031681565b600060098281548110612ac057fe5b60009182526020909120600290910201546001600160a01b031692915050565b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b336000908152601d602052604090205460ff16612b9d576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612ba5611f78565b15612be5576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b6000612bef61208f565b90506000612bfb612ae0565b9050825b82811015612c44575b81612c1282612fc0565b1015612c3c57612c21816142dd565b60001990920191828110612c3757505050610e30565b612c08565b600101612bff565b50505050565b6001600160a01b031660009081526008602052604090206002015490565b336000908152601d602052604090205460ff16612cbc576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612cc4611f78565b15612d04576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b612d0c61209b565b6000612d16612b01565b11612d55576040805162461bcd60e51b815260206004820152600a6024820152694e4f5f5354414b45525360b01b604482015290519081900360640190fd5b6000612d67612d62612ae0565b611f4e565b9050806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b158015612da257600080fd5b505afa158015612db6573d6000803e3d6000fd5b50505050612dc2612095565b816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015612dfb57600080fd5b505afa158015612e0f573d6000803e3d6000fd5b505050506040513d6020811015612e2557600080fd5b505114612e68576040805162461bcd60e51b815260206004820152600c60248201526b24a72b20a624a22fa82922ab60a11b604482015290519081900360640190fd5b612e73612d62612095565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b158015612eab57600080fd5b505afa158015612ebf573d6000803e3d6000fd5b50505050612ecd6000612b49565b612ee1612ed982610c0a565b611c55612b01565b816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1a57600080fd5b505afa158015612f2e573d6000803e3d6000fd5b505050506040513d6020811015612f4457600080fd5b505114612f89576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d0531317d4d51052d15160921b604482015290519081900360640190fd5b601254601354612fb5918b918b918b918b918b918b918b918b916001600160a01b039081169116614403565b505050505050505050565b600060098281548110612fcf57fe5b9060005260206000209060020201600101549050919050565b6010546001600160a01b031681565b60009081526006602052604090205490565b613011611f78565b15613051576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61305b8282614424565b6001600160a01b0316336001600160a01b0316146130af576040805162461bcd60e51b815260206004820152600c60248201526b2ba927a723afa9a2a72222a960a11b604482015290519081900360640190fd5b6130b98282613ccd565b5050565b6130c68161203d565b613104576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b600061310f82612105565b6001600160a01b031614610e30576040805162461bcd60e51b8152602060048201526007602482015266125397d0d2105360ca1b604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604081206002810154808411156131b9576040805162461bcd60e51b815260206004820152601060248201526f544f4f5f4c4954544c455f5354414b4560801b604482015290519081900360640190fd5b60006131cb828663ffffffff61326816565b6002840186905590506131de86826144ea565b604080518381526020810187905281516001600160a01b0389169260008051602061539a833981519152928290030190a2925050505b92915050565b6132226152ac565b6040805180820190915286518651829161323d918888614575565b815260200161325c886001602002015188600160200201514387614575565b90529695505050505050565b6000828211156132bf576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b805151602082015151600091613214919063ffffffff61326816565b6000826132f057506000613214565b828202828482816132fd57fe5b04146125935760405162461bcd60e51b81526004018080602001828103825260218152602001806153ba6021913960400191505060405180910390fd5b60006133446152d1565b61334d896132c5565b60e0820152835161335d90611f4e565b81606001906001600160a01b031690816001600160a01b03168152505083606001516001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b1580156133b757600080fd5b505afa1580156133cb573d6000803e3d6000fd5b505050506040513d60208110156133e157600080fd5b5051815260608101516040805163380ed4c760e11b815290516001600160a01b039092169163701da98e91600480820192602092909190829003018186803b15801561342c57600080fd5b505afa158015613440573d6000803e3d6000fd5b505050506040513d602081101561345657600080fd5b5051895161346390614613565b146134a7576040805162461bcd60e51b815260206004820152600f60248201526e0a0a48aacbea6a882a88abe9082a69608b1b604482015290519081900360640190fd5b805160208a01516040015111156134f6576040805162461bcd60e51b815260206004820152600e60248201526d12539093d617d41054d517d1539160921b604482015290519081900360640190fd5b83606001516001600160a01b031663dc1b7b1f87878c60200151604001516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604080518083038186803b15801561357957600080fd5b505afa15801561358d573d6000803e3d6000fd5b505050506040513d60408110156135a357600080fd5b5080516020909101516101208301526101008201526135c1896146a8565b8160400181815250506135e684604001518260e00151866020015184606001516146d9565b8160c0018181525050600081606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561362e57600080fd5b505afa158015613642573d6000803e3d6000fd5b505050506040513d602081101561365857600080fd5b50511160a08201819052156136e2576136d881606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136a757600080fd5b505afa1580156136bb573d6000803e3d6000fd5b505050506040513d60208110156136d157600080fd5b5051612ff7565b60808201526136f3565b83516136ed90612ff7565b60808201525b8360a001516001600160a01b031663d45ab2b56137138b60200151614613565b6137228c856040015143614847565b61372b8d61485c565b88600001518660c001516040518663ffffffff1660e01b81526004018086815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561378757600080fd5b505af115801561379b573d6000803e3d6000fd5b505050506040513d60208110156137b157600080fd5b50516001600160a01b0316602082015260006137cb6126a5565b600101905081606001516001600160a01b0316631bc09d0a826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561381a57600080fd5b505af115801561382e573d6000803e3d6000fd5b5050505061384f8260a001518360800151846040015185610120015161488c565b925083831461389c576040805162461bcd60e51b81526020600482015260146024820152730aa9c8ab0a08a86a88a88be9c9e888abe9082a6960631b604482015290519081900360640190fd5b6138aa8260200151846148f3565b6080850151855160c084015160408051638b8ca19960e01b81526004810186905260248101939093526044830191909152336064830152516001600160a01b0390921691638b8ca1999160848082019260009290919082900301818387803b15801561391557600080fd5b505af1158015613929573d6000803e3d6000fd5b505050505061393b8460000151612ff7565b6139436126a5565b7f8016306209aff73e79f274cf38a41928996f746e2953111902e1f55be1713a5484846040015185600001518661010001518761012001518f8f6040518088815260200187815260200186815260200185815260200184815260200183600260600280828437600083820152601f01601f191690910190508261010080828437600083820152604051601f909101601f1916909201829003995090975050505050505050a350979650505050505050565b6001600160a01b0380841660008181526008602090815260408083208784526005835281842054825163123334b760e11b815260048101969096529151909591909116938492632466696e9260248084019382900301818787803b158015613a5b57600080fd5b505af1158015613a6f573d6000803e3d6000fd5b505050506040513d6020811015613a8557600080fd5b505160018085018790559091508114156128e057600060056000846001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015613ad857600080fd5b505afa158015613aec573d6000803e3d6000fd5b505050506040513d6020811015613b0257600080fd5b505181526020810191909152604001600020546001600160a01b0316905080636971dfe5613b36438863ffffffff613c7316565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015613b6c57600080fd5b505af1158015613b80573d6000803e3d6000fd5b5050505050505050505050565b336000908152601d602052604090205460ff16613be1576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b613be9611f78565b15613c29576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b613c32826130bd565b6130b9828261493d565b6040805160208082019590955280820193909352606080840192909252805180840390920182526080909201909152805191012090565b600082820183811015612593576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000613cd882612c4a565b90506000613ce584612c4a565b905080821115613d0c57613d09613cfc8483613154565b839063ffffffff61326816565b91505b60028204613d1a858261493d565b613d2a838263ffffffff61326816565b9250613d35856149b1565b601654613d4b906001600160a01b0316846144ea565b611f22846149db565b6001600160a01b03928316600090815260086020526040808220600390810180549487166001600160a01b0319958616811790915594909516825290209092018054909216179055565b600081600184031415613db45750600f54612593565b6000613dbf84611f4e565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b158015613df757600080fd5b505afa158015613e0b573d6000803e3d6000fd5b505050506040513d6020811015613e2157600080fd5b5051905080851015613e37575050600f54612593565b613e3f615325565b506040805161014081018252600181526201e05b60208201526201f7d191810191909152620138916060820152620329e160808201526201be4360a08201526204cb8c60c08201526201fbc460e082015262036d3261010082015262027973610120820152613eac615325565b506040805161014081018252600181526201c03060208201526201b6999181019190915261fde26060820152620265c6608082015262013b8e60a0820152620329e160c08201526201389160e08201526201f7d1610100820152620153756101208201526000613f22888563ffffffff61326816565b90506000613f4c600c54613f40600a856132e190919063ffffffff16565b9063ffffffff614a8b16565b905060ff613f6182600a63ffffffff614a8b16565b10613f755760001995505050505050612593565b6000613f8882600a63ffffffff614a8b16565b60020a9050600085600a8406600a8110613f9e57fe5b602002015162ffffff168202905085600a8406600a8110613fbb57fe5b602002015162ffffff16828281613fce57fe5b0414613fe557600019975050505050505050612593565b600061401086600a8606600a8110613ff957fe5b6020020151839062ffffff1663ffffffff614a8b16565b90508061401b575060015b600f54808202908290828161402c57fe5b0414614045576000199950505050505050505050612593565b9c9b505050505050505050505050565b336000908152601d602052604090205460ff166140a9576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6140b1611f78565b156140f1576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b6140fa3361203d565b1561413d576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b604482015290519081900360640190fd5b614146336129ea565b1561418b576040805162461bcd60e51b815260206004820152601060248201526f5354414b45525f49535f5a4f4d42494560801b604482015290519081900360640190fd5b614193611f29565b8110156141da576040805162461bcd60e51b815260206004820152601060248201526f4e4f545f454e4f5547485f5354414b4560801b604482015290519081900360640190fd5b6141e43382614af2565b6013546001600160a01b031663f03c04a5336141fe612095565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561424d57600080fd5b505af1158015611f22573d6000803e3d6000fd5b61426c600254614beb565b600280546001019055565b6001600160a01b0381166000908152600860205260409020600281015461429e83826144ea565b6142a783614c6d565b604080518281526000602082015281516001600160a01b0386169260008051602061539a833981519152928290030190a2505050565b6009805460001981019081106142ef57fe5b90600052602060002090600202016009828154811061430a57fe5b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b03909216919091178155600191820154910155600980548061434d57fe5b60008281526020812060026000199093019283020180546001600160a01b031916815560010155905550565b806009838154811061438757fe5b9060005260206000209060020201600101819055505050565b6001600160a01b0381166000818152600a60209081526040808320805490849055815181815292830184905281519394909390927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae292908290030190a292915050565b6144186002548b8b8b8b8b8b8b8b8b8b614d93565b50505050505050505050565b6001600160a01b0380831660009081526008602052604080822084841683529082206003820154929391929091168061448e576040805162461bcd60e51b81526020600482015260076024820152661393d7d0d2105360ca1b604482015290519081900360640190fd5b60038201546001600160a01b038281169116146144e1576040805162461bcd60e51b815260206004820152600c60248201526b1112519197d25397d0d2105360a21b604482015290519081900360640190fd5b95945050505050565b6001600160a01b0382166000908152600a602052604081205490614514828463ffffffff613c7316565b6001600160a01b0385166000818152600a60209081526040918290208490558151868152908101849052815193945091927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae29281900390910190a250505050565b61457d615344565b6040805161012081018252855181528651602082015290810185600160200201518152602001856002600481106145b057fe5b60200201518152602001856003600481106145c757fe5b60200201518152602001866001600381106145de57fe5b60200201518152602001866002600381106145f557fe5b60200201518152602001848152602001838152509050949350505050565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b805180516020830151516000926132149291829003906146c790615064565b6146d48660200151615064565b615099565b60008061470186613f406146f482600163ffffffff61326816565b889063ffffffff613c7316565b905061478481611c5561471a438863ffffffff613c7316565b866001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561475357600080fd5b505afa158015614767573d6000803e3d6000fd5b505050506040513d602081101561477d57600080fd5b50516150d7565b91506000836001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156147c157600080fd5b505afa1580156147d5573d6000803e3d6000fd5b505050506040513d60208110156147eb57600080fd5b50519050801561483d5761483a8361480283611f4e565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561475357600080fd5b92505b5050949350505050565b60006125908383866020015160400151613c3c565b805160a09081015160208301519182015160c08301516060840151608090940151600094613214949392916150ed565b6000808561489b57600061489e565b60015b905080858585604051602001808560ff1660ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120915050949350505050565b60038054600101808255600090815260056020908152604080832080546001600160a01b0319166001600160a01b0397909716969096179095559154815260069091529190912055565b6001600160a01b03821660009081526008602052604081206002810154909161496c828563ffffffff613c7316565b60028401819055604080518481526020810183905281519293506001600160a01b0388169260008051602061539a833981519152929181900390910190a25050505050565b6001600160a01b0316600090815260086020526040902060030180546001600160a01b0319169055565b6001600160a01b0381811660008181526008602090815260408083208151808301909252938152600180850154928201928352600980549182018155909352517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af600290930292830180546001600160a01b031916919095161790935591517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0909201919091556130b982614c6d565b6000808211614ae1576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381614aea57fe5b049392505050565b6007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688810180546001600160a01b038087166001600160a01b031992831681179093556040805160a081018252858152865460208281019182528284018a8152600060608501818152608086018c81528a8352600885528783209651875594519b86019b909b559051600285015598516003909301805492511515600160a01b0260ff60a01b199490961692909616919091179190911692909217909255436004558151948552840185905280519293919260008051602061539a8339815191529281900390910190a2505050565b60008181526005602052604080822054815163083197ef60e41b815291516001600160a01b03909116926383197ef0926004808201939182900301818387803b158015614c3757600080fd5b505af1158015614c4b573d6000803e3d6000fd5b50505060009182525060056020526040902080546001600160a01b0319169055565b6001600160a01b03811660009081526008602052604090208054600780546000198101908110614c9957fe5b600091825260209091200154600780546001600160a01b039092169183908110614cbf57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806008600060078481548110614cff57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556007805480614d2f57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03949094168152600890935250506040812081815560018101829055600281019190915560030180546001600160a81b0319169055565b6000614e148a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508d615134565b90506000614e218d611f4e565b9050614e308c83888a896150ed565b816001600160a01b03166397bdc5106040518163ffffffff1660e01b815260040160206040518083038186803b158015614e6957600080fd5b505afa158015614e7d573d6000803e3d6000fd5b505050506040513d6020811015614e9357600080fd5b505114614ed6576040805162461bcd60e51b815260206004820152600c60248201526b434f4e4649524d5f4441544160a01b604482015290519081900360640190fd5b836001600160a01b0316630c7268478c8c8c8c6040518563ffffffff1660e01b81526004018080602001806020018381038352878782818152602001925080828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b158015614f7857600080fd5b505af1158015614f8c573d6000803e3d6000fd5b50505050614f9b600154614beb565b60018d81558d01600255604080516316b9109b60e01b8152600481018f905290516001600160a01b038516916316b9109b91602480830192600092919082900301818387803b158015614fed57600080fd5b505af1158015615001573d6000803e3d6000fd5b505050508c7f2400bd6e429cfcd98fe43a75bbbe4702c59c99d636100690130cc1ebb611c5a2838989896040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050505050505050565b60006132148260000151615094846040015185602001518660a0015187606001518860c001518960800151615235565b615280565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b60008183116150e65781612593565b5090919050565b60408051602080820197909752808201959095526060850192909252608084019290925260a0808401929092528051808403909201825260c0909201909152805191012090565b81518351600091829184835b838110156151e757600088828151811061515657fe5b602002602001015190508381870111156151a6576040805162461bcd60e51b815260206004820152600c60248201526b2220aa20afa7ab22a9292aa760a11b604482015290519081900360640190fd5b6020868b0181018290206040805180840196909652858101919091528051808603820181526060909501905283519301929092209190940193600101615140565b5081841461522a576040805162461bcd60e51b815260206004820152600b60248201526a08882a882be988a9c8ea8960ab1b604482015290519081900360640190fd5b979650505050505050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60405180604001604052806152bf615344565b81526020016152cc615344565b905290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101400160405280600a906020820280368337509192915050565b604051806101200160405280600081526020016000801916815260200160008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152509056feebd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775061757361626c653a2070617573656400000000000000000000000000000000a2646970667358221220e1ae834cf4c2451e6f24dd6852c780bafb0ab21a2f7beb14610d7afe643bb8fe64736f6c634300060b0033", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterSendAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterSendCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterLogAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterLogCount\",\"type\":\"uint256\"}],\"name\":\"NodeConfirmed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"parentNodeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"nodeHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"executionHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"inboxMaxCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"afterInboxBatchEndCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterInboxBatchAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32[3][2]\",\"name\":\"assertionBytes32Fields\",\"type\":\"bytes32[3][2]\"},{\"indexed\":false,\"internalType\":\"uint256[4][2]\",\"name\":\"assertionIntFields\",\"type\":\"uint256[4][2]\"}],\"name\":\"NodeCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"NodeRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"challengeContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asserter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"challengedNode\",\"type\":\"uint256\"}],\"name\":\"RollupChallengeStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"machineHash\",\"type\":\"bytes32\"}],\"name\":\"RollupCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalBalance\",\"type\":\"uint256\"}],\"name\":\"UserStakeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalBalance\",\"type\":\"uint256\"}],\"name\":\"UserWithdrawableFundsUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"STORAGE_GAP_1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STORAGE_GAP_2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"_stakerMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"latestStakedNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountStaked\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"currentChallenge\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isStaked\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"}],\"name\":\"addToDeposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"amountStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbGasSpeedLimitPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"avmGasSpeedLimitPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeExecutionBisectionDegree\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeFactory\",\"outputs\":[{\"internalType\":\"contractIChallengeFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"winningStaker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"losingStaker\",\"type\":\"address\"}],\"name\":\"completeChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"beforeSendAcc\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sendsData\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"sendLengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"afterSendCount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"afterLogAcc\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"afterLogCount\",\"type\":\"uint256\"}],\"name\":\"confirmNextNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"confirmPeriodBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractINode\",\"name\":\"node\",\"type\":\"address\"}],\"name\":\"countStakedZombies\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable[2]\",\"name\":\"stakers\",\"type\":\"address[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"nodeNums\",\"type\":\"uint256[2]\"},{\"internalType\":\"bytes32[2]\",\"name\":\"executionHashes\",\"type\":\"bytes32[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"proposedTimes\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"maxMessageCounts\",\"type\":\"uint256[2]\"}],\"name\":\"createChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"currentChallenge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRequiredStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedBridge\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraChallengeTimeBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstUnresolvedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"getNode\",\"outputs\":[{\"internalType\":\"contractINode\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getNodeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"stakerNum\",\"type\":\"uint256\"}],\"name\":\"getStakerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stakeToken\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isNitroReady\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isStaked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isZombie\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastStakeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfirmed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestNodeCreated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"latestStakedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumAssertionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newStake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nodeFactory\",\"outputs\":[{\"internalType\":\"contractINodeFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"outbox\",\"outputs\":[{\"internalType\":\"contractIOutbox\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"target\",\"type\":\"uint256\"}],\"name\":\"reduceDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"}],\"name\":\"rejectNextNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"}],\"name\":\"removeOldZombies\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNodes\",\"type\":\"uint256\"}],\"name\":\"removeZombie\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"requireUnresolved\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requireUnresolvedExists\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"firstUnresolvedNodeNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"latestCreatedNode\",\"type\":\"uint256\"}],\"name\":\"requiredStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"}],\"name\":\"returnOldDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupEventBridge\",\"outputs\":[{\"internalType\":\"contractRollupEventBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerBridge\",\"outputs\":[{\"internalType\":\"contractISequencerInbox\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"shutdownForNitroBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"shutdownForNitroMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"nodeHash\",\"type\":\"bytes32\"}],\"name\":\"stakeOnExistingNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expectedNodeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[3][2]\",\"name\":\"assertionBytes32Fields\",\"type\":\"bytes32[3][2]\"},{\"internalType\":\"uint256[4][2]\",\"name\":\"assertionIntFields\",\"type\":\"uint256[4][2]\"},{\"internalType\":\"uint256\",\"name\":\"beforeProposedBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"beforeInboxMaxCount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"sequencerBatchProof\",\"type\":\"bytes\"}],\"name\":\"stakeOnNewNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakerCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"withdrawStakerFunds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdrawableFunds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"}],\"name\":\"zombieAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zombieCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"zombieNum\",\"type\":\"uint256\"}],\"name\":\"zombieLatestStakedNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506000805460ff19908116600117909155600b805490911690556154d5806100396000396000f3fe60806040526004361061030c5760003560e01c80637427be511161019c578063d01e6602116100e2578063e8bd492211610090578063e8bd492214610a22578063edfd03ed14610a8b578063ef40a67014610ab5578063f31d863f14610ae8578063f33e1fac14610bc6578063f51de41b14610bf0578063f8d1f19414610c05578063fa7803e614610c2f5761030c565b8063d01e66021461097a578063d735e21d146109a4578063d7445bc8146109b9578063d93fe9c4146109ce578063dc72a33b146109e3578063dff69787146109f8578063e4781e1014610a0d5761030c565b806381fbc98a1161014a57806381fbc98a146108785780638640ce5f146108ab5780638da5cb5b146108c057806391c657e8146108d55780639e8a713f14610908578063a8929e0b1461091d578063c4d66de814610932578063ce11e6ab146109655761030c565b80637427be51146107ac57806376e7e23b146107df578063771b2f97146107f45780637ba9534a146108095780637e2d21551461081e5780637f4320ce1461084e5780637f60abbb146108635761030c565b80634f0f4aa91161026157806362a82d7d1161020f57806362a82d7d1461069257806363721d6b146106bc57806365f7f80d146106d157806367425daf146106e657806369fd251c146106fb5780636b94c33b1461072e5780636f791d29146107615780636f7d0026146107765761030c565b80634f0f4aa9146105d957806351ed6a30146106035780635c975abb146106185780635dbaf68b1461062d5780635e8ef106146106425780635f576db6146106575780636177fd181461065f5761030c565b80633e96576e116102be5780633e96576e1461044e5780633fe3862714610481578063414f23fe1461051e57806345c5b2c71461054e57806345e38b6414610574578063488ed1a9146105895780634d26732d146105c45761030c565b806304a28064146103115780631e83d30f146103565780632b2af0ab146103825780632e7acfa6146103ac5780632f30cabd146103c1578063313a04fa146103f45780633e55c0c71461041d575b600080fd5b34801561031d57600080fd5b506103446004803603602081101561033457600080fd5b50356001600160a01b0316610c6a565b60408051918252519081900360200190f35b34801561036257600080fd5b506103806004803603602081101561037957600080fd5b5035610d2b565b005b34801561038e57600080fd5b50610380600480360360208110156103a557600080fd5b5035610df7565b3480156103b857600080fd5b50610344610e93565b3480156103cd57600080fd5b50610344600480360360208110156103e457600080fd5b50356001600160a01b0316610e99565b34801561040057600080fd5b50610409610eb4565b604080519115158252519081900360200190f35b34801561042957600080fd5b50610432610ebd565b604080516001600160a01b039092168252519081900360200190f35b34801561045a57600080fd5b506103446004803603602081101561047157600080fd5b50356001600160a01b0316610ecc565b34801561048d57600080fd5b5061038060048036036102408110156104a557600080fd5b813591602081019160e08201916101e08101359161020082013591908101906102408101610220820135600160201b8111156104e057600080fd5b8201836020820111156104f257600080fd5b803590602001918460018302840111600160201b8311171561051357600080fd5b509092509050610eea565b34801561052a57600080fd5b506103806004803603604081101561054157600080fd5b508035906020013561135e565b6103806004803603602081101561056457600080fd5b50356001600160a01b03166115bd565b34801561058057600080fd5b50610344611663565b34801561059557600080fd5b5061038060048036036101408110156105ad57600080fd5b50604081016080820160c083016101008401611669565b3480156105d057600080fd5b50610344611f92565b3480156105e557600080fd5b50610432600480360360208110156105fc57600080fd5b5035611fb7565b34801561060f57600080fd5b50610432611fd2565b34801561062457600080fd5b50610409611fe1565b34801561063957600080fd5b50610432611fea565b34801561064e57600080fd5b50610344611ff9565b610380611fff565b34801561066b57600080fd5b506104096004803603602081101561068257600080fd5b50356001600160a01b03166120a6565b34801561069e57600080fd5b50610432600480360360208110156106b557600080fd5b50356120ce565b3480156106c857600080fd5b506103446120f8565b3480156106dd57600080fd5b506103446120fe565b3480156106f257600080fd5b50610380612104565b34801561070757600080fd5b506104326004803603602081101561071e57600080fd5b50356001600160a01b031661216e565b34801561073a57600080fd5b506103806004803603602081101561075157600080fd5b50356001600160a01b031661218f565b34801561076d57600080fd5b506104096125e3565b34801561078257600080fd5b506103446004803603606081101561079957600080fd5b50803590602081013590604001356125ec565b3480156107b857600080fd5b50610380600480360360208110156107cf57600080fd5b50356001600160a01b0316612603565b3480156107eb57600080fd5b5061034461270e565b34801561080057600080fd5b50610344612714565b34801561081557600080fd5b5061034461271a565b34801561082a57600080fd5b506103806004803603604081101561084157600080fd5b5080359060200135612720565b34801561085a57600080fd5b5061034461295d565b34801561086f57600080fd5b50610344612963565b34801561088457600080fd5b506103446004803603602081101561089b57600080fd5b50356001600160a01b0316612969565b3480156108b757600080fd5b50610344612a5c565b3480156108cc57600080fd5b50610432612a62565b3480156108e157600080fd5b50610409600480360360208110156108f857600080fd5b50356001600160a01b0316612a71565b34801561091457600080fd5b50610432612acb565b34801561092957600080fd5b50610344612ada565b34801561093e57600080fd5b506103806004803603602081101561095557600080fd5b50356001600160a01b0316612ae0565b34801561097157600080fd5b50610432612b2f565b34801561098657600080fd5b506104326004803603602081101561099d57600080fd5b5035612b3e565b3480156109b057600080fd5b50610344612b6d565b3480156109c557600080fd5b50610344612b73565b3480156109da57600080fd5b50610432612b79565b3480156109ef57600080fd5b50610344612b88565b348015610a0457600080fd5b50610344612b8e565b348015610a1957600080fd5b50610344612b94565b348015610a2e57600080fd5b50610a5560048036036020811015610a4557600080fd5b50356001600160a01b0316612b9a565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b348015610a9757600080fd5b5061038060048036036020811015610aae57600080fd5b5035612bd6565b348015610ac157600080fd5b5061034460048036036020811015610ad857600080fd5b50356001600160a01b0316612ce3565b348015610af457600080fd5b50610380600480360360c0811015610b0b57600080fd5b81359190810190604081016020820135600160201b811115610b2c57600080fd5b820183602082011115610b3e57600080fd5b803590602001918460018302840111600160201b83111715610b5f57600080fd5b919390929091602081019035600160201b811115610b7c57600080fd5b820183602082011115610b8e57600080fd5b803590602001918460208302840111600160201b83111715610baf57600080fd5b919350915080359060208101359060400135612d01565b348015610bd257600080fd5b5061034460048036036020811015610be957600080fd5b5035613065565b348015610bfc57600080fd5b5061043261308d565b348015610c1157600080fd5b5061034460048036036020811015610c2857600080fd5b503561309c565b348015610c3b57600080fd5b5061038060048036036040811015610c5257600080fd5b506001600160a01b03813581169160200135166130ae565b600080610c756120f8565b90506000805b82811015610d2157846001600160a01b0316639168ae72610c9b83612b3e565b6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610ce157600080fd5b505afa158015610cf5573d6000803e3d6000fd5b505050506040513d6020811015610d0b57600080fd5b505115610d19576001909101905b600101610c7b565b509150505b919050565b336000908152601d602052604090205460ff16610d7f576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b610d87611fe1565b15610dc7576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b610dd033613162565b6000610dda611f92565b905080821015610de8578091505b610df233836131f9565b505050565b610dff612b6d565b811015610e45576040805162461bcd60e51b815260206004820152600f60248201526e1053149150511657d11150d2511151608a1b604482015290519081900360640190fd5b610e4d61271a565b811115610e90576040805162461bcd60e51b815260206004820152600c60248201526b1113d154d39517d1561254d560a21b604482015290519081900360640190fd5b50565b600c5481565b6001600160a01b03166000908152600a602052604090205490565b601e5443101590565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b336000908152601d602052604090205460ff16610f3e576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b610f46611fe1565b15610f86576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b610f8f336120a6565b610fcd576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b610fd5615351565b60408051808201909152611108908860026000835b8282101561102b5760408051606081810190925290808402860190600390839083908082843760009201919091525050508152600190910190602001610fea565b505060408051808201909152915089905060026000835b828210156110835760408051608081810190925290808402860190600490839083908082843760009201919091525050508152600190910190602001611042565b505050508787601160009054906101000a90046001600160a01b03166001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b1580156110d757600080fd5b505afa1580156110eb573d6000803e3d6000fd5b505050506040513d602081101561110157600080fd5b50516132bf565b805160e0015190915060009061112590439063ffffffff61330d16565b905060185481101561116b576040805162461bcd60e51b815260206004820152600a60248201526954494d455f44454c544160b01b604482015290519081900360640190fd5b60006111768361336a565b9050826000015161010001518360200151604001511015806111ab5750600e546111a790839063ffffffff61338616565b8110155b806111d7575082516060908101516020850151909101516064916111d5919063ffffffff61330d16565b145b611214576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d350531360ba1b604482015290519081900360640190fd5b8251606090810151602085015190910151606491611238919063ffffffff61330d16565b111561127c576040805162461bcd60e51b815260206004820152600e60248201526d544f4f5f4d414e595f53454e445360901b604482015290519081900360640190fd5b6112a26004611296600e548561338690919063ffffffff16565b9063ffffffff61338616565b8111156112e2576040805162461bcd60e51b8152602060048201526009602482015268544f4f5f4c4152474560b81b604482015290519081900360640190fd5b505061133f81888886866040518060c0016040528061130033610ecc565b8152600c546020820152600e5460408201526011546001600160a01b039081166060830152601354811660808301526015541660a0909101528e6133df565b506113543361134c61271a565b600c54613a99565b5050505050505050565b336000908152601d602052604090205460ff166113b2576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6113ba611fe1565b156113fa576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b611403336120a6565b611441576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b8061144b8361309c565b1461148a576040805162461bcd60e51b815260206004820152600a6024820152694e4f44455f52454f524760b01b604482015290519081900360640190fd5b611492612b6d565b82101580156114a857506114a461271a565b8211155b6114f1576040805162461bcd60e51b81526020600482015260156024820152744e4f44455f4e554d5f4f55545f4f465f52414e474560581b604482015290519081900360640190fd5b60006114fc83611fb7565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561153757600080fd5b505afa15801561154b573d6000803e3d6000fd5b505050506040513d602081101561156157600080fd5b505161156c33610ecc565b146115b0576040805162461bcd60e51b815260206004820152600f60248201526e2727aa2fa9aa20a5a2a22fa82922ab60891b604482015290519081900360640190fd5b610df23384600c54613a99565b336000908152601d602052604090205460ff16611611576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b611619611fe1565b15611659576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b610e908134613c32565b60185481565b336000908152601d602052604090205460ff166116bd576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6116c5611fe1565b15611705576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b602084013584351061174c576040805162461bcd60e51b815260206004820152600b60248201526a2ba927a723afa7a92222a960a91b604482015290519081900360640190fd5b61175461271a565b6020850135111561179b576040805162461bcd60e51b815260206004820152600c60248201526b1393d517d41493d413d4d15160a21b604482015290519081900360640190fd5b83356117a56120fe565b106117eb576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d0d3d3919254935151607a1b604482015290519081900360640190fd5b60006117fd85825b6020020135611fb7565b9050600061180c8660016117f3565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561184757600080fd5b505afa15801561185b573d6000803e3d6000fd5b505050506040513d602081101561187157600080fd5b5051604080516311e7249560e21b815290516001600160a01b0385169163479c9254916004808301926020929190829003018186803b1580156118b357600080fd5b505afa1580156118c7573d6000803e3d6000fd5b505050506040513d60208110156118dd57600080fd5b50511461191d576040805162461bcd60e51b81526020600482015260096024820152682224a3232fa82922ab60b91b604482015290519081900360640190fd5b6119378760005b60200201356001600160a01b0316613162565b611942876001611924565b604080516348b4573960e11b81526001600160a01b03893581166004830152915191841691639168ae7291602480820192602092909190829003018186803b15801561198d57600080fd5b505afa1580156119a1573d6000803e3d6000fd5b505050506040513d60208110156119b757600080fd5b50516119ff576040805162461bcd60e51b815260206004820152601260248201527114d51052d1548c57d393d517d4d51052d15160721b604482015290519081900360640190fd5b604080516348b4573960e11b81526001600160a01b0360208a81013582166004840152925190841692639168ae729260248082019391829003018186803b158015611a4957600080fd5b505afa158015611a5d573d6000803e3d6000fd5b505050506040513d6020811015611a7357600080fd5b5051611abb576040805162461bcd60e51b815260206004820152601260248201527114d51052d1548c97d393d517d4d51052d15160721b604482015290519081900360640190fd5b611ad0853585358560005b6020020135613ce1565b826001600160a01b0316635b8b22806040518163ffffffff1660e01b815260040160206040518083038186803b158015611b0957600080fd5b505afa158015611b1d573d6000803e3d6000fd5b505050506040513d6020811015611b3357600080fd5b505114611b74576040805162461bcd60e51b815260206004820152600a6024820152694348414c5f484153483160b01b604482015290519081900360640190fd5b611b8960208087013590860135856001611ac6565b816001600160a01b0316635b8b22806040518163ffffffff1660e01b815260040160206040518083038186803b158015611bc257600080fd5b505afa158015611bd6573d6000803e3d6000fd5b505050506040513d6020811015611bec57600080fd5b505114611c2d576040805162461bcd60e51b815260206004820152600a60248201526921a420a62fa420a9a41960b11b604482015290519081900360640190fd5b6000611da7611cca600d54611cbe88600060028110611c4857fe5b6020020135876001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8657600080fd5b505afa158015611c9a573d6000803e3d6000fd5b505050506040513d6020811015611cb057600080fd5b50519063ffffffff61330d16565b9063ffffffff613d1816565b611d37856001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0657600080fd5b505afa158015611d1a573d6000803e3d6000fd5b505050506040513d6020811015611d3057600080fd5b5051611fb7565b6001600160a01b031663d7ff5e356040518163ffffffff1660e01b815260040160206040518083038186803b158015611d6f57600080fd5b505afa158015611d83573d6000803e3d6000fd5b505050506040513d6020811015611d9957600080fd5b50519063ffffffff613d1816565b90506020850135811015611de157611dd96001600160a01b0389351689600160200201356001600160a01b0316613d72565b505050611f8b565b6014546000906001600160a01b0390811690638ecaab119030908a35908935908e35168e600160200201356001600160a01b0316611e398d600060028110611e2557fe5b60200201358a61330d90919063ffffffff16565b611e538e600160200201358b61330d90919063ffffffff16565b601154601054604080516001600160e01b031960e08d901b1681526001600160a01b039a8b166004820152602481019990995260448901979097529488166064880152928716608487015260a486019190915260c4850152841660e484015290921661010482015290516101248083019260209291908290030181600087803b158015611edf57600080fd5b505af1158015611ef3573d6000803e3d6000fd5b505050506040513d6020811015611f0957600080fd5b50519050611f326001600160a01b038a35168a600160200201356001600160a01b031683613df9565b604080516001600160a01b038b35811682526020808d01358216908301528a35828401529151918316917fa5256d19d4ddaf646f4b5c1861b8d4c08238e6356b8ae36dcc49ac67fda758799181900360600190a2505050505b5050505050565b600080611f9d612b6d565b9050611fb14382611fac61271a565b613e43565b91505090565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b600b5460ff1690565b6014546001600160a01b031681565b600e5490565b336000908152601d602052604090205460ff16612053576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61205b611fe1565b1561209b576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6120a4346140fa565b565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b6000600782815481106120dd57fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b600061210e612b6d565b90506121186120fe565b8111801561212d575061212961271a565b8111155b610e90576040805162461bcd60e51b815260206004820152600d60248201526c1393d7d553949154d3d3159151609a1b604482015290519081900360640190fd5b6001600160a01b039081166000908152600860205260409020600301541690565b336000908152601d602052604090205460ff166121e3576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6121eb611fe1565b1561222b576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b612233612104565b600061223d6120fe565b90506000612249612b6d565b9050600061225682611fb7565b905082816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561229257600080fd5b505afa1580156122a6573d6000803e3d6000fd5b505050506040513d60208110156122bc57600080fd5b50511415612545576122cd846120a6565b61230b576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b61231c61231785610ecc565b610df7565b806001600160a01b0316639168ae72856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561237257600080fd5b505afa158015612386573d6000803e3d6000fd5b505050506040513d602081101561239c57600080fd5b5051156123e3576040805162461bcd60e51b815260206004820152601060248201526f14d51052d15117d3d397d5105491d15560821b604482015290519081900360640190fd5b806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b15801561241c57600080fd5b505afa158015612430573d6000803e3d6000fd5b5050505061243d83611fb7565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b15801561247557600080fd5b505afa158015612489573d6000803e3d6000fd5b505050506124976000612bd6565b6124a081610c6a565b816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b1580156124d957600080fd5b505afa1580156124ed573d6000803e3d6000fd5b505050506040513d602081101561250357600080fd5b505114612545576040805162461bcd60e51b815260206004820152600b60248201526a4841535f5354414b45525360a81b604482015290519081900360640190fd5b61254d614306565b60135460408051630c2a09ad60e21b81526004810185905290516001600160a01b03909216916330a826b49160248082019260009290919082900301818387803b15801561259a57600080fd5b505af11580156125ae573d6000803e3d6000fd5b50506040518492507f9f7eee12f08e41a1d1a617e76576aa2d6a1e06dbdd72d817e62b6e8dfdebe2a39150600090a250505050565b60005460ff1690565b60006125f9848484613e43565b90505b9392505050565b336000908152601d602052604090205460ff16612657576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61265f610eb4565b6126ab5761266b611fe1565b156126ab576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6126b36120fe565b6126bc82610ecc565b11156126fc576040805162461bcd60e51b815260206004820152600a6024820152691513d3d7d49150d1539560b21b604482015290519081900360640190fd5b61270581613162565b610e908161431c565b600f5481565b600d5481565b60035490565b336000908152601d602052604090205460ff16612774576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61277c611fe1565b156127bc576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6127c46120f8565b821115612809576040805162461bcd60e51b815260206004820152600e60248201526d4e4f5f535543485f5a4f4d42494560901b604482015290519081900360640190fd5b600061281483612b3e565b9050600061282184613065565b905060008061282e612b6d565b90505b80831015801561284057508482105b1561293557600061285084611fb7565b9050806001600160a01b03166396a9fdc0866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b1580156128aa57600080fd5b505af11580156128be573d6000803e3d6000fd5b50505050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156128fb57600080fd5b505afa15801561290f573d6000803e3d6000fd5b505050506040513d602081101561292557600080fd5b5051935050600190910190612831565b8083101561294b5761294686614382565b612955565b612955868461441e565b505050505050565b601a5481565b601e5481565b336000908152601d602052604081205460ff166129bd576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6129c5610eb4565b612a11576129d1611fe1565b15612a11576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6000612a1c33614445565b6040519091506001600160a01b0384169082156108fc029083906000818181858888f19350505050158015612a55573d6000803e3d6000fd5b5092915050565b60045490565b6016546001600160a01b031681565b6000805b600954811015612ac25760098181548110612a8c57fe5b60009182526020909120600290910201546001600160a01b0384811691161415612aba576001915050610d26565b600101612a75565b50600092915050565b6013546001600160a01b031681565b61a4b190565b6001600160a01b03811615610e90576040805162461bcd60e51b815260206004820152601060248201526f1393d7d513d2d15397d0531313d5d15160821b604482015290519081900360640190fd5b6012546001600160a01b031681565b600060098281548110612b4d57fe5b60009182526020909120600290910201546001600160a01b031692915050565b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b336000908152601d602052604090205460ff16612c2a576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612c32610eb4565b612c7e57612c3e611fe1565b15612c7e576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6000612c886120f8565b90506000612c94612b6d565b9050825b82811015612cdd575b81612cab82613065565b1015612cd557612cba81614382565b60001990920191828110612cd057505050610e90565b612ca1565b600101612c98565b50505050565b6001600160a01b031660009081526008602052604090206002015490565b336000908152601d602052604090205460ff16612d55576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612d5d610eb4565b612da957612d69611fe1565b15612da9576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b612db1612104565b6000612dbb612b8e565b11612dfa576040805162461bcd60e51b815260206004820152600a6024820152694e4f5f5354414b45525360b01b604482015290519081900360640190fd5b6000612e0c612e07612b6d565b611fb7565b9050806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b158015612e4757600080fd5b505afa158015612e5b573d6000803e3d6000fd5b50505050612e6a612e076120fe565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b158015612ea257600080fd5b505afa158015612eb6573d6000803e3d6000fd5b50505050612ec26120fe565b816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015612efb57600080fd5b505afa158015612f0f573d6000803e3d6000fd5b505050506040513d6020811015612f2557600080fd5b505114612f68576040805162461bcd60e51b815260206004820152600c60248201526b24a72b20a624a22fa82922ab60a11b604482015290519081900360640190fd5b612f726000612bd6565b612f86612f7e82610c6a565b611cbe612b8e565b816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b158015612fbf57600080fd5b505afa158015612fd3573d6000803e3d6000fd5b505050506040513d6020811015612fe957600080fd5b50511461302e576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d0531317d4d51052d15160921b604482015290519081900360640190fd5b60125460135461305a918b918b918b918b918b918b918b918b916001600160a01b0390811691166144a8565b505050505050505050565b60006009828154811061307457fe5b9060005260206000209060020201600101549050919050565b6010546001600160a01b031681565b60009081526006602052604090205490565b6130b6611fe1565b156130f6576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b61310082826144c9565b6001600160a01b0316336001600160a01b031614613154576040805162461bcd60e51b815260206004820152600c60248201526b2ba927a723afa9a2a72222a960a11b604482015290519081900360640190fd5b61315e8282613d72565b5050565b61316b816120a6565b6131a9576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b60006131b48261216e565b6001600160a01b031614610e90576040805162461bcd60e51b8152602060048201526007602482015266125397d0d2105360ca1b604482015290519081900360640190fd5b6001600160a01b038216600090815260086020526040812060028101548084111561325e576040805162461bcd60e51b815260206004820152601060248201526f544f4f5f4c4954544c455f5354414b4560801b604482015290519081900360640190fd5b6000613270828663ffffffff61330d16565b600284018690559050613283868261458f565b604080518381526020810187905281516001600160a01b0389169260008051602061543f833981519152928290030190a2925050505b92915050565b6132c7615351565b604080518082019091528651865182916132e291888861461a565b815260200161330188600160200201518860016020020151438761461a565b90529695505050505050565b600082821115613364576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8051516020820151516000916132b9919063ffffffff61330d16565b600082613395575060006132b9565b828202828482816133a257fe5b04146125fc5760405162461bcd60e51b815260040180806020018281038252602181526020018061545f6021913960400191505060405180910390fd5b60006133e9615376565b6133f28961336a565b60e0820152835161340290611fb7565b81606001906001600160a01b031690816001600160a01b03168152505083606001516001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b15801561345c57600080fd5b505afa158015613470573d6000803e3d6000fd5b505050506040513d602081101561348657600080fd5b5051815260608101516040805163380ed4c760e11b815290516001600160a01b039092169163701da98e91600480820192602092909190829003018186803b1580156134d157600080fd5b505afa1580156134e5573d6000803e3d6000fd5b505050506040513d60208110156134fb57600080fd5b50518951613508906146b8565b1461354c576040805162461bcd60e51b815260206004820152600f60248201526e0a0a48aacbea6a882a88abe9082a69608b1b604482015290519081900360640190fd5b805160208a015160400151111561359b576040805162461bcd60e51b815260206004820152600e60248201526d12539093d617d41054d517d1539160921b604482015290519081900360640190fd5b83606001516001600160a01b031663dc1b7b1f87878c60200151604001516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604080518083038186803b15801561361e57600080fd5b505afa158015613632573d6000803e3d6000fd5b505050506040513d604081101561364857600080fd5b5080516020909101516101208301526101008201526136668961474d565b81604001818152505061368b84604001518260e001518660200151846060015161477e565b8160c0018181525050600081606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136d357600080fd5b505afa1580156136e7573d6000803e3d6000fd5b505050506040513d60208110156136fd57600080fd5b50511160a08201819052156137875761377d81606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561374c57600080fd5b505afa158015613760573d6000803e3d6000fd5b505050506040513d602081101561377657600080fd5b505161309c565b6080820152613798565b83516137929061309c565b60808201525b8360a001516001600160a01b031663d45ab2b56137b88b602001516146b8565b6137c78c8560400151436148ec565b6137d08d614901565b88600001518660c001516040518663ffffffff1660e01b81526004018086815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561382c57600080fd5b505af1158015613840573d6000803e3d6000fd5b505050506040513d602081101561385657600080fd5b50516001600160a01b03166020820152600061387061271a565b600101905081606001516001600160a01b0316631bc09d0a826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156138bf57600080fd5b505af11580156138d3573d6000803e3d6000fd5b505050506138f48260a0015183608001518460400151856101200151614931565b9250838314613941576040805162461bcd60e51b81526020600482015260146024820152730aa9c8ab0a08a86a88a88be9c9e888abe9082a6960631b604482015290519081900360640190fd5b61394f826020015184614998565b6080850151855160c084015160408051638b8ca19960e01b81526004810186905260248101939093526044830191909152336064830152516001600160a01b0390921691638b8ca1999160848082019260009290919082900301818387803b1580156139ba57600080fd5b505af11580156139ce573d6000803e3d6000fd5b50505050506139e0846000015161309c565b6139e861271a565b7f8016306209aff73e79f274cf38a41928996f746e2953111902e1f55be1713a5484846040015185600001518661010001518761012001518f8f6040518088815260200187815260200186815260200185815260200184815260200183600260600280828437600083820152601f01601f191690910190508261010080828437600083820152604051601f909101601f1916909201829003995090975050505050505050a350979650505050505050565b6001600160a01b0380841660008181526008602090815260408083208784526005835281842054825163123334b760e11b815260048101969096529151909591909116938492632466696e9260248084019382900301818787803b158015613b0057600080fd5b505af1158015613b14573d6000803e3d6000fd5b505050506040513d6020811015613b2a57600080fd5b5051600180850187905590915081141561295557600060056000846001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015613b7d57600080fd5b505afa158015613b91573d6000803e3d6000fd5b505050506040513d6020811015613ba757600080fd5b505181526020810191909152604001600020546001600160a01b0316905080636971dfe5613bdb438863ffffffff613d1816565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015613c1157600080fd5b505af1158015613c25573d6000803e3d6000fd5b5050505050505050505050565b336000908152601d602052604090205460ff16613c86576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b613c8e611fe1565b15613cce576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b613cd782613162565b61315e82826149e2565b6040805160208082019590955280820193909352606080840192909252805180840390920182526080909201909152805191012090565b6000828201838110156125fc576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000613d7d82612ce3565b90506000613d8a84612ce3565b905080821115613db157613dae613da184836131f9565b839063ffffffff61330d16565b91505b60028204613dbf85826149e2565b613dcf838263ffffffff61330d16565b9250613dda85614a56565b601654613df0906001600160a01b03168461458f565b611f8b84614a80565b6001600160a01b03928316600090815260086020526040808220600390810180549487166001600160a01b0319958616811790915594909516825290209092018054909216179055565b600081600184031415613e595750600f546125fc565b6000613e6484611fb7565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e9c57600080fd5b505afa158015613eb0573d6000803e3d6000fd5b505050506040513d6020811015613ec657600080fd5b5051905080851015613edc575050600f546125fc565b613ee46153ca565b506040805161014081018252600181526201e05b60208201526201f7d191810191909152620138916060820152620329e160808201526201be4360a08201526204cb8c60c08201526201fbc460e082015262036d3261010082015262027973610120820152613f516153ca565b506040805161014081018252600181526201c03060208201526201b6999181019190915261fde26060820152620265c6608082015262013b8e60a0820152620329e160c08201526201389160e08201526201f7d1610100820152620153756101208201526000613fc7888563ffffffff61330d16565b90506000613ff1600c54613fe5600a8561338690919063ffffffff16565b9063ffffffff614b3016565b905060ff61400682600a63ffffffff614b3016565b1061401a57600019955050505050506125fc565b600061402d82600a63ffffffff614b3016565b60020a9050600085600a8406600a811061404357fe5b602002015162ffffff168202905085600a8406600a811061406057fe5b602002015162ffffff1682828161407357fe5b041461408a576000199750505050505050506125fc565b60006140b586600a8606600a811061409e57fe5b6020020151839062ffffff1663ffffffff614b3016565b9050806140c0575060015b600f5480820290829082816140d157fe5b04146140ea5760001999505050505050505050506125fc565b9c9b505050505050505050505050565b336000908152601d602052604090205460ff1661414e576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b614156611fe1565b15614196576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b61419f336120a6565b156141e2576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b604482015290519081900360640190fd5b6141eb33612a71565b15614230576040805162461bcd60e51b815260206004820152601060248201526f5354414b45525f49535f5a4f4d42494560801b604482015290519081900360640190fd5b614238611f92565b81101561427f576040805162461bcd60e51b815260206004820152601060248201526f4e4f545f454e4f5547485f5354414b4560801b604482015290519081900360640190fd5b6142893382614b97565b6013546001600160a01b031663f03c04a5336142a36120fe565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156142f257600080fd5b505af1158015611f8b573d6000803e3d6000fd5b614311600254614c90565b600280546001019055565b6001600160a01b03811660009081526008602052604090206002810154614343838261458f565b61434c83614d12565b604080518281526000602082015281516001600160a01b0386169260008051602061543f833981519152928290030190a2505050565b60098054600019810190811061439457fe5b9060005260206000209060020201600982815481106143af57fe5b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b0390921691909117815560019182015491015560098054806143f257fe5b60008281526020812060026000199093019283020180546001600160a01b031916815560010155905550565b806009838154811061442c57fe5b9060005260206000209060020201600101819055505050565b6001600160a01b0381166000818152600a60209081526040808320805490849055815181815292830184905281519394909390927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae292908290030190a292915050565b6144bd6002548b8b8b8b8b8b8b8b8b8b614e38565b50505050505050505050565b6001600160a01b03808316600090815260086020526040808220848416835290822060038201549293919290911680614533576040805162461bcd60e51b81526020600482015260076024820152661393d7d0d2105360ca1b604482015290519081900360640190fd5b60038201546001600160a01b03828116911614614586576040805162461bcd60e51b815260206004820152600c60248201526b1112519197d25397d0d2105360a21b604482015290519081900360640190fd5b95945050505050565b6001600160a01b0382166000908152600a6020526040812054906145b9828463ffffffff613d1816565b6001600160a01b0385166000818152600a60209081526040918290208490558151868152908101849052815193945091927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae29281900390910190a250505050565b6146226153e9565b60408051610120810182528551815286516020820152908101856001602002015181526020018560026004811061465557fe5b602002015181526020018560036004811061466c57fe5b602002015181526020018660016003811061468357fe5b602002015181526020018660026003811061469a57fe5b60200201518152602001848152602001838152509050949350505050565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b805180516020830151516000926132b992918290039061476c90615109565b6147798660200151615109565b61513e565b6000806147a686613fe561479982600163ffffffff61330d16565b889063ffffffff613d1816565b905061482981611cbe6147bf438863ffffffff613d1816565b866001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156147f857600080fd5b505afa15801561480c573d6000803e3d6000fd5b505050506040513d602081101561482257600080fd5b505161517c565b91506000836001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561486657600080fd5b505afa15801561487a573d6000803e3d6000fd5b505050506040513d602081101561489057600080fd5b5051905080156148e2576148df836148a783611fb7565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156147f857600080fd5b92505b5050949350505050565b60006125f98383866020015160400151613ce1565b805160a09081015160208301519182015160c083015160608401516080909401516000946132b994939291615192565b60008085614940576000614943565b60015b905080858585604051602001808560ff1660ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120915050949350505050565b60038054600101808255600090815260056020908152604080832080546001600160a01b0319166001600160a01b0397909716969096179095559154815260069091529190912055565b6001600160a01b038216600090815260086020526040812060028101549091614a11828563ffffffff613d1816565b60028401819055604080518481526020810183905281519293506001600160a01b0388169260008051602061543f833981519152929181900390910190a25050505050565b6001600160a01b0316600090815260086020526040902060030180546001600160a01b0319169055565b6001600160a01b0381811660008181526008602090815260408083208151808301909252938152600180850154928201928352600980549182018155909352517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af600290930292830180546001600160a01b031916919095161790935591517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b09092019190915561315e82614d12565b6000808211614b86576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381614b8f57fe5b049392505050565b6007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688810180546001600160a01b038087166001600160a01b031992831681179093556040805160a081018252858152865460208281019182528284018a8152600060608501818152608086018c81528a8352600885528783209651875594519b86019b909b559051600285015598516003909301805492511515600160a01b0260ff60a01b199490961692909616919091179190911692909217909255436004558151948552840185905280519293919260008051602061543f8339815191529281900390910190a2505050565b60008181526005602052604080822054815163083197ef60e41b815291516001600160a01b03909116926383197ef0926004808201939182900301818387803b158015614cdc57600080fd5b505af1158015614cf0573d6000803e3d6000fd5b50505060009182525060056020526040902080546001600160a01b0319169055565b6001600160a01b03811660009081526008602052604090208054600780546000198101908110614d3e57fe5b600091825260209091200154600780546001600160a01b039092169183908110614d6457fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806008600060078481548110614da457fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556007805480614dd457fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03949094168152600890935250506040812081815560018101829055600281019190915560030180546001600160a81b0319169055565b6000614eb98a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508d6151d9565b90506000614ec68d611fb7565b9050614ed58c83888a89615192565b816001600160a01b03166397bdc5106040518163ffffffff1660e01b815260040160206040518083038186803b158015614f0e57600080fd5b505afa158015614f22573d6000803e3d6000fd5b505050506040513d6020811015614f3857600080fd5b505114614f7b576040805162461bcd60e51b815260206004820152600c60248201526b434f4e4649524d5f4441544160a01b604482015290519081900360640190fd5b836001600160a01b0316630c7268478c8c8c8c6040518563ffffffff1660e01b81526004018080602001806020018381038352878782818152602001925080828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801561501d57600080fd5b505af1158015615031573d6000803e3d6000fd5b50505050615040600154614c90565b60018d81558d01600255604080516316b9109b60e01b8152600481018f905290516001600160a01b038516916316b9109b91602480830192600092919082900301818387803b15801561509257600080fd5b505af11580156150a6573d6000803e3d6000fd5b505050508c7f2400bd6e429cfcd98fe43a75bbbe4702c59c99d636100690130cc1ebb611c5a2838989896040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050505050505050565b60006132b98260000151615139846040015185602001518660a0015187606001518860c0015189608001516152da565b615325565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b600081831161518b57816125fc565b5090919050565b60408051602080820197909752808201959095526060850192909252608084019290925260a0808401929092528051808403909201825260c0909201909152805191012090565b81518351600091829184835b8381101561528c5760008882815181106151fb57fe5b6020026020010151905083818701111561524b576040805162461bcd60e51b815260206004820152600c60248201526b2220aa20afa7ab22a9292aa760a11b604482015290519081900360640190fd5b6020868b01810182902060408051808401969096528581019190915280518086038201815260609095019052835193019290922091909401936001016151e5565b508184146152cf576040805162461bcd60e51b815260206004820152600b60248201526a08882a882be988a9c8ea8960ab1b604482015290519081900360640190fd5b979650505050505050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60405180604001604052806153646153e9565b81526020016153716153e9565b905290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101400160405280600a906020820280368337509192915050565b604051806101200160405280600081526020016000801916815260200160008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152509056feebd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775061757361626c653a2070617573656400000000000000000000000000000000a26469706673582212208c3d38675521346566e8f28939516bbd5f14bb6d5eb606cf9443f07198e6875464736f6c634300060b0033", } // RollupUserFacetABI is the input ABI used to generate the binding from. @@ -850,6 +850,37 @@ func (_RollupUserFacet *RollupUserFacetCallerSession) IsMaster() (bool, error) { return _RollupUserFacet.Contract.IsMaster(&_RollupUserFacet.CallOpts) } +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_RollupUserFacet *RollupUserFacetCaller) IsNitroReady(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _RollupUserFacet.contract.Call(opts, &out, "isNitroReady") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_RollupUserFacet *RollupUserFacetSession) IsNitroReady() (*big.Int, error) { + return _RollupUserFacet.Contract.IsNitroReady(&_RollupUserFacet.CallOpts) +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_RollupUserFacet *RollupUserFacetCallerSession) IsNitroReady() (*big.Int, error) { + return _RollupUserFacet.Contract.IsNitroReady(&_RollupUserFacet.CallOpts) +} + // IsStaked is a free data retrieval call binding the contract method 0x6177fd18. // // Solidity: function isStaked(address staker) view returns(bool) @@ -1342,6 +1373,68 @@ func (_RollupUserFacet *RollupUserFacetCallerSession) SequencerBridge() (common. return _RollupUserFacet.Contract.SequencerBridge(&_RollupUserFacet.CallOpts) } +// ShutdownForNitroBlock is a free data retrieval call binding the contract method 0x7f60abbb. +// +// Solidity: function shutdownForNitroBlock() view returns(uint256) +func (_RollupUserFacet *RollupUserFacetCaller) ShutdownForNitroBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _RollupUserFacet.contract.Call(opts, &out, "shutdownForNitroBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ShutdownForNitroBlock is a free data retrieval call binding the contract method 0x7f60abbb. +// +// Solidity: function shutdownForNitroBlock() view returns(uint256) +func (_RollupUserFacet *RollupUserFacetSession) ShutdownForNitroBlock() (*big.Int, error) { + return _RollupUserFacet.Contract.ShutdownForNitroBlock(&_RollupUserFacet.CallOpts) +} + +// ShutdownForNitroBlock is a free data retrieval call binding the contract method 0x7f60abbb. +// +// Solidity: function shutdownForNitroBlock() view returns(uint256) +func (_RollupUserFacet *RollupUserFacetCallerSession) ShutdownForNitroBlock() (*big.Int, error) { + return _RollupUserFacet.Contract.ShutdownForNitroBlock(&_RollupUserFacet.CallOpts) +} + +// ShutdownForNitroMode is a free data retrieval call binding the contract method 0x313a04fa. +// +// Solidity: function shutdownForNitroMode() view returns(bool) +func (_RollupUserFacet *RollupUserFacetCaller) ShutdownForNitroMode(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _RollupUserFacet.contract.Call(opts, &out, "shutdownForNitroMode") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// ShutdownForNitroMode is a free data retrieval call binding the contract method 0x313a04fa. +// +// Solidity: function shutdownForNitroMode() view returns(bool) +func (_RollupUserFacet *RollupUserFacetSession) ShutdownForNitroMode() (bool, error) { + return _RollupUserFacet.Contract.ShutdownForNitroMode(&_RollupUserFacet.CallOpts) +} + +// ShutdownForNitroMode is a free data retrieval call binding the contract method 0x313a04fa. +// +// Solidity: function shutdownForNitroMode() view returns(bool) +func (_RollupUserFacet *RollupUserFacetCallerSession) ShutdownForNitroMode() (bool, error) { + return _RollupUserFacet.Contract.ShutdownForNitroMode(&_RollupUserFacet.CallOpts) +} + // StakeToken is a free data retrieval call binding the contract method 0x51ed6a30. // // Solidity: function stakeToken() view returns(address) diff --git a/packages/arb-util/ethbridgecontracts/SequencerInbox.go b/packages/arb-util/ethbridgecontracts/SequencerInbox.go index 3f61b23cbb..a75fd86fa0 100755 --- a/packages/arb-util/ethbridgecontracts/SequencerInbox.go +++ b/packages/arb-util/ethbridgecontracts/SequencerInbox.go @@ -30,8 +30,8 @@ var ( // SequencerInboxMetaData contains all meta data concerning the SequencerInbox contract. var SequencerInboxMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"firstMessageNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"beforeAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMessageCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalDelayedMessagesRead\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32[2]\",\"name\":\"afterAccAndDelayed\",\"type\":\"bytes32[2]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seqBatchIndex\",\"type\":\"uint256\"}],\"name\":\"DelayedInboxForced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isSequencer\",\"type\":\"bool\"}],\"name\":\"IsSequencerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxDelayBlocks\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxDelaySeconds\",\"type\":\"uint256\"}],\"name\":\"MaxDelayUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"firstMessageNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"beforeAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMessageCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"lengths\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"sectionsMetadata\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seqBatchIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sequencer\",\"type\":\"address\"}],\"name\":\"SequencerBatchDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"firstMessageNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"beforeAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMessageCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seqBatchIndex\",\"type\":\"uint256\"}],\"name\":\"SequencerBatchDeliveredFromOrigin\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"lengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sectionsMetadata\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"}],\"name\":\"addSequencerL2Batch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"lengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sectionsMetadata\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"}],\"name\":\"addSequencerL2BatchFromOrigin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"lengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sectionsMetadata\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"},{\"internalType\":\"contractIGasRefunder\",\"name\":\"gasRefunder\",\"type\":\"address\"}],\"name\":\"addSequencerL2BatchFromOriginWithGasRefunder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedInbox\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalDelayedMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"uint256[2]\",\"name\":\"l1BlockAndTimestamp\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"inboxSeqNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceL1\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"messageDataHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"delayedAcc\",\"type\":\"bytes32\"}],\"name\":\"forceInclusion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getInboxAccsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inboxAccs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"_delayedInbox\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sequencer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rollup\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isSequencer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDelayBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDelaySeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"postUpgradeInit\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_messageCount\",\"type\":\"uint256\"}],\"name\":\"proveBatchContainsSequenceNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_messageCount\",\"type\":\"uint256\"}],\"name\":\"proveInboxContainsMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"newIsSequencer\",\"type\":\"bool\"}],\"name\":\"setIsSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxDelayBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newMaxDelaySeconds\",\"type\":\"uint256\"}],\"name\":\"setMaxDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalDelayedMessagesRead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506000805460ff19166001179055611e208061002d6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80636f791d29116100b8578063c0c53b8b1161007c578063c0c53b8b14610643578063cb23bcb51461067b578063d9b141ff14610683578063d9dd67ab1461068b578063dc1b7b1f1461013c578063e367a2c1146106a857610137565b80636f791d29146105065780637fa3a40e1461050e5780638a2df18d1461051657806395fcea7814610633578063b71939b11461063b57610137565b80633dbcc8d1116100ff5780633dbcc8d11461036f57806344c7cc30146103775780634d480faa146104855780635c1bba38146104a85780636d46e987146104cc57610137565b806306cc91b21461013c5780630c4a1e59146101c35780631a734229146102195780631f95663214610327578063342025fa14610355575b600080fd5b6101aa6004803603604081101561015257600080fd5b810190602081018135600160201b81111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111600160201b8311171561019f57600080fd5b9193509150356106b0565b6040805192835260208301919091528051918290030190f35b61021760048036036101208110156101da57600080fd5b5080359060ff60208201351690604081019060808101359060a0810135906001600160a01b0360c0820135169060e08101359061010001356106cb565b005b6102176004803603608081101561022f57600080fd5b810190602081018135600160201b81111561024957600080fd5b82018360208201111561025b57600080fd5b803590602001918460018302840111600160201b8311171561027c57600080fd5b919390929091602081019035600160201b81111561029957600080fd5b8201836020820111156102ab57600080fd5b803590602001918460208302840111600160201b831117156102cc57600080fd5b919390929091602081019035600160201b8111156102e957600080fd5b8201836020820111156102fb57600080fd5b803590602001918460208302840111600160201b8311171561031c57600080fd5b919350915035610a37565b6102176004803603604081101561033d57600080fd5b506001600160a01b0381351690602001351515610b90565b61035d610c41565b60408051918252519081900360200190f35b61035d610c47565b6102176004803603608081101561038d57600080fd5b810190602081018135600160201b8111156103a757600080fd5b8201836020820111156103b957600080fd5b803590602001918460018302840111600160201b831117156103da57600080fd5b919390929091602081019035600160201b8111156103f757600080fd5b82018360208201111561040957600080fd5b803590602001918460208302840111600160201b8311171561042a57600080fd5b919390929091602081019035600160201b81111561044757600080fd5b82018360208201111561045957600080fd5b803590602001918460208302840111600160201b8311171561047a57600080fd5b919350915035610c4d565b6102176004803603604081101561049b57600080fd5b5080359060200135610d3a565b6104b0610dd0565b604080516001600160a01b039092168252519081900360200190f35b6104f2600480360360208110156104e257600080fd5b50356001600160a01b0316610ddf565b604080519115158252519081900360200190f35b6104f2610df4565b61035d610dfd565b610217600480360360a081101561052c57600080fd5b810190602081018135600160201b81111561054657600080fd5b82018360208201111561055857600080fd5b803590602001918460018302840111600160201b8311171561057957600080fd5b919390929091602081019035600160201b81111561059657600080fd5b8201836020820111156105a857600080fd5b803590602001918460208302840111600160201b831117156105c957600080fd5b919390929091602081019035600160201b8111156105e657600080fd5b8201836020820111156105f857600080fd5b803590602001918460208302840111600160201b8311171561061957600080fd5b9193509150803590602001356001600160a01b0316610e03565b610217610f9d565b6104b0610ffa565b6102176004803603606081101561065957600080fd5b506001600160a01b038135811691602081013582169160409091013516611009565b6104b06110a0565b61035d6110af565b61035d600480360360208110156106a157600080fd5b50356110b5565b61035d6110d3565b6000806106be8585856110d9565b915091505b935093915050565b6003548811610715576040805162461bcd60e51b815260206004820152601160248201527044454c415945445f4241434b574152445360781b604482015290519081900360640190fd5b600061072b8885893560208b01358a8a89611226565b6008549091504388359091011061077c576040805162461bcd60e51b815260206004820152601060248201526f4d41585f44454c41595f424c4f434b5360801b604482015290519081900360640190fd5b600954426020890135909101106107cb576040805162461bcd60e51b815260206004820152600e60248201526d4d41585f44454c41595f54494d4560901b604482015290519081900360640190fd5b600060018a111561085557600480546040805163d9dd67ab60e01b81526001198e0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b15801561082657600080fd5b505afa15801561083a573d6000803e3d6000fd5b505050506040513d602081101561085057600080fd5b505190505b61085f818361129c565b600480546040805163d9dd67ab60e01b81526000198f0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b1580156108af57600080fd5b505afa1580156108c3573d6000803e3d6000fd5b505050506040513d60208110156108d957600080fd5b505114610923576040805162461bcd60e51b81526020600482015260136024820152722222a620aca2a22fa0a1a1aaa6aaa620aa27a960691b604482015290519081900360640190fd5b5050600254600154600090156109535760018054600019810190811061094557fe5b906000526020600020015490505b60008061096483858e43428a6112c8565b9150915060018290806001815401808255809150506001900390600052602060002001600090919091909150558060028190555082847f85b6a949bf20bfd6bc6e20f98fb490c7944ab61dcfa5a30b5dae543412c9a8a0838f60405180604001604052808881526020018b81525060018080549050036040518085815260200184815260200183600260200280838360005b83811015610a0e5781810151838201526020016109f6565b5050505090500182815260200194505050505060405180910390a3505050505050505050505050565b600060025490506000610a8689898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a9150899050888861152c565b905080827f3bf85aebd2a1dc6c510ffc4795a3785e786b5817ab30144f88501d4c6456c986600254868d8d8d8d8d8d600180805490500333604051808b81526020018a8152602001806020018060200180602001868152602001856001600160a01b03166001600160a01b0316815260200184810384528c8c82818152602001925080828437600083820152601f01601f191690910185810384528a8152602090810191508b908b0280828437600083820152601f01601f19169091018581038352888152602090810191508990890280828437600083820152604051601f909101601f19169092018290039f50909d5050505050505050505050505050a3505050505050505050565b6006546001600160a01b03163314610bdd576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517fce86e570206e55533301cb66529b33afbd75e991c575b85adeaca10146be8cb49281900390910190a15050565b60095481565b60025481565b333214610c8f576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b600060025490506000610cde89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a9150899050888861152c565b60025460015460408051928352602083018790526000199091018282015251919250829184917f10e0571aafaf282151fd5b0215b5495521c549509cb0de3a3f8310bd2e344682919081900360600190a3505050505050505050565b6006546001600160a01b03163314610d87576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60088290556009819055604080518381526020810183905281517f3bcd3c6d4304309e4b36d94f90517baf304582bb1ac828906808577e067e6b6e929181900390910190a15050565b6005546001600160a01b031690565b60076020526000908152604090205460ff1681565b60005460ff1690565b60035481565b333214610e45576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b60005a600254604080516020601f8d018190048102820181019092528b81529293503692600091610e9891908e908e90819084018382808284376000920191909152508e92508d91508c90508b8b61152c565b60025460015460408051928352602083018a90526000199091018282015251919250829184917f10e0571aafaf282151fd5b0215b5495521c549509cb0de3a3f8310bd2e344682919081900360600190a36001600160a01b03851615610f8f57846001600160a01b031663e3db8a49335a8703866040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b031681526020018381526020018281526020019350505050602060405180830381600087803b158015610f6257600080fd5b505af1158015610f76573d6000803e3d6000fd5b505050506040513d6020811015610f8c57600080fd5b50505b505050505050505050505050565b6000610fa7611aaa565b9050336001600160a01b03821614610ff7576040805162461bcd60e51b815260206004820152600e60248201526d2727aa2fa32927a6afa0a226a4a760911b604482015290519081900360640190fd5b50565b6004546001600160a01b031681565b6004546001600160a01b031615611056576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600480546001600160a01b039485166001600160a01b0319918216179091559183166000908152600760205260409020805460ff1916600117905560068054919093169116179055565b6006546001600160a01b031681565b60015490565b600181815481106110c257fe5b600091825260209091200154905081565b60085481565b600080826110ec575060009050806106c3565b60008061112e87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250611acf915050565b9092509050600081156111665761116088888560018087038154811061115057fe5b9060005260206000200154611b43565b90935090505b60006001838154811061117557fe5b9060005260206000200154905060006111908a8a8785611b43565b90955090508288116111d7576040805162461bcd60e51b815260206004820152600b60248201526a10905510d217d4d510549560aa1b604482015290519081900360640190fd5b80881115611218576040805162461bcd60e51b815260206004820152600960248201526810905510d217d1539160ba1b604482015290519081900360640190fd5b999098509650505050505050565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6bffffffffffffffffffffffff19166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6004805460408051633dbcc8d160e01b8152905160009384936001600160a01b031692633dbcc8d19281830192602092829003018186803b15801561130c57600080fd5b505afa158015611320573d6000803e3d6000fd5b505050506040513d602081101561133657600080fd5b505186111561137e576040805162461bcd60e51b815260206004820152600f60248201526e2222a620aca2a22faa27a7afa320a960891b604482015290519081900360640190fd5b600480546040805163d9dd67ab60e01b81526000198a0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b1580156113ce57600080fd5b505afa1580156113e2573d6000803e3d6000fd5b505050506040513d60208110156113f857600080fd5b5051831461143b576040805162461bcd60e51b815260206004820152600b60248201526a44454c415945445f41434360a81b604482015290519081900360640190fd5b50506003805460408051702232b630bcb2b21036b2b9b9b0b3b2b99d60791b602080830191909152603182019a909a5260518101899052607181018390526091810188905260b1808201959095528151808203909501855260d1810182528451948a0194909420600060f186015261010585019690965261012580850195909552805180850390950185526101458401815284519489019490942060605160802061016585019690965290860390960161018583018190526101a58301969096526101c580830194909452825180830390940184526101e59091019091528151919094012092559091600190910190565b3360009081526007602052604081205460ff16611581576040805162461bcd60e51b815260206004820152600e60248201526d27a7262cafa9a2a8aaa2a721a2a960911b604482015290519081900360640190fd5b600154156115a95760018054600019810190811061159b57fe5b906000526020600020015490505b60025481600060208a01815b6005810188106119435760008989836001018181106115d057fe5b9050602002013590504360085482011015611622576040805162461bcd60e51b815260206004820152600d60248201526c109313d0d2d7d513d3d7d3d311609a1b604482015290519081900360640190fd5b43811115611667576040805162461bcd60e51b815260206004820152600d60248201526c424c4f434b5f544f4f5f4e455760981b604482015290519081900360640190fd5b50600089898360020181811061167957fe5b90506020020135905042600954820110156116ca576040805162461bcd60e51b815260206004820152600c60248201526b1512535157d513d3d7d3d31160a21b604482015290519081900360640190fd5b4281111561170e576040805162461bcd60e51b815260206004820152600c60248201526b54494d455f544f4f5f4e455760a01b604482015290519081900360640190fd5b506000338a8a8460010181811061172157fe5b905060200201358b8b8560020181811061173757fe5b9050602002013560405160200180846001600160a01b03166001600160a01b031660601b8152601401838152602001828152602001935050505060405160208183030381529060405280519060200120905060008a8a8481811061179757fe5b9050602002013590506117b0848e8e8885878d8d611d03565b9098509096509401939250600090508989600384018181106117ce57fe5b905060200201359050600354811015611822576040805162461bcd60e51b815260206004820152601160248201527044454c415945445f4241434b574152445360781b604482015290519081900360640190fd5b600181101561186c576040805162461bcd60e51b8152602060048201526011602482015270135554d517d111531056515117d2539255607a1b604482015290519081900360640190fd5b6001600354101580611890575089898381811061188557fe5b905060200201356000145b6118db576040805162461bcd60e51b8152602060048201526017602482015276135554d517d111531056515117d253925517d4d5105495604a1b604482015290519081900360640190fd5b60035481111561193a576119358587838d8d876001018181106118fa57fe5b905060200201358e8e8860020181811061191057fe5b905060200201358f8f8960040181811061192657fe5b9050602002013560001b6112c8565b965094505b506005016115b5565b5060208b018082101561198f576040805162461bcd60e51b815260206004820152600f60248201526e4f46465345545f4f564552464c4f5760881b604482015290519081900360640190fd5b8b5181018211156119de576040805162461bcd60e51b81526020600482015260146024820152732a2920a729a0a1aa24a7a729afa7ab22a9292aa760611b604482015290519081900360640190fd5b6002548511611a22576040805162461bcd60e51b815260206004820152600b60248201526a08a9aa0a8b2be8482a886960ab1b604482015290519081900360640190fd5b6001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6018490556002859055868414611a9b576040805162461bcd60e51b815260206004820152600960248201526841465445525f41434360b81b604482015290519081900360640190fd5b50505050509695505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b60008082845110158015611ae7575060208385510310155b611b24576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301611b38858563ffffffff611d9116565b915091509250929050565b6000806000806000806000611b8f8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611acf915050565b809550819a505050611bd88b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611acf915050565b809450819a505050611c218b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611acf915050565b809350819a505050611c6a8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611acf915050565b604080516020808201989098528082018790526060810186905260808082018490528251808303909101815260a09091019091528051960195909520909950600184019550939050878414611cf2576040805162461bcd60e51b815260206004820152600960248201526842415443485f41434360b81b604482015290519081900360640190fd5b509699929850919650505050505050565b92840192808289875b87811015611d825760008b8b83818110611d2257fe5b60209081029290920135808620604080518086019a909a5289810189905260608a018d90526080808b01929092528051808b03909201825260a0909901909852875197909201969096209550600194850194930192919091019050611d0c565b50985098509895505050505050565b60008160200183511015611de1576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b5001602001519056fea26469706673582212201e3ad7c74a67aed9eb7b1284d754dbfbaf58515630d9d28ea9e94832533ffdbf64736f6c634300060b0033", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"firstMessageNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"beforeAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMessageCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalDelayedMessagesRead\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32[2]\",\"name\":\"afterAccAndDelayed\",\"type\":\"bytes32[2]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seqBatchIndex\",\"type\":\"uint256\"}],\"name\":\"DelayedInboxForced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isSequencer\",\"type\":\"bool\"}],\"name\":\"IsSequencerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxDelayBlocks\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxDelaySeconds\",\"type\":\"uint256\"}],\"name\":\"MaxDelayUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"firstMessageNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"beforeAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMessageCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"lengths\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"sectionsMetadata\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seqBatchIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sequencer\",\"type\":\"address\"}],\"name\":\"SequencerBatchDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"firstMessageNum\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"beforeAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMessageCount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seqBatchIndex\",\"type\":\"uint256\"}],\"name\":\"SequencerBatchDeliveredFromOrigin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"shutdown\",\"type\":\"bool\"}],\"name\":\"ShutdownForNitroSet\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"lengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sectionsMetadata\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"}],\"name\":\"addSequencerL2Batch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"lengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sectionsMetadata\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"}],\"name\":\"addSequencerL2BatchFromOrigin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"lengths\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"sectionsMetadata\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32\",\"name\":\"afterAcc\",\"type\":\"bytes32\"},{\"internalType\":\"contractIGasRefunder\",\"name\":\"gasRefunder\",\"type\":\"address\"}],\"name\":\"addSequencerL2BatchFromOriginWithGasRefunder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delayedInbox\",\"outputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalDelayedMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"uint256[2]\",\"name\":\"l1BlockAndTimestamp\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"inboxSeqNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPriceL1\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"messageDataHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"delayedAcc\",\"type\":\"bytes32\"}],\"name\":\"forceInclusion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getInboxAccsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inboxAccs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIBridge\",\"name\":\"_delayedInbox\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sequencer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rollup\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isNitroReady\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isSequencer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isShutdownForNitro\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDelayBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDelaySeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"postUpgradeInit\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_messageCount\",\"type\":\"uint256\"}],\"name\":\"proveBatchContainsSequenceNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_messageCount\",\"type\":\"uint256\"}],\"name\":\"proveInboxContainsMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollup\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"newIsSequencer\",\"type\":\"bool\"}],\"name\":\"setIsSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxDelayBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newMaxDelaySeconds\",\"type\":\"uint256\"}],\"name\":\"setMaxDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalDelayedMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"delayedAcc\",\"type\":\"bytes32\"}],\"name\":\"shutdownForNitro\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalDelayedMessagesRead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"undoShutdownForNitro\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506000805460ff191660011790556123bd8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106101635760003560e01c80636f791d29116100ce578063b71939b111610087578063b71939b1146106a2578063c0c53b8b146106aa578063cb23bcb5146106e2578063d9b141ff146106ea578063d9dd67ab146106f2578063dc1b7b1f14610168578063e367a2c11461070f57610163565b80636f791d291461055d5780637e6c255f146105655780637fa3a40e1461056d5780638a2df18d1461057557806395fcea7814610692578063a8929e0b1461069a57610163565b8063381b003b11610120578063381b003b146103be5780633dbcc8d1146103da57806344c7cc30146103e25780634d480faa146104f05780635c1bba38146105135780636d46e9871461053757610163565b806306cc91b2146101685780630c4a1e59146101ef5780631a734229146102455780631f956632146103535780632aa8690914610381578063342025fa146103a4575b600080fd5b6101d66004803603604081101561017e57600080fd5b810190602081018135600160201b81111561019857600080fd5b8201836020820111156101aa57600080fd5b803590602001918460018302840111600160201b831117156101cb57600080fd5b919350915035610717565b6040805192835260208301919091528051918290030190f35b610243600480360361012081101561020657600080fd5b5080359060ff60208201351690604081019060808101359060a0810135906001600160a01b0360c0820135169060e0810135906101000135610732565b005b6102436004803603608081101561025b57600080fd5b810190602081018135600160201b81111561027557600080fd5b82018360208201111561028757600080fd5b803590602001918460018302840111600160201b831117156102a857600080fd5b919390929091602081019035600160201b8111156102c557600080fd5b8201836020820111156102d757600080fd5b803590602001918460208302840111600160201b831117156102f857600080fd5b919390929091602081019035600160201b81111561031557600080fd5b82018360208201111561032757600080fd5b803590602001918460208302840111600160201b8311171561034857600080fd5b919350915035610a10565b6102436004803603604081101561036957600080fd5b506001600160a01b0381351690602001351515610be6565b6102436004803603604081101561039757600080fd5b5080359060200135610c97565b6103ac610e2c565b60408051918252519081900360200190f35b6103c6610e32565b604080519115158252519081900360200190f35b6103ac610e3b565b610243600480360360808110156103f857600080fd5b810190602081018135600160201b81111561041257600080fd5b82018360208201111561042457600080fd5b803590602001918460018302840111600160201b8311171561044557600080fd5b919390929091602081019035600160201b81111561046257600080fd5b82018360208201111561047457600080fd5b803590602001918460208302840111600160201b8311171561049557600080fd5b919390929091602081019035600160201b8111156104b257600080fd5b8201836020820111156104c457600080fd5b803590602001918460208302840111600160201b831117156104e557600080fd5b919350915035610e41565b6102436004803603604081101561050657600080fd5b5080359060200135610fab565b61051b611041565b604080516001600160a01b039092168252519081900360200190f35b6103c66004803603602081101561054d57600080fd5b50356001600160a01b0316611050565b6103c6611065565b61024361106e565b6103ac6111b3565b610243600480360360a081101561058b57600080fd5b810190602081018135600160201b8111156105a557600080fd5b8201836020820111156105b757600080fd5b803590602001918460018302840111600160201b831117156105d857600080fd5b919390929091602081019035600160201b8111156105f557600080fd5b82018360208201111561060757600080fd5b803590602001918460208302840111600160201b8311171561062857600080fd5b919390929091602081019035600160201b81111561064557600080fd5b82018360208201111561065757600080fd5b803590602001918460208302840111600160201b8311171561067857600080fd5b9193509150803590602001356001600160a01b03166111b9565b6102436113d0565b6103ac61142d565b61051b611433565b610243600480360360608110156106c057600080fd5b506001600160a01b038135811691602081013582169160409091013516611442565b61051b6114d9565b6103ac6114e8565b6103ac6004803603602081101561070857600080fd5b50356114ee565b6103ac61150c565b600080610725858585611512565b915091505b935093915050565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff16156107eb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107b0578181015183820152602001610798565b50505050905090810190601f1680156107dd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060006108028885893560208b01358a8a8961165f565b60085490915043883590910110610853576040805162461bcd60e51b815260206004820152601060248201526f4d41585f44454c41595f424c4f434b5360801b604482015290519081900360640190fd5b600954426020890135909101106108a2576040805162461bcd60e51b815260206004820152600e60248201526d4d41585f44454c41595f54494d4560901b604482015290519081900360640190fd5b600060018a111561092c57600480546040805163d9dd67ab60e01b81526001198e0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b1580156108fd57600080fd5b505afa158015610911573d6000803e3d6000fd5b505050506040513d602081101561092757600080fd5b505190505b61093681836116d5565b600480546040805163d9dd67ab60e01b81526000198f0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b15801561098657600080fd5b505afa15801561099a573d6000803e3d6000fd5b505050506040513d60208110156109b057600080fd5b5051146109fa576040805162461bcd60e51b81526020600482015260136024820152722222a620aca2a22fa0a1a1aaa6aaa620aa27a960691b604482015290519081900360640190fd5b5050610a068882611701565b5050505050505050565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff1615610a8c5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107b0578181015183820152602001610798565b50600060025490506000610adc89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a91508990508888611865565b905080827f3bf85aebd2a1dc6c510ffc4795a3785e786b5817ab30144f88501d4c6456c986600254868d8d8d8d8d8d600180805490500333604051808b81526020018a8152602001806020018060200180602001868152602001856001600160a01b03166001600160a01b0316815260200184810384528c8c82818152602001925080828437600083820152601f01601f191690910185810384528a8152602090810191508b908b0280828437600083820152601f01601f19169091018581038352888152602090810191508990890280828437600083820152604051601f909101601f19169092018290039f50909d5050505050505050505050505050a3505050505050505050565b6006546001600160a01b03163314610c33576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517fce86e570206e55533301cb66529b33afbd75e991c575b85adeaca10146be8cb49281900390910190a15050565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff1615610d135760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107b0578181015183820152602001610798565b5060065460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610d5857600080fd5b505afa158015610d6c573d6000803e3d6000fd5b505050506040513d6020811015610d8257600080fd5b50516001600160a01b031614610dd3576040805162461bcd60e51b815260206004820152601160248201527027a7262cafa927a6262aa82fa7aba722a960791b604482015290519081900360640190fd5b6003548214610de657610de68282611701565b600a805460ff1916600190811790915560408051918252517fe6d1c315c736941d015418a8728891eae6aea39817b9c134486054bf34cc336b9181900360200190a15050565b60095481565b600a5460ff1681565b60025481565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff1615610ebd5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107b0578181015183820152602001610798565b50333214610f00576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b600060025490506000610f4f89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a91508990508888611865565b60025460015460408051928352602083018790526000199091018282015251919250829184917f10e0571aafaf282151fd5b0215b5495521c549509cb0de3a3f8310bd2e344682919081900360600190a3505050505050505050565b6006546001600160a01b03163314610ff8576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60088290556009819055604080518381526020810183905281517f3bcd3c6d4304309e4b36d94f90517baf304582bb1ac828906808577e067e6b6e929181900390910190a15050565b6005546001600160a01b031690565b60076020526000908152604090205460ff1681565b60005460ff1690565b60065460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b50516001600160a01b03161461112d576040805162461bcd60e51b815260206004820152601160248201527027a7262cafa927a6262aa82fa7aba722a960791b604482015290519081900360640190fd5b600a5460ff16611173576040805162461bcd60e51b815260206004820152600c60248201526b2727aa2fa9a42aaa2227aba760a11b604482015290519081900360640190fd5b600a805460ff19169055604080516000815290517fe6d1c315c736941d015418a8728891eae6aea39817b9c134486054bf34cc336b9181900360200190a1565b60035481565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff16156112355760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107b0578181015183820152602001610798565b50333214611278576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b60005a600254604080516020601f8d018190048102820181019092528b815292935036926000916112cb91908e908e90819084018382808284376000920191909152508e92508d91508c90508b8b611865565b60025460015460408051928352602083018a90526000199091018282015251919250829184917f10e0571aafaf282151fd5b0215b5495521c549509cb0de3a3f8310bd2e344682919081900360600190a36001600160a01b038516156113c257846001600160a01b031663e3db8a49335a8703866040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b031681526020018381526020018281526020019350505050602060405180830381600087803b15801561139557600080fd5b505af11580156113a9573d6000803e3d6000fd5b505050506040513d60208110156113bf57600080fd5b50505b505050505050505050505050565b60006113da611de3565b9050336001600160a01b0382161461142a576040805162461bcd60e51b815260206004820152600e60248201526d2727aa2fa32927a6afa0a226a4a760911b604482015290519081900360640190fd5b50565b61a4b790565b6004546001600160a01b031681565b6004546001600160a01b03161561148f576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600480546001600160a01b039485166001600160a01b0319918216179091559183166000908152600760205260409020805460ff1916600117905560068054919093169116179055565b6006546001600160a01b031681565b60015490565b600181815481106114fb57fe5b600091825260209091200154905081565b60085481565b600080826115255750600090508061072a565b60008061156787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250611e08915050565b90925090506000811561159f5761159988888560018087038154811061158957fe5b9060005260206000200154611e7c565b90935090505b6000600183815481106115ae57fe5b9060005260206000200154905060006115c98a8a8785611e7c565b9095509050828811611610576040805162461bcd60e51b815260206004820152600b60248201526a10905510d217d4d510549560aa1b604482015290519081900360640190fd5b80881115611651576040805162461bcd60e51b815260206004820152600960248201526810905510d217d1539160ba1b604482015290519081900360640190fd5b999098509650505050505050565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6bffffffffffffffffffffffff19166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600354821161174b576040805162461bcd60e51b815260206004820152601160248201527044454c415945445f4241434b574152445360781b604482015290519081900360640190fd5b600254600154600090156117795760018054600019810190811061176b57fe5b906000526020600020015490505b60008061178a83858843428a61203c565b60018054808201825560008281527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6909101849055600283905560408051808201825285815260208181018c9052935482518681529485018d9052959750939550879489947f85b6a949bf20bfd6bc6e20f98fb490c7944ab61dcfa5a30b5dae543412c9a8a09488948e9492936000190192828101918591908190849084905b8381101561184257818101518382015260200161182a565b5050505090500182815260200194505050505060405180910390a3505050505050565b3360009081526007602052604081205460ff166118ba576040805162461bcd60e51b815260206004820152600e60248201526d27a7262cafa9a2a8aaa2a721a2a960911b604482015290519081900360640190fd5b600154156118e2576001805460001981019081106118d457fe5b906000526020600020015490505b60025481600060208a01815b600581018810611c7c57600089898360010181811061190957fe5b905060200201359050436008548201101561195b576040805162461bcd60e51b815260206004820152600d60248201526c109313d0d2d7d513d3d7d3d311609a1b604482015290519081900360640190fd5b438111156119a0576040805162461bcd60e51b815260206004820152600d60248201526c424c4f434b5f544f4f5f4e455760981b604482015290519081900360640190fd5b5060008989836002018181106119b257fe5b9050602002013590504260095482011015611a03576040805162461bcd60e51b815260206004820152600c60248201526b1512535157d513d3d7d3d31160a21b604482015290519081900360640190fd5b42811115611a47576040805162461bcd60e51b815260206004820152600c60248201526b54494d455f544f4f5f4e455760a01b604482015290519081900360640190fd5b506000338a8a84600101818110611a5a57fe5b905060200201358b8b85600201818110611a7057fe5b9050602002013560405160200180846001600160a01b03166001600160a01b031660601b8152601401838152602001828152602001935050505060405160208183030381529060405280519060200120905060008a8a84818110611ad057fe5b905060200201359050611ae9848e8e8885878d8d6122a0565b909850909650940193925060009050898960038401818110611b0757fe5b905060200201359050600354811015611b5b576040805162461bcd60e51b815260206004820152601160248201527044454c415945445f4241434b574152445360781b604482015290519081900360640190fd5b6001811015611ba5576040805162461bcd60e51b8152602060048201526011602482015270135554d517d111531056515117d2539255607a1b604482015290519081900360640190fd5b6001600354101580611bc95750898983818110611bbe57fe5b905060200201356000145b611c14576040805162461bcd60e51b8152602060048201526017602482015276135554d517d111531056515117d253925517d4d5105495604a1b604482015290519081900360640190fd5b600354811115611c7357611c6e8587838d8d87600101818110611c3357fe5b905060200201358e8e88600201818110611c4957fe5b905060200201358f8f89600401818110611c5f57fe5b9050602002013560001b61203c565b965094505b506005016118ee565b5060208b0180821015611cc8576040805162461bcd60e51b815260206004820152600f60248201526e4f46465345545f4f564552464c4f5760881b604482015290519081900360640190fd5b8b518101821115611d17576040805162461bcd60e51b81526020600482015260146024820152732a2920a729a0a1aa24a7a729afa7ab22a9292aa760611b604482015290519081900360640190fd5b6002548511611d5b576040805162461bcd60e51b815260206004820152600b60248201526a08a9aa0a8b2be8482a886960ab1b604482015290519081900360640190fd5b6001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6018490556002859055868414611dd4576040805162461bcd60e51b815260206004820152600960248201526841465445525f41434360b81b604482015290519081900360640190fd5b50505050509695505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b60008082845110158015611e20575060208385510310155b611e5d576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301611e71858563ffffffff61232e16565b915091509250929050565b6000806000806000806000611ec88b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611e08915050565b809550819a505050611f118b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611e08915050565b809450819a505050611f5a8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611e08915050565b809350819a505050611fa38b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611e08915050565b604080516020808201989098528082018790526060810186905260808082018490528251808303909101815260a0909101909152805196019590952090995060018401955093905087841461202b576040805162461bcd60e51b815260206004820152600960248201526842415443485f41434360b81b604482015290519081900360640190fd5b509699929850919650505050505050565b6004805460408051633dbcc8d160e01b8152905160009384936001600160a01b031692633dbcc8d19281830192602092829003018186803b15801561208057600080fd5b505afa158015612094573d6000803e3d6000fd5b505050506040513d60208110156120aa57600080fd5b50518611156120f2576040805162461bcd60e51b815260206004820152600f60248201526e2222a620aca2a22faa27a7afa320a960891b604482015290519081900360640190fd5b600480546040805163d9dd67ab60e01b81526000198a0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b15801561214257600080fd5b505afa158015612156573d6000803e3d6000fd5b505050506040513d602081101561216c57600080fd5b505183146121af576040805162461bcd60e51b815260206004820152600b60248201526a44454c415945445f41434360a81b604482015290519081900360640190fd5b50506003805460408051702232b630bcb2b21036b2b9b9b0b3b2b99d60791b602080830191909152603182019a909a5260518101899052607181018390526091810188905260b1808201959095528151808203909501855260d1810182528451948a0194909420600060f186015261010585019690965261012580850195909552805180850390950185526101458401815284519489019490942060605160802061016585019690965290860390960161018583018190526101a58301969096526101c580830194909452825180830390940184526101e59091019091528151919094012092559091600190910190565b92840192808289875b8781101561231f5760008b8b838181106122bf57fe5b60209081029290920135808620604080518086019a909a5289810189905260608a018d90526080808b01929092528051808b03909201825260a09099019098528751979092019690962095506001948501949301929190910190506122a9565b50985098509895505050505050565b6000816020018351101561237e576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b5001602001519056fea2646970667358221220b5ba73c644de2ce471db488ffce4cfbd774d5ee918b7d60282d056ff815c684e64736f6c634300060b0033", } // SequencerInboxABI is the input ABI used to generate the binding from. @@ -325,6 +325,37 @@ func (_SequencerInbox *SequencerInboxCallerSession) IsMaster() (bool, error) { return _SequencerInbox.Contract.IsMaster(&_SequencerInbox.CallOpts) } +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_SequencerInbox *SequencerInboxCaller) IsNitroReady(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SequencerInbox.contract.Call(opts, &out, "isNitroReady") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_SequencerInbox *SequencerInboxSession) IsNitroReady() (*big.Int, error) { + return _SequencerInbox.Contract.IsNitroReady(&_SequencerInbox.CallOpts) +} + +// IsNitroReady is a free data retrieval call binding the contract method 0xa8929e0b. +// +// Solidity: function isNitroReady() pure returns(uint256) +func (_SequencerInbox *SequencerInboxCallerSession) IsNitroReady() (*big.Int, error) { + return _SequencerInbox.Contract.IsNitroReady(&_SequencerInbox.CallOpts) +} + // IsSequencer is a free data retrieval call binding the contract method 0x6d46e987. // // Solidity: function isSequencer(address ) view returns(bool) @@ -356,6 +387,37 @@ func (_SequencerInbox *SequencerInboxCallerSession) IsSequencer(arg0 common.Addr return _SequencerInbox.Contract.IsSequencer(&_SequencerInbox.CallOpts, arg0) } +// IsShutdownForNitro is a free data retrieval call binding the contract method 0x381b003b. +// +// Solidity: function isShutdownForNitro() view returns(bool) +func (_SequencerInbox *SequencerInboxCaller) IsShutdownForNitro(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _SequencerInbox.contract.Call(opts, &out, "isShutdownForNitro") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsShutdownForNitro is a free data retrieval call binding the contract method 0x381b003b. +// +// Solidity: function isShutdownForNitro() view returns(bool) +func (_SequencerInbox *SequencerInboxSession) IsShutdownForNitro() (bool, error) { + return _SequencerInbox.Contract.IsShutdownForNitro(&_SequencerInbox.CallOpts) +} + +// IsShutdownForNitro is a free data retrieval call binding the contract method 0x381b003b. +// +// Solidity: function isShutdownForNitro() view returns(bool) +func (_SequencerInbox *SequencerInboxCallerSession) IsShutdownForNitro() (bool, error) { + return _SequencerInbox.Contract.IsShutdownForNitro(&_SequencerInbox.CallOpts) +} + // MaxDelayBlocks is a free data retrieval call binding the contract method 0xe367a2c1. // // Solidity: function maxDelayBlocks() view returns(uint256) @@ -782,6 +844,48 @@ func (_SequencerInbox *SequencerInboxTransactorSession) SetMaxDelay(newMaxDelayB return _SequencerInbox.Contract.SetMaxDelay(&_SequencerInbox.TransactOpts, newMaxDelayBlocks, newMaxDelaySeconds) } +// ShutdownForNitro is a paid mutator transaction binding the contract method 0x2aa86909. +// +// Solidity: function shutdownForNitro(uint256 _totalDelayedMessagesRead, bytes32 delayedAcc) returns() +func (_SequencerInbox *SequencerInboxTransactor) ShutdownForNitro(opts *bind.TransactOpts, _totalDelayedMessagesRead *big.Int, delayedAcc [32]byte) (*types.Transaction, error) { + return _SequencerInbox.contract.Transact(opts, "shutdownForNitro", _totalDelayedMessagesRead, delayedAcc) +} + +// ShutdownForNitro is a paid mutator transaction binding the contract method 0x2aa86909. +// +// Solidity: function shutdownForNitro(uint256 _totalDelayedMessagesRead, bytes32 delayedAcc) returns() +func (_SequencerInbox *SequencerInboxSession) ShutdownForNitro(_totalDelayedMessagesRead *big.Int, delayedAcc [32]byte) (*types.Transaction, error) { + return _SequencerInbox.Contract.ShutdownForNitro(&_SequencerInbox.TransactOpts, _totalDelayedMessagesRead, delayedAcc) +} + +// ShutdownForNitro is a paid mutator transaction binding the contract method 0x2aa86909. +// +// Solidity: function shutdownForNitro(uint256 _totalDelayedMessagesRead, bytes32 delayedAcc) returns() +func (_SequencerInbox *SequencerInboxTransactorSession) ShutdownForNitro(_totalDelayedMessagesRead *big.Int, delayedAcc [32]byte) (*types.Transaction, error) { + return _SequencerInbox.Contract.ShutdownForNitro(&_SequencerInbox.TransactOpts, _totalDelayedMessagesRead, delayedAcc) +} + +// UndoShutdownForNitro is a paid mutator transaction binding the contract method 0x7e6c255f. +// +// Solidity: function undoShutdownForNitro() returns() +func (_SequencerInbox *SequencerInboxTransactor) UndoShutdownForNitro(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SequencerInbox.contract.Transact(opts, "undoShutdownForNitro") +} + +// UndoShutdownForNitro is a paid mutator transaction binding the contract method 0x7e6c255f. +// +// Solidity: function undoShutdownForNitro() returns() +func (_SequencerInbox *SequencerInboxSession) UndoShutdownForNitro() (*types.Transaction, error) { + return _SequencerInbox.Contract.UndoShutdownForNitro(&_SequencerInbox.TransactOpts) +} + +// UndoShutdownForNitro is a paid mutator transaction binding the contract method 0x7e6c255f. +// +// Solidity: function undoShutdownForNitro() returns() +func (_SequencerInbox *SequencerInboxTransactorSession) UndoShutdownForNitro() (*types.Transaction, error) { + return _SequencerInbox.Contract.UndoShutdownForNitro(&_SequencerInbox.TransactOpts) +} + // SequencerInboxDelayedInboxForcedIterator is returned from FilterDelayedInboxForced and is used to iterate over the raw logs and unpacked data for DelayedInboxForced events raised by the SequencerInbox contract. type SequencerInboxDelayedInboxForcedIterator struct { Event *SequencerInboxDelayedInboxForced // Event containing the contract specifics and raw log @@ -1524,3 +1628,137 @@ func (_SequencerInbox *SequencerInboxFilterer) ParseSequencerBatchDeliveredFromO event.Raw = log return event, nil } + +// SequencerInboxShutdownForNitroSetIterator is returned from FilterShutdownForNitroSet and is used to iterate over the raw logs and unpacked data for ShutdownForNitroSet events raised by the SequencerInbox contract. +type SequencerInboxShutdownForNitroSetIterator struct { + Event *SequencerInboxShutdownForNitroSet // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SequencerInboxShutdownForNitroSetIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SequencerInboxShutdownForNitroSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SequencerInboxShutdownForNitroSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SequencerInboxShutdownForNitroSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SequencerInboxShutdownForNitroSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SequencerInboxShutdownForNitroSet represents a ShutdownForNitroSet event raised by the SequencerInbox contract. +type SequencerInboxShutdownForNitroSet struct { + Shutdown bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterShutdownForNitroSet is a free log retrieval operation binding the contract event 0xe6d1c315c736941d015418a8728891eae6aea39817b9c134486054bf34cc336b. +// +// Solidity: event ShutdownForNitroSet(bool shutdown) +func (_SequencerInbox *SequencerInboxFilterer) FilterShutdownForNitroSet(opts *bind.FilterOpts) (*SequencerInboxShutdownForNitroSetIterator, error) { + + logs, sub, err := _SequencerInbox.contract.FilterLogs(opts, "ShutdownForNitroSet") + if err != nil { + return nil, err + } + return &SequencerInboxShutdownForNitroSetIterator{contract: _SequencerInbox.contract, event: "ShutdownForNitroSet", logs: logs, sub: sub}, nil +} + +// WatchShutdownForNitroSet is a free log subscription operation binding the contract event 0xe6d1c315c736941d015418a8728891eae6aea39817b9c134486054bf34cc336b. +// +// Solidity: event ShutdownForNitroSet(bool shutdown) +func (_SequencerInbox *SequencerInboxFilterer) WatchShutdownForNitroSet(opts *bind.WatchOpts, sink chan<- *SequencerInboxShutdownForNitroSet) (event.Subscription, error) { + + logs, sub, err := _SequencerInbox.contract.WatchLogs(opts, "ShutdownForNitroSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SequencerInboxShutdownForNitroSet) + if err := _SequencerInbox.contract.UnpackLog(event, "ShutdownForNitroSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseShutdownForNitroSet is a log parse operation binding the contract event 0xe6d1c315c736941d015418a8728891eae6aea39817b9c134486054bf34cc336b. +// +// Solidity: event ShutdownForNitroSet(bool shutdown) +func (_SequencerInbox *SequencerInboxFilterer) ParseShutdownForNitroSet(log types.Log) (*SequencerInboxShutdownForNitroSet, error) { + event := new(SequencerInboxShutdownForNitroSet) + if err := _SequencerInbox.contract.UnpackLog(event, "ShutdownForNitroSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/packages/arb-util/ethbridgecontracts/Validator.go b/packages/arb-util/ethbridgecontracts/Validator.go index 99be9788ff..0eca40dff1 100755 --- a/packages/arb-util/ethbridgecontracts/Validator.go +++ b/packages/arb-util/ethbridgecontracts/Validator.go @@ -31,7 +31,7 @@ var ( // ValidatorMetaData contains all meta data concerning the Validator contract. var ValidatorMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"address[]\",\"name\":\"destination\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amount\",\"type\":\"uint256[]\"}],\"name\":\"executeTransactions\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIRollupUser\",\"name\":\"rollup\",\"type\":\"address\"},{\"internalType\":\"addresspayable[]\",\"name\":\"stakers\",\"type\":\"address[]\"}],\"name\":\"returnOldDeposits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIChallenge[]\",\"name\":\"challenges\",\"type\":\"address[]\"}],\"name\":\"timeoutChallenges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506065805460ff19166001179055610df58061002d6000396000f3fe6080604052600436106100765760003560e01c80636f791d291461007b578063715018a6146100a657806372f45866146100bd5780638129fc1c146100d057806381aac2d9146100e55780638da5cb5b14610105578063944f449514610127578063ce1d571f14610147578063f2fde38b1461015a575b600080fd5b34801561008757600080fd5b5061009061017a565b60405161009d9190610c29565b60405180910390f35b3480156100b257600080fd5b506100bb610183565b005b6100bb6100cb366004610a57565b610203565b3480156100dc57600080fd5b506100bb61039a565b3480156100f157600080fd5b506100bb610100366004610aed565b610425565b34801561011157600080fd5b5061011a61053e565b60405161009d9190610c15565b34801561013357600080fd5b506100bb610142366004610bb2565b61054d565b6100bb610155366004610b2d565b610672565b34801561016657600080fd5b506100bb610175366004610a34565b61075a565b60655460ff1690565b61018b610809565b6001600160a01b031661019c61053e565b6001600160a01b0316146101cb5760405162461bcd60e51b81526004016101c290610cf1565b60405180910390fd5b6033546040516000916001600160a01b031690600080516020610da0833981519152908390a3603380546001600160a01b0319169055565b61020b610809565b6001600160a01b031661021c61053e565b6001600160a01b0316146102425760405162461bcd60e51b81526004016101c290610cf1565b8460005b8181101561039057600088888381811061025c57fe5b905060200281019061026e9190610d43565b905011156102c4576102a886868381811061028557fe5b905060200201602081019061029a9190610a34565b6001600160a01b031661080d565b6102c45760405162461bcd60e51b81526004016101c290610c34565b60008686838181106102d257fe5b90506020020160208101906102e79190610a34565b6001600160a01b03168585848181106102fc57fe5b905060200201358a8a8581811061030f57fe5b90506020028101906103219190610d43565b60405161032f929190610c05565b60006040518083038185875af1925050503d806000811461036c576040519150601f19603f3d011682016040523d82523d6000602084013e610371565b606091505b5050905080610387576040513d806000833e8082fd5b50600101610246565b5050505050505050565b600054610100900460ff16806103b357506103b3610813565b806103c1575060005460ff16155b6103dd5760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610408576000805460ff1961ff0019909116610100171660011790555b610410610824565b8015610422576000805461ff00191690555b50565b61042d610809565b6001600160a01b031661043e61053e565b6001600160a01b0316146104645760405162461bcd60e51b81526004016101c290610cf1565b8060005b818110156105385783838281811061047c57fe5b90506020020160208101906104919190610a34565b6001600160a01b03166370dea79a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156104cb57600080fd5b505af19250505080156104dc575060015b610530573d80801561050a576040519150601f19603f3d011682016040523d82523d6000602084013e61050f565b606091505b50805161052e5760405162461bcd60e51b81526004016101c290610d26565b505b600101610468565b50505050565b6033546001600160a01b031690565b610555610809565b6001600160a01b031661056661053e565b6001600160a01b03161461058c5760405162461bcd60e51b81526004016101c290610cf1565b8060005b8181101561066b57846001600160a01b0316637427be518585848181106105b357fe5b90506020020160208101906105c89190610a34565b6040518263ffffffff1660e01b81526004016105e49190610c15565b600060405180830381600087803b1580156105fe57600080fd5b505af192505050801561060f575060015b610663573d80801561063d576040519150601f19603f3d011682016040523d82523d6000602084013e610642565b606091505b5080516106615760405162461bcd60e51b81526004016101c290610d26565b505b600101610590565b5050505050565b61067a610809565b6001600160a01b031661068b61053e565b6001600160a01b0316146106b15760405162461bcd60e51b81526004016101c290610cf1565b82156106e5576106c9826001600160a01b031661080d565b6106e55760405162461bcd60e51b81526004016101c290610c34565b6000826001600160a01b0316828686604051610702929190610c05565b60006040518083038185875af1925050503d806000811461073f576040519150601f19603f3d011682016040523d82523d6000602084013e610744565b606091505b505090508061066b576040513d806000833e8082fd5b610762610809565b6001600160a01b031661077361053e565b6001600160a01b0316146107995760405162461bcd60e51b81526004016101c290610cf1565b6001600160a01b0381166107bf5760405162461bcd60e51b81526004016101c290610c5d565b6033546040516001600160a01b03808416921690600080516020610da083398151915290600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b3b151590565b600061081e3061080d565b15905090565b600054610100900460ff168061083d575061083d610813565b8061084b575060005460ff16155b6108675760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610892576000805460ff1961ff0019909116610100171660011790555b61089a6108a2565b610410610923565b600054610100900460ff16806108bb57506108bb610813565b806108c9575060005460ff16155b6108e55760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610410576000805460ff1961ff0019909116610100171660011790558015610422576000805461ff001916905550565b600054610100900460ff168061093c575061093c610813565b8061094a575060005460ff16155b6109665760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610991576000805460ff1961ff0019909116610100171660011790555b600061099b610809565b603380546001600160a01b0319166001600160a01b03831690811790915560405191925090600090600080516020610da0833981519152908290a3508015610422576000805461ff001916905550565b60008083601f8401126109fc578182fd5b50813567ffffffffffffffff811115610a13578182fd5b6020830191508360208083028501011115610a2d57600080fd5b9250929050565b600060208284031215610a45578081fd5b8135610a5081610d8a565b9392505050565b60008060008060008060608789031215610a6f578182fd5b863567ffffffffffffffff80821115610a86578384fd5b610a928a838b016109eb565b90985096506020890135915080821115610aaa578384fd5b610ab68a838b016109eb565b90965094506040890135915080821115610ace578384fd5b50610adb89828a016109eb565b979a9699509497509295939492505050565b60008060208385031215610aff578182fd5b823567ffffffffffffffff811115610b15578283fd5b610b21858286016109eb565b90969095509350505050565b60008060008060608587031215610b42578384fd5b843567ffffffffffffffff80821115610b59578586fd5b81870188601f820112610b6a578687fd5b8035925081831115610b7a578687fd5b886020848301011115610b8b578687fd5b6020908101965091945050850135610ba281610d8a565b9396929550929360400135925050565b600080600060408486031215610bc6578283fd5b8335610bd181610d8a565b9250602084013567ffffffffffffffff811115610bec578283fd5b610bf8868287016109eb565b9497909650939450505050565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6020808252600f908201526e2727afa1a7a222afa0aa2fa0a2222960891b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526003908201526247415360e81b604082015260600190565b6000808335601e19843603018112610d59578283fd5b8084018035925067ffffffffffffffff831115610d74578384fd5b60200192505036819003821315610a2d57600080fd5b6001600160a01b038116811461042257600080fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220d99349a0f5eb6201c360896f42545166fe2aa67f1f61eb1bd9bd5d781421027164736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b506065805460ff19166001179055610df58061002d6000396000f3fe6080604052600436106100765760003560e01c80636f791d291461007b578063715018a6146100a657806372f45866146100bd5780638129fc1c146100d057806381aac2d9146100e55780638da5cb5b14610105578063944f449514610127578063ce1d571f14610147578063f2fde38b1461015a575b600080fd5b34801561008757600080fd5b5061009061017a565b60405161009d9190610c29565b60405180910390f35b3480156100b257600080fd5b506100bb610183565b005b6100bb6100cb366004610a57565b610203565b3480156100dc57600080fd5b506100bb61039a565b3480156100f157600080fd5b506100bb610100366004610aed565b610425565b34801561011157600080fd5b5061011a61053e565b60405161009d9190610c15565b34801561013357600080fd5b506100bb610142366004610bb2565b61054d565b6100bb610155366004610b2d565b610672565b34801561016657600080fd5b506100bb610175366004610a34565b61075a565b60655460ff1690565b61018b610809565b6001600160a01b031661019c61053e565b6001600160a01b0316146101cb5760405162461bcd60e51b81526004016101c290610cf1565b60405180910390fd5b6033546040516000916001600160a01b031690600080516020610da0833981519152908390a3603380546001600160a01b0319169055565b61020b610809565b6001600160a01b031661021c61053e565b6001600160a01b0316146102425760405162461bcd60e51b81526004016101c290610cf1565b8460005b8181101561039057600088888381811061025c57fe5b905060200281019061026e9190610d43565b905011156102c4576102a886868381811061028557fe5b905060200201602081019061029a9190610a34565b6001600160a01b031661080d565b6102c45760405162461bcd60e51b81526004016101c290610c34565b60008686838181106102d257fe5b90506020020160208101906102e79190610a34565b6001600160a01b03168585848181106102fc57fe5b905060200201358a8a8581811061030f57fe5b90506020028101906103219190610d43565b60405161032f929190610c05565b60006040518083038185875af1925050503d806000811461036c576040519150601f19603f3d011682016040523d82523d6000602084013e610371565b606091505b5050905080610387576040513d806000833e8082fd5b50600101610246565b5050505050505050565b600054610100900460ff16806103b357506103b3610813565b806103c1575060005460ff16155b6103dd5760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610408576000805460ff1961ff0019909116610100171660011790555b610410610824565b8015610422576000805461ff00191690555b50565b61042d610809565b6001600160a01b031661043e61053e565b6001600160a01b0316146104645760405162461bcd60e51b81526004016101c290610cf1565b8060005b818110156105385783838281811061047c57fe5b90506020020160208101906104919190610a34565b6001600160a01b03166370dea79a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156104cb57600080fd5b505af19250505080156104dc575060015b610530573d80801561050a576040519150601f19603f3d011682016040523d82523d6000602084013e61050f565b606091505b50805161052e5760405162461bcd60e51b81526004016101c290610d26565b505b600101610468565b50505050565b6033546001600160a01b031690565b610555610809565b6001600160a01b031661056661053e565b6001600160a01b03161461058c5760405162461bcd60e51b81526004016101c290610cf1565b8060005b8181101561066b57846001600160a01b0316637427be518585848181106105b357fe5b90506020020160208101906105c89190610a34565b6040518263ffffffff1660e01b81526004016105e49190610c15565b600060405180830381600087803b1580156105fe57600080fd5b505af192505050801561060f575060015b610663573d80801561063d576040519150601f19603f3d011682016040523d82523d6000602084013e610642565b606091505b5080516106615760405162461bcd60e51b81526004016101c290610d26565b505b600101610590565b5050505050565b61067a610809565b6001600160a01b031661068b61053e565b6001600160a01b0316146106b15760405162461bcd60e51b81526004016101c290610cf1565b82156106e5576106c9826001600160a01b031661080d565b6106e55760405162461bcd60e51b81526004016101c290610c34565b6000826001600160a01b0316828686604051610702929190610c05565b60006040518083038185875af1925050503d806000811461073f576040519150601f19603f3d011682016040523d82523d6000602084013e610744565b606091505b505090508061066b576040513d806000833e8082fd5b610762610809565b6001600160a01b031661077361053e565b6001600160a01b0316146107995760405162461bcd60e51b81526004016101c290610cf1565b6001600160a01b0381166107bf5760405162461bcd60e51b81526004016101c290610c5d565b6033546040516001600160a01b03808416921690600080516020610da083398151915290600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b3b151590565b600061081e3061080d565b15905090565b600054610100900460ff168061083d575061083d610813565b8061084b575060005460ff16155b6108675760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610892576000805460ff1961ff0019909116610100171660011790555b61089a6108a2565b610410610923565b600054610100900460ff16806108bb57506108bb610813565b806108c9575060005460ff16155b6108e55760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610410576000805460ff1961ff0019909116610100171660011790558015610422576000805461ff001916905550565b600054610100900460ff168061093c575061093c610813565b8061094a575060005460ff16155b6109665760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610991576000805460ff1961ff0019909116610100171660011790555b600061099b610809565b603380546001600160a01b0319166001600160a01b03831690811790915560405191925090600090600080516020610da0833981519152908290a3508015610422576000805461ff001916905550565b60008083601f8401126109fc578182fd5b50813567ffffffffffffffff811115610a13578182fd5b6020830191508360208083028501011115610a2d57600080fd5b9250929050565b600060208284031215610a45578081fd5b8135610a5081610d8a565b9392505050565b60008060008060008060608789031215610a6f578182fd5b863567ffffffffffffffff80821115610a86578384fd5b610a928a838b016109eb565b90985096506020890135915080821115610aaa578384fd5b610ab68a838b016109eb565b90965094506040890135915080821115610ace578384fd5b50610adb89828a016109eb565b979a9699509497509295939492505050565b60008060208385031215610aff578182fd5b823567ffffffffffffffff811115610b15578283fd5b610b21858286016109eb565b90969095509350505050565b60008060008060608587031215610b42578384fd5b843567ffffffffffffffff80821115610b59578586fd5b81870188601f820112610b6a578687fd5b8035925081831115610b7a578687fd5b886020848301011115610b8b578687fd5b6020908101965091945050850135610ba281610d8a565b9396929550929360400135925050565b600080600060408486031215610bc6578283fd5b8335610bd181610d8a565b9250602084013567ffffffffffffffff811115610bec578283fd5b610bf8868287016109eb565b9497909650939450505050565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6020808252600f908201526e2727afa1a7a222afa0aa2fa0a2222960891b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526003908201526247415360e81b604082015260600190565b6000808335601e19843603018112610d59578283fd5b8084018035925067ffffffffffffffff831115610d74578384fd5b60200192505036819003821315610a2d57600080fd5b6001600160a01b038116811461042257600080fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220cd27ebce9eb324f23b3322b3856e1c897dec4408834151f9d879f73fb5c380d264736f6c634300060b0033", } // ValidatorABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgecontracts/ValidatorUtils.go b/packages/arb-util/ethbridgecontracts/ValidatorUtils.go index 4b5f421981..f377534fd4 100755 --- a/packages/arb-util/ethbridgecontracts/ValidatorUtils.go +++ b/packages/arb-util/ethbridgecontracts/ValidatorUtils.go @@ -31,7 +31,7 @@ var ( // ValidatorUtilsMetaData contains all meta data concerning the ValidatorUtils contract. var ValidatorUtilsMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"}],\"name\":\"areUnresolvedNodesLinear\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"}],\"name\":\"checkDecidableNextNode\",\"outputs\":[{\"internalType\":\"enumValidatorUtils.ConfirmType\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"node1\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"node2\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxDepth\",\"type\":\"uint256\"}],\"name\":\"findNodeConflict\",\"outputs\":[{\"internalType\":\"enumValidatorUtils.NodeConflict\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"staker1\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"staker2\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxDepth\",\"type\":\"uint256\"}],\"name\":\"findStakerConflict\",\"outputs\":[{\"internalType\":\"enumValidatorUtils.NodeConflict\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"confirmPeriodBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"extraChallengeTimeBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"avmGasSpeedLimitPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseStake\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"getStakers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bool\",\"name\":\"hasMore\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"latestStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"}],\"name\":\"refundableStakers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"}],\"name\":\"requireConfirmable\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"}],\"name\":\"requireRejectable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakedNodes\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"stakerAddress\",\"type\":\"address\"}],\"name\":\"stakerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isStaked\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"latestStakedNode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountStaked\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"currentChallenge\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractRollup\",\"name\":\"rollup\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"timedOutChallenges\",\"outputs\":[{\"internalType\":\"contractIChallenge[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"bool\",\"name\":\"hasMore\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50612941806100206000396000f3fe608060405234801561001057600080fd5b50600436106100bf5760003560e01c80637988ad371161007c5780637988ad37146101855780638f67e6bb14610198578063a8ac9cf3146101bb578063abeba4f7146101dc578063aea2f06e146101fd578063c308eaaf14610210578063e48a5f7b14610230576100bf565b806301d9717d146100c45780630a46c1b5146100ee5780631fc43bb61461010e5780633082d0291461012357806371229340146101455780637464ae0614610165575b600080fd5b6100d76100d236600461257e565b610253565b6040516100e59291906128ca565b60405180910390f35b6101016100fc366004612562565b6103db565b6040516100e591906127cb565b61012161011c366004612562565b6104bd565b005b61013661013136600461263a565b610a3f565b6040516100e5939291906127df565b610158610153366004612562565b610f12565b6040516100e5919061279a565b610178610173366004612562565b61141f565b6040516100e591906126cb565b6101366101933660046125b6565b611739565b6101ab6101a636600461257e565b61185b565b6040516100e594939291906127a5565b6101ce6101c9366004612606565b611a61565b6040516100e5929190612702565b6101ef6101ea366004612606565b611d3c565b6040516100e59291906126de565b61015861020b366004612562565b611ecd565b61022361021e36600461257e565b6120e2565b6040516100e59190612756565b61024361023e366004612562565b612335565b6040516100e594939291906128d8565b6000806000846001600160a01b0316633e96576e856040518263ffffffff1660e01b815260040161028491906126b7565b60206040518083038186803b15801561029c57600080fd5b505afa1580156102b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d4919061254a565b90508061034f57846001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031457600080fd5b505afa158015610328573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034c919061254a565b90505b604051633e347c6560e21b81526000906001600160a01b0387169063f8d1f1949061037e9085906004016128c1565b60206040518083038186803b15801561039657600080fd5b505afa1580156103aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ce919061254a565b9196919550909350505050565b604051630fe21ddb60e11b81526000903090631fc43bb6906104019085906004016126b7565b60006040518083038186803b15801561041957600080fd5b505afa92505050801561042a575060015b6104335761043b565b5060016104b8565b6040516301c48a4d60e61b8152309063712293409061045e9085906004016126b7565b60206040518083038186803b15801561047657600080fd5b505afa9250505080156104a6575060408051601f3d908101601f191682019092526104a39181019061252a565b60015b6104b2575060006104b8565b50600290505b919050565b806001600160a01b03166367425daf6040518163ffffffff1660e01b815260040160006040518083038186803b1580156104f657600080fd5b505afa15801561050a573d6000803e3d6000fd5b505050506000816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b15801561054957600080fd5b505afa15801561055d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610581919061254a565b9050600081116105ac5760405162461bcd60e51b81526004016105a390612826565b60405180910390fd5b6000826001600160a01b031663d735e21d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e757600080fd5b505afa1580156105fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061f919061254a565b90506000836001600160a01b0316634f0f4aa9836040518263ffffffff1660e01b815260040161064f91906128c1565b60206040518083038186803b15801561066757600080fd5b505afa15801561067b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069f919061250e565b9050806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b1580156106da57600080fd5b505afa1580156106ee573d6000803e3d6000fd5b50505050836001600160a01b0316634f0f4aa9826001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561073a57600080fd5b505afa15801561074e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610772919061254a565b6040518263ffffffff1660e01b815260040161078e91906128c1565b60206040518083038186803b1580156107a657600080fd5b505afa1580156107ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107de919061250e565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b15801561081657600080fd5b505afa15801561082a573d6000803e3d6000fd5b50505050836001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561086757600080fd5b505afa15801561087b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089f919061254a565b816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156108d857600080fd5b505afa1580156108ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610910919061254a565b1461092d5760405162461bcd60e51b81526004016105a390612872565b604051630128a01960e21b81526001600160a01b038516906304a28064906109599084906004016126b7565b60206040518083038186803b15801561097157600080fd5b505afa158015610985573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a9919061254a565b8301816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b1580156109e457600080fd5b505afa1580156109f8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1c919061254a565b14610a395760405162461bcd60e51b81526004016105a39061284a565b50505050565b600080600080876001600160a01b031663d735e21d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7e57600080fd5b505afa158015610a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab6919061254a565b90506000886001600160a01b0316634f0f4aa9896040518263ffffffff1660e01b8152600401610ae691906128c1565b60206040518083038186803b158015610afe57600080fd5b505afa158015610b12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b36919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6e57600080fd5b505afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba6919061254a565b90506000896001600160a01b0316634f0f4aa9896040518263ffffffff1660e01b8152600401610bd691906128c1565b60206040518083038186803b158015610bee57600080fd5b505afa158015610c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c26919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5e57600080fd5b505afa158015610c72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c96919061254a565b905060005b87811015610ef957888a1415610cbe5760008a8a96509650965050505050610f08565b81831415610cd95760018a8a96509650965050505050610f08565b8383108015610ce757508382105b15610d0157506002955060009450849350610f0892505050565b81831015610dff578198508a6001600160a01b0316634f0f4aa98a6040518263ffffffff1660e01b8152600401610d3891906128c1565b60206040518083038186803b158015610d5057600080fd5b505afa158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d88919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015610dc057600080fd5b505afa158015610dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df8919061254a565b9150610ef1565b8299508a6001600160a01b0316634f0f4aa98b6040518263ffffffff1660e01b8152600401610e2e91906128c1565b60206040518083038186803b158015610e4657600080fd5b505afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015610eb657600080fd5b505afa158015610eca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eee919061254a565b92505b600101610c9b565b50600389899550955095505050505b9450945094915050565b6000816001600160a01b03166367425daf6040518163ffffffff1660e01b815260040160006040518083038186803b158015610f4d57600080fd5b505afa158015610f61573d6000803e3d6000fd5b505050506000826001600160a01b0316634f0f4aa9846001600160a01b031663d735e21d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610faf57600080fd5b505afa158015610fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe7919061254a565b6040518263ffffffff1660e01b815260040161100391906128c1565b60206040518083038186803b15801561101b57600080fd5b505afa15801561102f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611053919061250e565b90506000836001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561109057600080fd5b505afa1580156110a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c8919061254a565b826001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561110157600080fd5b505afa158015611115573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611139919061254a565b149050801561141857816001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561117b57600080fd5b505afa15801561118f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b3919061254a565b4310156111d25760405162461bcd60e51b81526004016105a390612898565b836001600160a01b0316634f0f4aa9836001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561121a57600080fd5b505afa15801561122e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611252919061254a565b6040518263ffffffff1660e01b815260040161126e91906128c1565b60206040518083038186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112be919061250e565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b1580156112f657600080fd5b505afa15801561130a573d6000803e3d6000fd5b5050604051630128a01960e21b81526001600160a01b03871692506304a28064915061133a9085906004016126b7565b60206040518083038186803b15801561135257600080fd5b505afa158015611366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138a919061254a565b826001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b1580156113c357600080fd5b505afa1580156113d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fb919061254a565b146114185760405162461bcd60e51b81526004016105a390612801565b9392505050565b60606000826001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b15801561145c57600080fd5b505afa158015611470573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611494919061254a565b905060608167ffffffffffffffff811180156114af57600080fd5b506040519080825280602002602001820160405280156114d9578160200160208202803683370190505b5090506000846001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561151757600080fd5b505afa15801561152b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154f919061254a565b90506000805b8481101561172e576040516362a82d7d60e01b81526000906001600160a01b038916906362a82d7d9061158c9085906004016128c1565b60206040518083038186803b1580156115a457600080fd5b505afa1580156115b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115dc919061250e565b90506000886001600160a01b0316633e96576e836040518263ffffffff1660e01b815260040161160c91906126b7565b60206040518083038186803b15801561162457600080fd5b505afa158015611638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165c919061254a565b90508481111580156116f35750604051631a7f494760e21b81526000906001600160a01b038b16906369fd251c906116989086906004016126b7565b60206040518083038186803b1580156116b057600080fd5b505afa1580156116c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e8919061250e565b6001600160a01b0316145b15611724578186858151811061170557fe5b6001600160a01b03909216602092830291909101909101526001909301925b5050600101611555565b508252509392505050565b600080600080876001600160a01b0316633e96576e886040518263ffffffff1660e01b815260040161176b91906126b7565b60206040518083038186803b15801561178357600080fd5b505afa158015611797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bb919061254a565b90506000886001600160a01b0316633e96576e886040518263ffffffff1660e01b81526004016117eb91906126b7565b60206040518083038186803b15801561180357600080fd5b505afa158015611817573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183b919061254a565b905061184989838389610a3f565b94509450945050509450945094915050565b600080600080856001600160a01b0316636177fd18866040518263ffffffff1660e01b815260040161188d91906126b7565b60206040518083038186803b1580156118a557600080fd5b505afa1580156118b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118dd919061252a565b604051631f4b2bb760e11b81526001600160a01b03881690633e96576e906119099089906004016126b7565b60206040518083038186803b15801561192157600080fd5b505afa158015611935573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611959919061254a565b604051630ef40a6760e41b81526001600160a01b0389169063ef40a67090611985908a906004016126b7565b60206040518083038186803b15801561199d57600080fd5b505afa1580156119b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d5919061254a565b604051631a7f494760e21b81526001600160a01b038a16906369fd251c90611a01908b906004016126b7565b60206040518083038186803b158015611a1957600080fd5b505afa158015611a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a51919061250e565b9299919850965090945092505050565b6060600060606000611a74878787611d3c565b915091506060825167ffffffffffffffff81118015611a9257600080fd5b50604051908082528060200260200182016040528015611abc578160200160208202803683370190505b5090506000805b8451811015611d2d576000858281518110611ada57fe5b6020026020010151905060008b6001600160a01b03166369fd251c836040518263ffffffff1660e01b8152600401611b1291906126b7565b60206040518083038186803b158015611b2a57600080fd5b505afa158015611b3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b62919061250e565b90506001600160a01b03811615611d235760008190506000816001600160a01b031663925f9a966040518163ffffffff1660e01b815260040160206040518083038186803b158015611bb357600080fd5b505afa158015611bc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611beb919061254a565b43039050816001600160a01b031663e87e35896040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2857600080fd5b505afa158015611c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c60919061254a565b81118015611cef5750836001600160a01b0316826001600160a01b031663bb4af0b16040518163ffffffff1660e01b815260040160206040518083038186803b158015611cac57600080fd5b505afa158015611cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce4919061250e565b6001600160a01b0316145b15611d205781878781518110611d0157fe5b6001600160a01b03909216602092830291909101909101526001909501945b50505b5050600101611ac3565b50815297909650945050505050565b6060600080856001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7a57600080fd5b505afa158015611d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db2919061254a565b90508084860111611dc65750600190508383015b60608167ffffffffffffffff81118015611ddf57600080fd5b50604051908082528060200260200182016040528015611e09578160200160208202803683370190505b50905060005b82811015611ec1576040516362a82d7d60e01b81526001600160a01b038916906362a82d7d90611e45908a8501906004016128c1565b60206040518083038186803b158015611e5d57600080fd5b505afa158015611e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e95919061250e565b828281518110611ea157fe5b6001600160a01b0390921660209283029190910190910152600101611e0f565b50925050935093915050565b600080826001600160a01b0316637ba9534a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f0957600080fd5b505afa158015611f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f41919061254a565b90506000836001600160a01b031663d735e21d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f7e57600080fd5b505afa158015611f92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb6919061254a565b90505b8181116120d8576000811180156120c05750604051634f0f4aa960e01b81526000198201906001600160a01b03861690634f0f4aa990611ffd9085906004016128c1565b60206040518083038186803b15801561201557600080fd5b505afa158015612029573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204d919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561208557600080fd5b505afa158015612099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120bd919061254a565b14155b156120d0576000925050506104b8565b600101611fb9565b5060019392505050565b60408051620186a08082526230d4208201909252606091829190602082016230d4008036833701905050905060008090506000856001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214e57600080fd5b505afa158015612162573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612186919061254a565b90505b856001600160a01b0316637ba9534a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c257600080fd5b505afa1580156121d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121fa919061254a565b811161232b57604051634f0f4aa960e01b81526000906001600160a01b03881690634f0f4aa99061222f9085906004016128c1565b60206040518083038186803b15801561224757600080fd5b505afa15801561225b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061227f919061250e565b6040516348b4573960e11b81529091506001600160a01b03821690639168ae72906122ae9089906004016126b7565b60206040518083038186803b1580156122c657600080fd5b505afa1580156122da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122fe919061252a565b15612322578184848151811061231057fe5b60209081029190910101526001909201915b50600101612189565b5081529392505050565b600080600080846001600160a01b0316632e7acfa66040518163ffffffff1660e01b815260040160206040518083038186803b15801561237457600080fd5b505afa158015612388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ac919061254a565b9350846001600160a01b031663771b2f976040518163ffffffff1660e01b815260040160206040518083038186803b1580156123e757600080fd5b505afa1580156123fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061241f919061254a565b9250846001600160a01b031663d7445bc86040518163ffffffff1660e01b815260040160206040518083038186803b15801561245a57600080fd5b505afa15801561246e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612492919061254a565b9150846001600160a01b03166376e7e23b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156124cd57600080fd5b505afa1580156124e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612505919061254a565b90509193509193565b60006020828403121561251f578081fd5b8151611418816128f3565b60006020828403121561253b578081fd5b81518015158114611418578182fd5b60006020828403121561255b578081fd5b5051919050565b600060208284031215612573578081fd5b8135611418816128f3565b60008060408385031215612590578081fd5b823561259b816128f3565b915060208301356125ab816128f3565b809150509250929050565b600080600080608085870312156125cb578182fd5b84356125d6816128f3565b935060208501356125e6816128f3565b925060408501356125f6816128f3565b9396929550929360600135925050565b60008060006060848603121561261a578283fd5b8335612625816128f3565b95602085013595506040909401359392505050565b6000806000806080858703121561264f578384fd5b843561265a816128f3565b966020860135965060408601359560600135945092505050565b6000815180845260208085019450808401835b838110156126ac5781516001600160a01b031687529582019590820190600101612687565b509495945050505050565b6001600160a01b0391909116815260200190565b6000602082526114186020830184612674565b6000604082526126f16040830185612674565b905082151560208301529392505050565b604080825283519082018190526000906020906060840190828701845b828110156127445781516001600160a01b03168452928401929084019060010161271f565b50505093151592019190915250919050565b6020808252825182820181905260009190848201906040850190845b8181101561278e57835183529284019291840191600101612772565b50909695505050505050565b901515815260200190565b9315158452602084019290925260408301526001600160a01b0316606082015260800190565b60208101600383106127d957fe5b91905290565b60608101600485106127ed57fe5b938152602081019290925260409091015290565b6020808252600b908201526a4841535f5354414b45525360a81b604082015260600190565b6020808252600a90820152694e4f5f5354414b45525360b01b604082015260600190565b6020808252600e908201526d1393d517d0531317d4d51052d15160921b604082015260600190565b6020808252600c908201526b24a72b20a624a22fa82922ab60a11b604082015260600190565b6020808252600f908201526e4245464f52455f444541444c494e4560881b604082015260600190565b90815260200190565b918252602082015260400190565b93845260208401929092526040830152606082015260800190565b6001600160a01b038116811461290857600080fd5b5056fea2646970667358221220d6259d42230137ba02cde3b28622c550cef8a9dde8a31f0578dbece6379cd07564736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b50612941806100206000396000f3fe608060405234801561001057600080fd5b50600436106100bf5760003560e01c80637988ad371161007c5780637988ad37146101855780638f67e6bb14610198578063a8ac9cf3146101bb578063abeba4f7146101dc578063aea2f06e146101fd578063c308eaaf14610210578063e48a5f7b14610230576100bf565b806301d9717d146100c45780630a46c1b5146100ee5780631fc43bb61461010e5780633082d0291461012357806371229340146101455780637464ae0614610165575b600080fd5b6100d76100d236600461257e565b610253565b6040516100e59291906128ca565b60405180910390f35b6101016100fc366004612562565b6103db565b6040516100e591906127cb565b61012161011c366004612562565b6104bd565b005b61013661013136600461263a565b610a3f565b6040516100e5939291906127df565b610158610153366004612562565b610f12565b6040516100e5919061279a565b610178610173366004612562565b61141f565b6040516100e591906126cb565b6101366101933660046125b6565b611739565b6101ab6101a636600461257e565b61185b565b6040516100e594939291906127a5565b6101ce6101c9366004612606565b611a61565b6040516100e5929190612702565b6101ef6101ea366004612606565b611d3c565b6040516100e59291906126de565b61015861020b366004612562565b611ecd565b61022361021e36600461257e565b6120e2565b6040516100e59190612756565b61024361023e366004612562565b612335565b6040516100e594939291906128d8565b6000806000846001600160a01b0316633e96576e856040518263ffffffff1660e01b815260040161028491906126b7565b60206040518083038186803b15801561029c57600080fd5b505afa1580156102b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d4919061254a565b90508061034f57846001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031457600080fd5b505afa158015610328573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034c919061254a565b90505b604051633e347c6560e21b81526000906001600160a01b0387169063f8d1f1949061037e9085906004016128c1565b60206040518083038186803b15801561039657600080fd5b505afa1580156103aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ce919061254a565b9196919550909350505050565b604051630fe21ddb60e11b81526000903090631fc43bb6906104019085906004016126b7565b60006040518083038186803b15801561041957600080fd5b505afa92505050801561042a575060015b6104335761043b565b5060016104b8565b6040516301c48a4d60e61b8152309063712293409061045e9085906004016126b7565b60206040518083038186803b15801561047657600080fd5b505afa9250505080156104a6575060408051601f3d908101601f191682019092526104a39181019061252a565b60015b6104b2575060006104b8565b50600290505b919050565b806001600160a01b03166367425daf6040518163ffffffff1660e01b815260040160006040518083038186803b1580156104f657600080fd5b505afa15801561050a573d6000803e3d6000fd5b505050506000816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b15801561054957600080fd5b505afa15801561055d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610581919061254a565b9050600081116105ac5760405162461bcd60e51b81526004016105a390612826565b60405180910390fd5b6000826001600160a01b031663d735e21d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e757600080fd5b505afa1580156105fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061f919061254a565b90506000836001600160a01b0316634f0f4aa9836040518263ffffffff1660e01b815260040161064f91906128c1565b60206040518083038186803b15801561066757600080fd5b505afa15801561067b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069f919061250e565b9050806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b1580156106da57600080fd5b505afa1580156106ee573d6000803e3d6000fd5b50505050836001600160a01b0316634f0f4aa9826001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561073a57600080fd5b505afa15801561074e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610772919061254a565b6040518263ffffffff1660e01b815260040161078e91906128c1565b60206040518083038186803b1580156107a657600080fd5b505afa1580156107ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107de919061250e565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b15801561081657600080fd5b505afa15801561082a573d6000803e3d6000fd5b50505050836001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561086757600080fd5b505afa15801561087b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089f919061254a565b816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156108d857600080fd5b505afa1580156108ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610910919061254a565b1461092d5760405162461bcd60e51b81526004016105a390612872565b604051630128a01960e21b81526001600160a01b038516906304a28064906109599084906004016126b7565b60206040518083038186803b15801561097157600080fd5b505afa158015610985573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a9919061254a565b8301816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b1580156109e457600080fd5b505afa1580156109f8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1c919061254a565b14610a395760405162461bcd60e51b81526004016105a39061284a565b50505050565b600080600080876001600160a01b031663d735e21d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7e57600080fd5b505afa158015610a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab6919061254a565b90506000886001600160a01b0316634f0f4aa9896040518263ffffffff1660e01b8152600401610ae691906128c1565b60206040518083038186803b158015610afe57600080fd5b505afa158015610b12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b36919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6e57600080fd5b505afa158015610b82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba6919061254a565b90506000896001600160a01b0316634f0f4aa9896040518263ffffffff1660e01b8152600401610bd691906128c1565b60206040518083038186803b158015610bee57600080fd5b505afa158015610c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c26919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5e57600080fd5b505afa158015610c72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c96919061254a565b905060005b87811015610ef957888a1415610cbe5760008a8a96509650965050505050610f08565b81831415610cd95760018a8a96509650965050505050610f08565b8383108015610ce757508382105b15610d0157506002955060009450849350610f0892505050565b81831015610dff578198508a6001600160a01b0316634f0f4aa98a6040518263ffffffff1660e01b8152600401610d3891906128c1565b60206040518083038186803b158015610d5057600080fd5b505afa158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d88919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015610dc057600080fd5b505afa158015610dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df8919061254a565b9150610ef1565b8299508a6001600160a01b0316634f0f4aa98b6040518263ffffffff1660e01b8152600401610e2e91906128c1565b60206040518083038186803b158015610e4657600080fd5b505afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015610eb657600080fd5b505afa158015610eca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eee919061254a565b92505b600101610c9b565b50600389899550955095505050505b9450945094915050565b6000816001600160a01b03166367425daf6040518163ffffffff1660e01b815260040160006040518083038186803b158015610f4d57600080fd5b505afa158015610f61573d6000803e3d6000fd5b505050506000826001600160a01b0316634f0f4aa9846001600160a01b031663d735e21d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610faf57600080fd5b505afa158015610fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe7919061254a565b6040518263ffffffff1660e01b815260040161100391906128c1565b60206040518083038186803b15801561101b57600080fd5b505afa15801561102f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611053919061250e565b90506000836001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561109057600080fd5b505afa1580156110a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c8919061254a565b826001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561110157600080fd5b505afa158015611115573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611139919061254a565b149050801561141857816001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561117b57600080fd5b505afa15801561118f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b3919061254a565b4310156111d25760405162461bcd60e51b81526004016105a390612898565b836001600160a01b0316634f0f4aa9836001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561121a57600080fd5b505afa15801561122e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611252919061254a565b6040518263ffffffff1660e01b815260040161126e91906128c1565b60206040518083038186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112be919061250e565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b1580156112f657600080fd5b505afa15801561130a573d6000803e3d6000fd5b5050604051630128a01960e21b81526001600160a01b03871692506304a28064915061133a9085906004016126b7565b60206040518083038186803b15801561135257600080fd5b505afa158015611366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138a919061254a565b826001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b1580156113c357600080fd5b505afa1580156113d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fb919061254a565b146114185760405162461bcd60e51b81526004016105a390612801565b9392505050565b60606000826001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b15801561145c57600080fd5b505afa158015611470573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611494919061254a565b905060608167ffffffffffffffff811180156114af57600080fd5b506040519080825280602002602001820160405280156114d9578160200160208202803683370190505b5090506000846001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561151757600080fd5b505afa15801561152b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154f919061254a565b90506000805b8481101561172e576040516362a82d7d60e01b81526000906001600160a01b038916906362a82d7d9061158c9085906004016128c1565b60206040518083038186803b1580156115a457600080fd5b505afa1580156115b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115dc919061250e565b90506000886001600160a01b0316633e96576e836040518263ffffffff1660e01b815260040161160c91906126b7565b60206040518083038186803b15801561162457600080fd5b505afa158015611638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165c919061254a565b90508481111580156116f35750604051631a7f494760e21b81526000906001600160a01b038b16906369fd251c906116989086906004016126b7565b60206040518083038186803b1580156116b057600080fd5b505afa1580156116c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e8919061250e565b6001600160a01b0316145b15611724578186858151811061170557fe5b6001600160a01b03909216602092830291909101909101526001909301925b5050600101611555565b508252509392505050565b600080600080876001600160a01b0316633e96576e886040518263ffffffff1660e01b815260040161176b91906126b7565b60206040518083038186803b15801561178357600080fd5b505afa158015611797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bb919061254a565b90506000886001600160a01b0316633e96576e886040518263ffffffff1660e01b81526004016117eb91906126b7565b60206040518083038186803b15801561180357600080fd5b505afa158015611817573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183b919061254a565b905061184989838389610a3f565b94509450945050509450945094915050565b600080600080856001600160a01b0316636177fd18866040518263ffffffff1660e01b815260040161188d91906126b7565b60206040518083038186803b1580156118a557600080fd5b505afa1580156118b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118dd919061252a565b604051631f4b2bb760e11b81526001600160a01b03881690633e96576e906119099089906004016126b7565b60206040518083038186803b15801561192157600080fd5b505afa158015611935573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611959919061254a565b604051630ef40a6760e41b81526001600160a01b0389169063ef40a67090611985908a906004016126b7565b60206040518083038186803b15801561199d57600080fd5b505afa1580156119b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d5919061254a565b604051631a7f494760e21b81526001600160a01b038a16906369fd251c90611a01908b906004016126b7565b60206040518083038186803b158015611a1957600080fd5b505afa158015611a2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a51919061250e565b9299919850965090945092505050565b6060600060606000611a74878787611d3c565b915091506060825167ffffffffffffffff81118015611a9257600080fd5b50604051908082528060200260200182016040528015611abc578160200160208202803683370190505b5090506000805b8451811015611d2d576000858281518110611ada57fe5b6020026020010151905060008b6001600160a01b03166369fd251c836040518263ffffffff1660e01b8152600401611b1291906126b7565b60206040518083038186803b158015611b2a57600080fd5b505afa158015611b3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b62919061250e565b90506001600160a01b03811615611d235760008190506000816001600160a01b031663925f9a966040518163ffffffff1660e01b815260040160206040518083038186803b158015611bb357600080fd5b505afa158015611bc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611beb919061254a565b43039050816001600160a01b031663e87e35896040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2857600080fd5b505afa158015611c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c60919061254a565b81118015611cef5750836001600160a01b0316826001600160a01b031663bb4af0b16040518163ffffffff1660e01b815260040160206040518083038186803b158015611cac57600080fd5b505afa158015611cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce4919061250e565b6001600160a01b0316145b15611d205781878781518110611d0157fe5b6001600160a01b03909216602092830291909101909101526001909501945b50505b5050600101611ac3565b50815297909650945050505050565b6060600080856001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7a57600080fd5b505afa158015611d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db2919061254a565b90508084860111611dc65750600190508383015b60608167ffffffffffffffff81118015611ddf57600080fd5b50604051908082528060200260200182016040528015611e09578160200160208202803683370190505b50905060005b82811015611ec1576040516362a82d7d60e01b81526001600160a01b038916906362a82d7d90611e45908a8501906004016128c1565b60206040518083038186803b158015611e5d57600080fd5b505afa158015611e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e95919061250e565b828281518110611ea157fe5b6001600160a01b0390921660209283029190910190910152600101611e0f565b50925050935093915050565b600080826001600160a01b0316637ba9534a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f0957600080fd5b505afa158015611f1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f41919061254a565b90506000836001600160a01b031663d735e21d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f7e57600080fd5b505afa158015611f92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb6919061254a565b90505b8181116120d8576000811180156120c05750604051634f0f4aa960e01b81526000198201906001600160a01b03861690634f0f4aa990611ffd9085906004016128c1565b60206040518083038186803b15801561201557600080fd5b505afa158015612029573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204d919061250e565b6001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561208557600080fd5b505afa158015612099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120bd919061254a565b14155b156120d0576000925050506104b8565b600101611fb9565b5060019392505050565b60408051620186a08082526230d4208201909252606091829190602082016230d4008036833701905050905060008090506000856001600160a01b03166365f7f80d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561214e57600080fd5b505afa158015612162573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612186919061254a565b90505b856001600160a01b0316637ba9534a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121c257600080fd5b505afa1580156121d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121fa919061254a565b811161232b57604051634f0f4aa960e01b81526000906001600160a01b03881690634f0f4aa99061222f9085906004016128c1565b60206040518083038186803b15801561224757600080fd5b505afa15801561225b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061227f919061250e565b6040516348b4573960e11b81529091506001600160a01b03821690639168ae72906122ae9089906004016126b7565b60206040518083038186803b1580156122c657600080fd5b505afa1580156122da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122fe919061252a565b15612322578184848151811061231057fe5b60209081029190910101526001909201915b50600101612189565b5081529392505050565b600080600080846001600160a01b0316632e7acfa66040518163ffffffff1660e01b815260040160206040518083038186803b15801561237457600080fd5b505afa158015612388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ac919061254a565b9350846001600160a01b031663771b2f976040518163ffffffff1660e01b815260040160206040518083038186803b1580156123e757600080fd5b505afa1580156123fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061241f919061254a565b9250846001600160a01b031663d7445bc86040518163ffffffff1660e01b815260040160206040518083038186803b15801561245a57600080fd5b505afa15801561246e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612492919061254a565b9150846001600160a01b03166376e7e23b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156124cd57600080fd5b505afa1580156124e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612505919061254a565b90509193509193565b60006020828403121561251f578081fd5b8151611418816128f3565b60006020828403121561253b578081fd5b81518015158114611418578182fd5b60006020828403121561255b578081fd5b5051919050565b600060208284031215612573578081fd5b8135611418816128f3565b60008060408385031215612590578081fd5b823561259b816128f3565b915060208301356125ab816128f3565b809150509250929050565b600080600080608085870312156125cb578182fd5b84356125d6816128f3565b935060208501356125e6816128f3565b925060408501356125f6816128f3565b9396929550929360600135925050565b60008060006060848603121561261a578283fd5b8335612625816128f3565b95602085013595506040909401359392505050565b6000806000806080858703121561264f578384fd5b843561265a816128f3565b966020860135965060408601359560600135945092505050565b6000815180845260208085019450808401835b838110156126ac5781516001600160a01b031687529582019590820190600101612687565b509495945050505050565b6001600160a01b0391909116815260200190565b6000602082526114186020830184612674565b6000604082526126f16040830185612674565b905082151560208301529392505050565b604080825283519082018190526000906020906060840190828701845b828110156127445781516001600160a01b03168452928401929084019060010161271f565b50505093151592019190915250919050565b6020808252825182820181905260009190848201906040850190845b8181101561278e57835183529284019291840191600101612772565b50909695505050505050565b901515815260200190565b9315158452602084019290925260408301526001600160a01b0316606082015260800190565b60208101600383106127d957fe5b91905290565b60608101600485106127ed57fe5b938152602081019290925260409091015290565b6020808252600b908201526a4841535f5354414b45525360a81b604082015260600190565b6020808252600a90820152694e4f5f5354414b45525360b01b604082015260600190565b6020808252600e908201526d1393d517d0531317d4d51052d15160921b604082015260600190565b6020808252600c908201526b24a72b20a624a22fa82922ab60a11b604082015260600190565b6020808252600f908201526e4245464f52455f444541444c494e4560881b604082015260600190565b90815260200190565b918252602082015260400190565b93845260208401929092526040830152606082015260800190565b6001600160a01b038116811461290857600080fd5b5056fea26469706673582212204a4bc4a4e97b7ee495484e3fa23c34c4429a94e2aea2e923f1b291b8676de2e664736f6c634300060b0033", } // ValidatorUtilsABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgecontracts/ValidatorWalletCreator.go b/packages/arb-util/ethbridgecontracts/ValidatorWalletCreator.go index 56582235c5..612e2a9d92 100755 --- a/packages/arb-util/ethbridgecontracts/ValidatorWalletCreator.go +++ b/packages/arb-util/ethbridgecontracts/ValidatorWalletCreator.go @@ -31,7 +31,7 @@ var ( // ValidatorWalletCreatorMetaData contains all meta data concerning the ValidatorWalletCreator contract. var ValidatorWalletCreatorMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"TemplateUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"walletAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminProxy\",\"type\":\"address\"}],\"name\":\"WalletCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"createWallet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_template\",\"type\":\"address\"}],\"name\":\"setTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"template\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5060006100246001600160e01b036100bc16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060405161007a906100c0565b604051809103906000f080158015610096573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b03929092169190911790556100cd565b3390565b610e2280611d4083390190565b611c64806100dc6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806311ebbf24146100675780636f2ddd931461008b578063715018a61461009357806389c716d11461009d5780638da5cb5b146100c3578063f2fde38b146100cb575b600080fd5b61006f6100f1565b604080516001600160a01b039092168252519081900360200190f35b61006f6102e3565b61009b6102f2565b005b61009b600480360360208110156100b357600080fd5b50356001600160a01b031661039f565b61006f610449565b61009b600480360360208110156100e157600080fd5b50356001600160a01b0316610458565b60008060405161010090610560565b604051809103906000f08015801561011c573d6000803e3d6000fd5b506001546040519192506000916001600160a01b039091169083906101409061056e565b6001600160a01b03928316815291166020820152606060408083018290526000918301829052519182900360a0019190f080158015610183573d6000803e3d6000fd5b506040805163f2fde38b60e01b815233600482015290519192506001600160a01b0384169163f2fde38b9160248082019260009290919082900301818387803b1580156101cf57600080fd5b505af11580156101e3573d6000803e3d6000fd5b50505050806001600160a01b0316638129fc1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561022257600080fd5b505af1158015610236573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b15801561028157600080fd5b505af1158015610295573d6000803e3d6000fd5b5050604080516001600160a01b038681168252915133945091851692507fca0b7dde26052d34217ef1a0cee48085a07ca32da0a918609937a307d496bbf5919081900360200190a391505090565b6001546001600160a01b031681565b6102fa61055c565b6001600160a01b031661030b610449565b6001600160a01b031614610355576040805162461bcd60e51b8152602060048201819052602482015260008051602062001c0f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103a761055c565b6001600160a01b03166103b8610449565b6001600160a01b031614610402576040805162461bcd60e51b8152602060048201819052602482015260008051602062001c0f833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383161790556040517f6eb26f176dd9180849dd4874d3530de0e5c1f62a6e6798d34e3abfc11f1db2cc90600090a150565b6000546001600160a01b031690565b61046061055c565b6001600160a01b0316610471610449565b6001600160a01b0316146104bb576040805162461bcd60e51b8152602060048201819052602482015260008051602062001c0f833981519152604482015290519081900360640190fd5b6001600160a01b0381166105015760405162461bcd60e51b815260040180806020018281038252602681526020018062001be96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b61090c806200057d83390190565b610d608062000e898339019056fe608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b610886806100866000396000f3fe60806040526004361061006b5760003560e01c8063204e1c7a14610070578063715018a6146100bf5780637eff275e146100d65780638da5cb5b146101115780639623609d1461012657806399a88ec4146101e5578063f2fde38b14610220578063f3b7dead14610253575b600080fd5b34801561007c57600080fd5b506100a36004803603602081101561009357600080fd5b50356001600160a01b0316610286565b604080516001600160a01b039092168252519081900360200190f35b3480156100cb57600080fd5b506100d4610318565b005b3480156100e257600080fd5b506100d4600480360360408110156100f957600080fd5b506001600160a01b03813581169160200135166103c4565b34801561011d57600080fd5b506100a361049a565b6100d46004803603606081101561013c57600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561017057600080fd5b82018360208201111561018257600080fd5b803590602001918460018302840111640100000000831117156101a457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506104a9945050505050565b3480156101f157600080fd5b506100d46004803603604081101561020857600080fd5b506001600160a01b03813581169160200135166105eb565b34801561022c57600080fd5b506100d46004803603602081101561024357600080fd5b50356001600160a01b03166106a5565b34801561025f57600080fd5b506100a36004803603602081101561027657600080fd5b50356001600160a01b03166107a7565b6000806060836001600160a01b03166040518080635c60da1b60e01b8152506004019050600060405180830381855afa9150503d80600081146102e5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ea565b606091505b5091509150816102f957600080fd5b80806020019051602081101561030e57600080fd5b5051949350505050565b610320610806565b6001600160a01b031661033161049a565b6001600160a01b03161461037a576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103cc610806565b6001600160a01b03166103dd61049a565b6001600160a01b031614610426576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b816001600160a01b0316638f283970826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047e57600080fd5b505af1158015610492573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031690565b6104b1610806565b6001600160a01b03166104c261049a565b6001600160a01b03161461050b576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b826001600160a01b0316634f1ef2863484846040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610581578181015183820152602001610569565b50505050905090810190601f1680156105ae5780820380516001836020036101000a031916815260200191505b5093505050506000604051808303818588803b1580156105cd57600080fd5b505af11580156105e1573d6000803e3d6000fd5b5050505050505050565b6105f3610806565b6001600160a01b031661060461049a565b6001600160a01b03161461064d576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b816001600160a01b0316633659cfe6826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047e57600080fd5b6106ad610806565b6001600160a01b03166106be61049a565b6001600160a01b031614610707576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b6001600160a01b03811661074c5760405162461bcd60e51b815260040180806020018281038252602681526020018061080b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806060836001600160a01b031660405180806303e1469160e61b8152506004019050600060405180830381855afa9150503d80600081146102e5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ea565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122005019646333ea388b0c67bda202f0b0f9e694623274a3b0b0cd706bdc2821b5464736f6c634300060b0033608060405260405162000d6038038062000d60833981810160405260608110156200002957600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200005557600080fd5b9083019060208201858111156200006b57600080fd5b82516401000000008111828201881017156200008657600080fd5b82525081516020918201929091019080838360005b83811015620000b55781810151838201526020016200009b565b50505050905090810190601f168015620000e35780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e696d706c656d656e746174696f6e0000000082525190819003601c01902086935084925060008051602062000cbd8339815191526000199091011490506200013c57fe5b62000150826001600160e01b03620001e016565b80511562000171576200016f82826200024660201b620003841760201c565b505b5050604080517f656970313936372e70726f78792e61646d696e000000000000000000000000008152905190819003601301902060008051602062000c9d83398151915260001990910114620001c357fe5b620001d7826001600160e01b036200027e16565b50505062000461565b620001f6816200029160201b620003b01760201c565b620002335760405162461bcd60e51b815260040180806020018281038252603681526020018062000d046036913960400191505060405180910390fd5b60008051602062000cbd83398151915255565b606062000277838360405180606001604052806027815260200162000cdd602791396001600160e01b036200029716565b9392505050565b60008051602062000c9d83398151915255565b3b151590565b6060620002ad846001600160e01b036200029116565b620002ea5760405162461bcd60e51b815260040180806020018281038252602681526020018062000d3a6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106200032a5780518252601f19909201916020918201910162000309565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146200038c576040519150601f19603f3d011682016040523d82523d6000602084013e62000391565b606091505b509092509050620003ad8282866001600160e01b03620003b716565b9695505050505050565b60608315620003c857508162000277565b825115620003d95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620004255781810151838201526020016200040b565b50505050905090810190601f168015620004535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b61082c80620004716000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610262565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b031661029f565b34801561018857600080fd5b5061012d610359565b6101996103b6565b6101a96101a4610416565b61043b565b565b6101b361045f565b6001600160a01b0316336001600160a01b031614156101da576101d581610484565b6101e2565b6101e2610191565b50565b6101ed61045f565b6001600160a01b0316336001600160a01b031614156102555761020f83610484565b61024f8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038492505050565b5061025d565b61025d610191565b505050565b600061026c61045f565b6001600160a01b0316336001600160a01b031614156102945761028d610416565b905061029c565b61029c610191565b90565b6102a761045f565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103055760405162461bcd60e51b815260040180806020018281038252603a8152602001806106f8603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e61045f565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c4565b600061036361045f565b6001600160a01b0316336001600160a01b031614156102945761028d61045f565b60606103a98383604051806060016040528060278152602001610732602791396104e8565b9392505050565b3b151590565b6103be61045f565b6001600160a01b0316336001600160a01b0316141561040e5760405162461bcd60e51b81526004018080602001828103825260428152602001806107b56042913960600191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045a573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61048d816105eb565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b60606104f3846103b0565b61052e5760405162461bcd60e51b815260040180806020018281038252602681526020018061078f6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b6020831061056c5780518252601f19909201916020918201910161054d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146105cc576040519150601f19603f3d011682016040523d82523d6000602084013e6105d1565b606091505b50915091506105e1828286610653565b9695505050505050565b6105f4816103b0565b61062f5760405162461bcd60e51b81526004018080602001828103825260368152602001806107596036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b606083156106625750816103a9565b8251156106725782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156106bc5781810151838201526020016106a4565b50505050905090810190601f1680156106e95780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f2061646472657373416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65645570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e74726163745472616e73706172656e745570677261646561626c6550726f78793a2061646d696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172676574a2646970667358221220175110956fa0a7ff1615f55e1422acff6edcec0099d7ea0bae101f4f6228c8bd64736f6c634300060b0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65645570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220f41457c2bb0af55bc644e70e2f6efed23a4cd22618776a49c8f6dd9008cb545a64736f6c634300060b0033608060405234801561001057600080fd5b506065805460ff19166001179055610df58061002d6000396000f3fe6080604052600436106100765760003560e01c80636f791d291461007b578063715018a6146100a657806372f45866146100bd5780638129fc1c146100d057806381aac2d9146100e55780638da5cb5b14610105578063944f449514610127578063ce1d571f14610147578063f2fde38b1461015a575b600080fd5b34801561008757600080fd5b5061009061017a565b60405161009d9190610c29565b60405180910390f35b3480156100b257600080fd5b506100bb610183565b005b6100bb6100cb366004610a57565b610203565b3480156100dc57600080fd5b506100bb61039a565b3480156100f157600080fd5b506100bb610100366004610aed565b610425565b34801561011157600080fd5b5061011a61053e565b60405161009d9190610c15565b34801561013357600080fd5b506100bb610142366004610bb2565b61054d565b6100bb610155366004610b2d565b610672565b34801561016657600080fd5b506100bb610175366004610a34565b61075a565b60655460ff1690565b61018b610809565b6001600160a01b031661019c61053e565b6001600160a01b0316146101cb5760405162461bcd60e51b81526004016101c290610cf1565b60405180910390fd5b6033546040516000916001600160a01b031690600080516020610da0833981519152908390a3603380546001600160a01b0319169055565b61020b610809565b6001600160a01b031661021c61053e565b6001600160a01b0316146102425760405162461bcd60e51b81526004016101c290610cf1565b8460005b8181101561039057600088888381811061025c57fe5b905060200281019061026e9190610d43565b905011156102c4576102a886868381811061028557fe5b905060200201602081019061029a9190610a34565b6001600160a01b031661080d565b6102c45760405162461bcd60e51b81526004016101c290610c34565b60008686838181106102d257fe5b90506020020160208101906102e79190610a34565b6001600160a01b03168585848181106102fc57fe5b905060200201358a8a8581811061030f57fe5b90506020028101906103219190610d43565b60405161032f929190610c05565b60006040518083038185875af1925050503d806000811461036c576040519150601f19603f3d011682016040523d82523d6000602084013e610371565b606091505b5050905080610387576040513d806000833e8082fd5b50600101610246565b5050505050505050565b600054610100900460ff16806103b357506103b3610813565b806103c1575060005460ff16155b6103dd5760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610408576000805460ff1961ff0019909116610100171660011790555b610410610824565b8015610422576000805461ff00191690555b50565b61042d610809565b6001600160a01b031661043e61053e565b6001600160a01b0316146104645760405162461bcd60e51b81526004016101c290610cf1565b8060005b818110156105385783838281811061047c57fe5b90506020020160208101906104919190610a34565b6001600160a01b03166370dea79a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156104cb57600080fd5b505af19250505080156104dc575060015b610530573d80801561050a576040519150601f19603f3d011682016040523d82523d6000602084013e61050f565b606091505b50805161052e5760405162461bcd60e51b81526004016101c290610d26565b505b600101610468565b50505050565b6033546001600160a01b031690565b610555610809565b6001600160a01b031661056661053e565b6001600160a01b03161461058c5760405162461bcd60e51b81526004016101c290610cf1565b8060005b8181101561066b57846001600160a01b0316637427be518585848181106105b357fe5b90506020020160208101906105c89190610a34565b6040518263ffffffff1660e01b81526004016105e49190610c15565b600060405180830381600087803b1580156105fe57600080fd5b505af192505050801561060f575060015b610663573d80801561063d576040519150601f19603f3d011682016040523d82523d6000602084013e610642565b606091505b5080516106615760405162461bcd60e51b81526004016101c290610d26565b505b600101610590565b5050505050565b61067a610809565b6001600160a01b031661068b61053e565b6001600160a01b0316146106b15760405162461bcd60e51b81526004016101c290610cf1565b82156106e5576106c9826001600160a01b031661080d565b6106e55760405162461bcd60e51b81526004016101c290610c34565b6000826001600160a01b0316828686604051610702929190610c05565b60006040518083038185875af1925050503d806000811461073f576040519150601f19603f3d011682016040523d82523d6000602084013e610744565b606091505b505090508061066b576040513d806000833e8082fd5b610762610809565b6001600160a01b031661077361053e565b6001600160a01b0316146107995760405162461bcd60e51b81526004016101c290610cf1565b6001600160a01b0381166107bf5760405162461bcd60e51b81526004016101c290610c5d565b6033546040516001600160a01b03808416921690600080516020610da083398151915290600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b3b151590565b600061081e3061080d565b15905090565b600054610100900460ff168061083d575061083d610813565b8061084b575060005460ff16155b6108675760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610892576000805460ff1961ff0019909116610100171660011790555b61089a6108a2565b610410610923565b600054610100900460ff16806108bb57506108bb610813565b806108c9575060005460ff16155b6108e55760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610410576000805460ff1961ff0019909116610100171660011790558015610422576000805461ff001916905550565b600054610100900460ff168061093c575061093c610813565b8061094a575060005460ff16155b6109665760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610991576000805460ff1961ff0019909116610100171660011790555b600061099b610809565b603380546001600160a01b0319166001600160a01b03831690811790915560405191925090600090600080516020610da0833981519152908290a3508015610422576000805461ff001916905550565b60008083601f8401126109fc578182fd5b50813567ffffffffffffffff811115610a13578182fd5b6020830191508360208083028501011115610a2d57600080fd5b9250929050565b600060208284031215610a45578081fd5b8135610a5081610d8a565b9392505050565b60008060008060008060608789031215610a6f578182fd5b863567ffffffffffffffff80821115610a86578384fd5b610a928a838b016109eb565b90985096506020890135915080821115610aaa578384fd5b610ab68a838b016109eb565b90965094506040890135915080821115610ace578384fd5b50610adb89828a016109eb565b979a9699509497509295939492505050565b60008060208385031215610aff578182fd5b823567ffffffffffffffff811115610b15578283fd5b610b21858286016109eb565b90969095509350505050565b60008060008060608587031215610b42578384fd5b843567ffffffffffffffff80821115610b59578586fd5b81870188601f820112610b6a578687fd5b8035925081831115610b7a578687fd5b886020848301011115610b8b578687fd5b6020908101965091945050850135610ba281610d8a565b9396929550929360400135925050565b600080600060408486031215610bc6578283fd5b8335610bd181610d8a565b9250602084013567ffffffffffffffff811115610bec578283fd5b610bf8868287016109eb565b9497909650939450505050565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6020808252600f908201526e2727afa1a7a222afa0aa2fa0a2222960891b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526003908201526247415360e81b604082015260600190565b6000808335601e19843603018112610d59578283fd5b8084018035925067ffffffffffffffff831115610d74578384fd5b60200192505036819003821315610a2d57600080fd5b6001600160a01b038116811461042257600080fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220d99349a0f5eb6201c360896f42545166fe2aa67f1f61eb1bd9bd5d781421027164736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b5060006100246001600160e01b036100bc16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060405161007a906100c0565b604051809103906000f080158015610096573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b03929092169190911790556100cd565b3390565b610e2280611d4083390190565b611c64806100dc6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806311ebbf24146100675780636f2ddd931461008b578063715018a61461009357806389c716d11461009d5780638da5cb5b146100c3578063f2fde38b146100cb575b600080fd5b61006f6100f1565b604080516001600160a01b039092168252519081900360200190f35b61006f6102e3565b61009b6102f2565b005b61009b600480360360208110156100b357600080fd5b50356001600160a01b031661039f565b61006f610449565b61009b600480360360208110156100e157600080fd5b50356001600160a01b0316610458565b60008060405161010090610560565b604051809103906000f08015801561011c573d6000803e3d6000fd5b506001546040519192506000916001600160a01b039091169083906101409061056e565b6001600160a01b03928316815291166020820152606060408083018290526000918301829052519182900360a0019190f080158015610183573d6000803e3d6000fd5b506040805163f2fde38b60e01b815233600482015290519192506001600160a01b0384169163f2fde38b9160248082019260009290919082900301818387803b1580156101cf57600080fd5b505af11580156101e3573d6000803e3d6000fd5b50505050806001600160a01b0316638129fc1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561022257600080fd5b505af1158015610236573d6000803e3d6000fd5b50506040805163f2fde38b60e01b815233600482015290516001600160a01b038516935063f2fde38b9250602480830192600092919082900301818387803b15801561028157600080fd5b505af1158015610295573d6000803e3d6000fd5b5050604080516001600160a01b038681168252915133945091851692507fca0b7dde26052d34217ef1a0cee48085a07ca32da0a918609937a307d496bbf5919081900360200190a391505090565b6001546001600160a01b031681565b6102fa61055c565b6001600160a01b031661030b610449565b6001600160a01b031614610355576040805162461bcd60e51b8152602060048201819052602482015260008051602062001c0f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103a761055c565b6001600160a01b03166103b8610449565b6001600160a01b031614610402576040805162461bcd60e51b8152602060048201819052602482015260008051602062001c0f833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383161790556040517f6eb26f176dd9180849dd4874d3530de0e5c1f62a6e6798d34e3abfc11f1db2cc90600090a150565b6000546001600160a01b031690565b61046061055c565b6001600160a01b0316610471610449565b6001600160a01b0316146104bb576040805162461bcd60e51b8152602060048201819052602482015260008051602062001c0f833981519152604482015290519081900360640190fd5b6001600160a01b0381166105015760405162461bcd60e51b815260040180806020018281038252602681526020018062001be96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b61090c806200057d83390190565b610d608062000e898339019056fe608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b610886806100866000396000f3fe60806040526004361061006b5760003560e01c8063204e1c7a14610070578063715018a6146100bf5780637eff275e146100d65780638da5cb5b146101115780639623609d1461012657806399a88ec4146101e5578063f2fde38b14610220578063f3b7dead14610253575b600080fd5b34801561007c57600080fd5b506100a36004803603602081101561009357600080fd5b50356001600160a01b0316610286565b604080516001600160a01b039092168252519081900360200190f35b3480156100cb57600080fd5b506100d4610318565b005b3480156100e257600080fd5b506100d4600480360360408110156100f957600080fd5b506001600160a01b03813581169160200135166103c4565b34801561011d57600080fd5b506100a361049a565b6100d46004803603606081101561013c57600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561017057600080fd5b82018360208201111561018257600080fd5b803590602001918460018302840111640100000000831117156101a457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506104a9945050505050565b3480156101f157600080fd5b506100d46004803603604081101561020857600080fd5b506001600160a01b03813581169160200135166105eb565b34801561022c57600080fd5b506100d46004803603602081101561024357600080fd5b50356001600160a01b03166106a5565b34801561025f57600080fd5b506100a36004803603602081101561027657600080fd5b50356001600160a01b03166107a7565b6000806060836001600160a01b03166040518080635c60da1b60e01b8152506004019050600060405180830381855afa9150503d80600081146102e5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ea565b606091505b5091509150816102f957600080fd5b80806020019051602081101561030e57600080fd5b5051949350505050565b610320610806565b6001600160a01b031661033161049a565b6001600160a01b03161461037a576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103cc610806565b6001600160a01b03166103dd61049a565b6001600160a01b031614610426576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b816001600160a01b0316638f283970826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047e57600080fd5b505af1158015610492573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031690565b6104b1610806565b6001600160a01b03166104c261049a565b6001600160a01b03161461050b576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b826001600160a01b0316634f1ef2863484846040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610581578181015183820152602001610569565b50505050905090810190601f1680156105ae5780820380516001836020036101000a031916815260200191505b5093505050506000604051808303818588803b1580156105cd57600080fd5b505af11580156105e1573d6000803e3d6000fd5b5050505050505050565b6105f3610806565b6001600160a01b031661060461049a565b6001600160a01b03161461064d576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b816001600160a01b0316633659cfe6826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047e57600080fd5b6106ad610806565b6001600160a01b03166106be61049a565b6001600160a01b031614610707576040805162461bcd60e51b81526020600482018190526024820152600080516020610831833981519152604482015290519081900360640190fd5b6001600160a01b03811661074c5760405162461bcd60e51b815260040180806020018281038252602681526020018061080b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806060836001600160a01b031660405180806303e1469160e61b8152506004019050600060405180830381855afa9150503d80600081146102e5576040519150601f19603f3d011682016040523d82523d6000602084013e6102ea565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122005019646333ea388b0c67bda202f0b0f9e694623274a3b0b0cd706bdc2821b5464736f6c634300060b0033608060405260405162000d6038038062000d60833981810160405260608110156200002957600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200005557600080fd5b9083019060208201858111156200006b57600080fd5b82516401000000008111828201881017156200008657600080fd5b82525081516020918201929091019080838360005b83811015620000b55781810151838201526020016200009b565b50505050905090810190601f168015620000e35780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e696d706c656d656e746174696f6e0000000082525190819003601c01902086935084925060008051602062000cbd8339815191526000199091011490506200013c57fe5b62000150826001600160e01b03620001e016565b80511562000171576200016f82826200024660201b620003841760201c565b505b5050604080517f656970313936372e70726f78792e61646d696e000000000000000000000000008152905190819003601301902060008051602062000c9d83398151915260001990910114620001c357fe5b620001d7826001600160e01b036200027e16565b50505062000461565b620001f6816200029160201b620003b01760201c565b620002335760405162461bcd60e51b815260040180806020018281038252603681526020018062000d046036913960400191505060405180910390fd5b60008051602062000cbd83398151915255565b606062000277838360405180606001604052806027815260200162000cdd602791396001600160e01b036200029716565b9392505050565b60008051602062000c9d83398151915255565b3b151590565b6060620002ad846001600160e01b036200029116565b620002ea5760405162461bcd60e51b815260040180806020018281038252602681526020018062000d3a6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106200032a5780518252601f19909201916020918201910162000309565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146200038c576040519150601f19603f3d011682016040523d82523d6000602084013e62000391565b606091505b509092509050620003ad8282866001600160e01b03620003b716565b9695505050505050565b60608315620003c857508162000277565b825115620003d95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620004255781810151838201526020016200040b565b50505050905090810190601f168015620004535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b61082c80620004716000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610262565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b031661029f565b34801561018857600080fd5b5061012d610359565b6101996103b6565b6101a96101a4610416565b61043b565b565b6101b361045f565b6001600160a01b0316336001600160a01b031614156101da576101d581610484565b6101e2565b6101e2610191565b50565b6101ed61045f565b6001600160a01b0316336001600160a01b031614156102555761020f83610484565b61024f8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061038492505050565b5061025d565b61025d610191565b505050565b600061026c61045f565b6001600160a01b0316336001600160a01b031614156102945761028d610416565b905061029c565b61029c610191565b90565b6102a761045f565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103055760405162461bcd60e51b815260040180806020018281038252603a8152602001806106f8603a913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e61045f565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c4565b600061036361045f565b6001600160a01b0316336001600160a01b031614156102945761028d61045f565b60606103a98383604051806060016040528060278152602001610732602791396104e8565b9392505050565b3b151590565b6103be61045f565b6001600160a01b0316336001600160a01b0316141561040e5760405162461bcd60e51b81526004018080602001828103825260428152602001806107b56042913960600191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045a573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61048d816105eb565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b60606104f3846103b0565b61052e5760405162461bcd60e51b815260040180806020018281038252602681526020018061078f6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b6020831061056c5780518252601f19909201916020918201910161054d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146105cc576040519150601f19603f3d011682016040523d82523d6000602084013e6105d1565b606091505b50915091506105e1828286610653565b9695505050505050565b6105f4816103b0565b61062f5760405162461bcd60e51b81526004018080602001828103825260368152602001806107596036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b606083156106625750816103a9565b8251156106725782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156106bc5781810151838201526020016106a4565b50505050905090810190601f1680156106e95780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5472616e73706172656e745570677261646561626c6550726f78793a206e65772061646d696e20697320746865207a65726f2061646472657373416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65645570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e74726163745472616e73706172656e745570677261646561626c6550726f78793a2061646d696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172676574a2646970667358221220175110956fa0a7ff1615f55e1422acff6edcec0099d7ea0bae101f4f6228c8bd64736f6c634300060b0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65645570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e7d1702b9c5addd7c185ad71e87be595ef177f2ab3b7d60cae42332fce236baf64736f6c634300060b0033608060405234801561001057600080fd5b506065805460ff19166001179055610df58061002d6000396000f3fe6080604052600436106100765760003560e01c80636f791d291461007b578063715018a6146100a657806372f45866146100bd5780638129fc1c146100d057806381aac2d9146100e55780638da5cb5b14610105578063944f449514610127578063ce1d571f14610147578063f2fde38b1461015a575b600080fd5b34801561008757600080fd5b5061009061017a565b60405161009d9190610c29565b60405180910390f35b3480156100b257600080fd5b506100bb610183565b005b6100bb6100cb366004610a57565b610203565b3480156100dc57600080fd5b506100bb61039a565b3480156100f157600080fd5b506100bb610100366004610aed565b610425565b34801561011157600080fd5b5061011a61053e565b60405161009d9190610c15565b34801561013357600080fd5b506100bb610142366004610bb2565b61054d565b6100bb610155366004610b2d565b610672565b34801561016657600080fd5b506100bb610175366004610a34565b61075a565b60655460ff1690565b61018b610809565b6001600160a01b031661019c61053e565b6001600160a01b0316146101cb5760405162461bcd60e51b81526004016101c290610cf1565b60405180910390fd5b6033546040516000916001600160a01b031690600080516020610da0833981519152908390a3603380546001600160a01b0319169055565b61020b610809565b6001600160a01b031661021c61053e565b6001600160a01b0316146102425760405162461bcd60e51b81526004016101c290610cf1565b8460005b8181101561039057600088888381811061025c57fe5b905060200281019061026e9190610d43565b905011156102c4576102a886868381811061028557fe5b905060200201602081019061029a9190610a34565b6001600160a01b031661080d565b6102c45760405162461bcd60e51b81526004016101c290610c34565b60008686838181106102d257fe5b90506020020160208101906102e79190610a34565b6001600160a01b03168585848181106102fc57fe5b905060200201358a8a8581811061030f57fe5b90506020028101906103219190610d43565b60405161032f929190610c05565b60006040518083038185875af1925050503d806000811461036c576040519150601f19603f3d011682016040523d82523d6000602084013e610371565b606091505b5050905080610387576040513d806000833e8082fd5b50600101610246565b5050505050505050565b600054610100900460ff16806103b357506103b3610813565b806103c1575060005460ff16155b6103dd5760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610408576000805460ff1961ff0019909116610100171660011790555b610410610824565b8015610422576000805461ff00191690555b50565b61042d610809565b6001600160a01b031661043e61053e565b6001600160a01b0316146104645760405162461bcd60e51b81526004016101c290610cf1565b8060005b818110156105385783838281811061047c57fe5b90506020020160208101906104919190610a34565b6001600160a01b03166370dea79a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156104cb57600080fd5b505af19250505080156104dc575060015b610530573d80801561050a576040519150601f19603f3d011682016040523d82523d6000602084013e61050f565b606091505b50805161052e5760405162461bcd60e51b81526004016101c290610d26565b505b600101610468565b50505050565b6033546001600160a01b031690565b610555610809565b6001600160a01b031661056661053e565b6001600160a01b03161461058c5760405162461bcd60e51b81526004016101c290610cf1565b8060005b8181101561066b57846001600160a01b0316637427be518585848181106105b357fe5b90506020020160208101906105c89190610a34565b6040518263ffffffff1660e01b81526004016105e49190610c15565b600060405180830381600087803b1580156105fe57600080fd5b505af192505050801561060f575060015b610663573d80801561063d576040519150601f19603f3d011682016040523d82523d6000602084013e610642565b606091505b5080516106615760405162461bcd60e51b81526004016101c290610d26565b505b600101610590565b5050505050565b61067a610809565b6001600160a01b031661068b61053e565b6001600160a01b0316146106b15760405162461bcd60e51b81526004016101c290610cf1565b82156106e5576106c9826001600160a01b031661080d565b6106e55760405162461bcd60e51b81526004016101c290610c34565b6000826001600160a01b0316828686604051610702929190610c05565b60006040518083038185875af1925050503d806000811461073f576040519150601f19603f3d011682016040523d82523d6000602084013e610744565b606091505b505090508061066b576040513d806000833e8082fd5b610762610809565b6001600160a01b031661077361053e565b6001600160a01b0316146107995760405162461bcd60e51b81526004016101c290610cf1565b6001600160a01b0381166107bf5760405162461bcd60e51b81526004016101c290610c5d565b6033546040516001600160a01b03808416921690600080516020610da083398151915290600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b3b151590565b600061081e3061080d565b15905090565b600054610100900460ff168061083d575061083d610813565b8061084b575060005460ff16155b6108675760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610892576000805460ff1961ff0019909116610100171660011790555b61089a6108a2565b610410610923565b600054610100900460ff16806108bb57506108bb610813565b806108c9575060005460ff16155b6108e55760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610410576000805460ff1961ff0019909116610100171660011790558015610422576000805461ff001916905550565b600054610100900460ff168061093c575061093c610813565b8061094a575060005460ff16155b6109665760405162461bcd60e51b81526004016101c290610ca3565b600054610100900460ff16158015610991576000805460ff1961ff0019909116610100171660011790555b600061099b610809565b603380546001600160a01b0319166001600160a01b03831690811790915560405191925090600090600080516020610da0833981519152908290a3508015610422576000805461ff001916905550565b60008083601f8401126109fc578182fd5b50813567ffffffffffffffff811115610a13578182fd5b6020830191508360208083028501011115610a2d57600080fd5b9250929050565b600060208284031215610a45578081fd5b8135610a5081610d8a565b9392505050565b60008060008060008060608789031215610a6f578182fd5b863567ffffffffffffffff80821115610a86578384fd5b610a928a838b016109eb565b90985096506020890135915080821115610aaa578384fd5b610ab68a838b016109eb565b90965094506040890135915080821115610ace578384fd5b50610adb89828a016109eb565b979a9699509497509295939492505050565b60008060208385031215610aff578182fd5b823567ffffffffffffffff811115610b15578283fd5b610b21858286016109eb565b90969095509350505050565b60008060008060608587031215610b42578384fd5b843567ffffffffffffffff80821115610b59578586fd5b81870188601f820112610b6a578687fd5b8035925081831115610b7a578687fd5b886020848301011115610b8b578687fd5b6020908101965091945050850135610ba281610d8a565b9396929550929360400135925050565b600080600060408486031215610bc6578283fd5b8335610bd181610d8a565b9250602084013567ffffffffffffffff811115610bec578283fd5b610bf8868287016109eb565b9497909650939450505050565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6020808252600f908201526e2727afa1a7a222afa0aa2fa0a2222960891b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526003908201526247415360e81b604082015260600190565b6000808335601e19843603018112610d59578283fd5b8084018035925067ffffffffffffffff831115610d74578384fd5b60200192505036819003821315610a2d57600080fd5b6001600160a01b038116811461042257600080fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220cd27ebce9eb324f23b3322b3856e1c897dec4408834151f9d879f73fb5c380d264736f6c634300060b0033", } // ValidatorWalletCreatorABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgetestcontracts/ChallengeFactory.go b/packages/arb-util/ethbridgetestcontracts/ChallengeFactory.go index 24ec423942..6441f822d5 100755 --- a/packages/arb-util/ethbridgetestcontracts/ChallengeFactory.go +++ b/packages/arb-util/ethbridgetestcontracts/ChallengeFactory.go @@ -31,7 +31,7 @@ var ( // ChallengeFactoryMetaData contains all meta data concerning the ChallengeFactory contract. var ChallengeFactoryMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"contractIOneStepProof[]\",\"name\":\"_executors\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"beacon\",\"outputs\":[{\"internalType\":\"contractUpgradeableBeacon\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_resultReceiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_executionHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_maxMessageCount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_asserter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_asserterTimeLeft\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengerTimeLeft\",\"type\":\"uint256\"},{\"internalType\":\"contractISequencerInbox\",\"name\":\"_sequencerBridge\",\"type\":\"address\"},{\"internalType\":\"contractIBridge\",\"name\":\"_delayedBridge\",\"type\":\"address\"}],\"name\":\"createChallenge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"executors\",\"outputs\":[{\"internalType\":\"contractIOneStepProof\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506040516135bf3803806135bf8339818101604052602081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825186602082028301116401000000008211171561008557600080fd5b82525081516020918201928201910280838360005b838110156100b257818101518382015260200161009a565b5050505091909101604052505082516100d492506000915060208401906101bb565b5060006040516100e390610220565b604051809103906000f0801580156100ff573d6000803e3d6000fd5b5090508060405161010f9061022d565b6001600160a01b03909116815260405190819003602001906000f08015801561013c573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b0392831617908190556040805163f2fde38b60e01b81523360048201529051919092169163f2fde38b91602480830192600092919082900301818387803b15801561019c57600080fd5b505af11580156101b0573d6000803e3d6000fd5b505050505050610261565b828054828255906000526020600020908101928215610210579160200282015b8281111561021057825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906101db565b5061021c92915061023a565b5090565b6121ab80610e4383390190565b6105d180612fee83390190565b61025e91905b8082111561021c5780546001600160a01b0319168155600101610240565b90565b610bd3806102706000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806359659e90146100465780638ecaab111461006a578063f97a05df146100cc575b600080fd5b61004e6100e9565b604080516001600160a01b039092168252519081900360200190f35b61004e600480360361012081101561008157600080fd5b506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166100f8565b61004e600480360360208110156100e257600080fd5b50356102af565b6001546001600160a01b031681565b60015460405160009182916001600160a01b0390911690610118906102d6565b6001600160a01b03909116815260406020820181905260008183018190529051918290036080019190f080158015610154573d6000803e3d6000fd5b509050806001600160a01b031663e0d42b8e60008d8d8d8d8d8d8d8d8d6040518b63ffffffff1660e01b815260040180806020018b6001600160a01b03166001600160a01b031681526020018a8152602001898152602001886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001868152602001858152602001846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b0316815260200182810382528c818154815260200191508054801561025f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610241575b50509b505050505050505050505050600060405180830381600087803b15801561028857600080fd5b505af115801561029c573d6000803e3d6000fd5b50929d9c50505050505050505050505050565b600081815481106102bc57fe5b6000918252602090912001546001600160a01b0316905081565b6108ba806102e48339019056fe60806040526040516108ba3803806108ba8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e626561636f6e0000000000000000000000008252519081900360140190206000805160206107fa83398151915260001990910114925061012a91505057fe5b61013d82826001600160e01b0361014416565b50506104f3565b610157826102a260201b6100311760201c565b6101925760405162461bcd60e51b815260040180806020018281038252602581526020018061083b6025913960400191505060405180910390fd5b61020a826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ce57600080fd5b505afa1580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b50516102a2602090811b61003117901c565b6102455760405162461bcd60e51b81526004018080602001828103825260348152602001806108866034913960400191505060405180910390fd5b6000805160206107fa83398151915282815581511561029d5761029b6102726001600160e01b036102a816565b8360405180606001604052806021815260200161081a6021913961032460201b6100371760201c565b505b505050565b3b151590565b60006102bb6001600160e01b0361043c16565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d602081101561031d57600080fd5b5051905090565b6060610338846001600160e01b036102a216565b6103735760405162461bcd60e51b81526004018080602001828103825260268152602001806108606026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106103b15780518252601f199092019160209182019101610392565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b5090925090506104308282866001600160e01b0361044f16565b925050505b9392505050565b6000805160206107fa8339815191525490565b6060831561045e575081610435565b82511561046e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b85781810151838201526020016104a0565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f8806105026000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013c565b6101af565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029d6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106100bb5780518252601f19909201916020918201910161009c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101308282866101d3565b925050505b9392505050565b6000610146610277565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101ce573d6000f35b3d6000fd5b606083156101e2575081610135565b8251156101f25782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023c578181015183820152602001610224565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a264697066735822122053dcbd8c0863f6517a5117ac7b858fc300ba6a67685a286f909e85f8150b82c764736f6c634300060b0033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220bfe03482afd40c4416f944fd566dc2ab4f1db1cfcc8fd221f8cf19ac35f8f6fd64736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff1916600117905561217e8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063925f9a9611610092578063925f9a9614610285578063959792011461028d5780639a9e4f441461045e578063a3c4470514610466578063bb4af0b114610483578063deda41151461048b578063e0d42b8e14610517578063e87e3589146105ca578063f97a05df146105d2576100f5565b806214ebe7146100fa57806341e8510c14610104578063534db0e21461011e5780636f791d291461014257806370dea79a1461015e578063843d5a5c146101665780638a8cd2181461016e5780638b299903146101765780638e7b84c5146101a2575b600080fd5b6101026105ef565b005b61010c61064c565b60408051918252519081900360200190f35b610126610652565b604080516001600160a01b039092168252519081900360200190f35b61014a610661565b604080519115158252519081900360200190f35b61010261066b565b61010c6107c4565b6101266107ca565b61017e610859565b6040518082600281111561018e57fe5b60ff16815260200191505060405180910390f35b61010260048036036101008110156101b957600080fd5b810190602081018135600160201b8111156101d357600080fd5b8201836020820111156101e557600080fd5b803590602001918460208302840111600160201b8311171561020657600080fd5b9193909282359260208101359260408201359260608301359260808101359260a082013592909160e081019060c00135600160201b81111561024757600080fd5b82018360208201111561025957600080fd5b803590602001918460208302840111600160201b8311171561027a57600080fd5b509092509050610862565b61010c610e1e565b61010260048036036101c08110156102a457600080fd5b810190602081018135600160201b8111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460208302840111600160201b831117156102f157600080fd5b6040805160608181018352949693958335956020850135959385013594818101359460808201359460a08301949193919261014081019260e090910190600390839083908082843760009201919091525091949392602081019250359050600160201b81111561036057600080fd5b82018360208201111561037257600080fd5b803590602001918460018302840111600160201b8311171561039357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103e557600080fd5b8201836020820111156103f757600080fd5b803590602001918460018302840111600160201b8311171561041857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610e249050565b61010c6113cb565b6101266004803603602081101561047c57600080fd5b50356113d1565b6101266113ee565b610102600480360360e08110156104a157600080fd5b810190602081018135600160201b8111156104bb57600080fd5b8201836020820111156104cd57600080fd5b803590602001918460208302840111600160201b831117156104ee57600080fd5b919350915080359060208101359060408101359060608101359060808101359060a001356113fd565b610102600480360361014081101561052e57600080fd5b810190602081018135600160201b81111561054857600080fd5b82018360208201111561055a57600080fd5b803590602001918460208302840111600160201b8311171561057b57600080fd5b91935091506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166116f5565b61010c611846565b610126600480360360208110156105e857600080fd5b503561188c565b6004546001600160a01b03163314610641576040805162461bcd60e51b815260206004820152601060248201526f2727aa2fa922a9afa922a1a2a4ab22a960811b604482015290519081900360640190fd5b61064a336118b3565b565b600a5481565b6007546001600160a01b031681565b60005460ff165b90565b60006106826008544361193390919063ffffffff16565b905061068c611846565b81116040518060400160405280601081526020016f54494d454f55545f444541444c494e4560801b815250906107405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107055781810151838201526020016106ed565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506001600b5460ff16600281111561075457fe5b1415610790576040517f2b92a4b014281aa2424baba9ea60bf4f26833d1c1fbd873e51cd1a6caeef48f090600090a161078b611995565b6107c1565b6040517f4e1f1f06cf69d199fcdb4d87a5a92d5248ca6b540e9fc2d3698927c5002a236a90600090a16107c1611a12565b50565b600c5481565b60006001600b5460ff1660028111156107df57fe5b14156107f757506006546001600160a01b0316610668565b6002600b5460ff16600281111561080a57fe5b141561082257506007546001600160a01b0316610668565b6040805162461bcd60e51b81526020600482015260076024820152662727afaa2aa92760c91b604482015290519081900360640190fd5b600b5460ff1681565b61086a6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906108ed5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506108f6611846565b60085461090a90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b8152509061097d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060008282600019810181811061099057fe5b90506020020135146109dd57600186116109dd576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d213d49560ba1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b031663dc72a33b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2d57600080fd5b505afa158015610a41573d6000803e3d6000fd5b505050506040513d6020811015610a5757600080fd5b50519050610a658782611a6e565b6001018214610aa7576040805162461bcd60e51b815260206004820152600960248201526810d55517d0d3d5539560ba1b604482015290519081900360640190fd5b8583836000198101818110610ab857fe5b905060200201351415610afd576040805162461bcd60e51b815260206004820152600860248201526714d0535157d1539160c21b604482015290519081900360640190fd5b610b078585611a86565b83836000818110610b1457fe5b9050602002013514610b62576040805162461bcd60e51b81526020600482015260126024820152717365676d656e74207072652d6669656c647360701b604482015290519081900360640190fd5b600083838281610b6e57fe5b905060200201351415610bbc576040805162461bcd60e51b8152602060048201526011602482015270155394915050d21050931157d4d5105495607a1b604482015290519081900360640190fd5b610bcc888863ffffffff611ab216565b8510610c18576040805162461bcd60e51b81526020600482015260166024820152750d2dcecc2d8d2c840e6cacedacadce840d8cadccee8d60531b604482015290519081900360640190fd5b6000610c39898986866000818110610c2c57fe5b905060200201358a611b13565b9050610c4a600c54828e8e8e611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b81525090610cb75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000610cfa8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e92508d9150611b9f9050565b905080600c81905550807f0a2bdfea671da507e80b0cbae49dd25100a5bdacc5dff43a9163a3fcbd7c3c7d8b8b888860405180858152602001848152602001806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f191690920182900397509095505050505050a25060029150610d839050565b600b5460ff166002811115610d9457fe5b1415610dd657610dc1610db26008544361193390919063ffffffff16565b600a549063ffffffff61193316565b600a55600b805460ff19166001179055610e0e565b610dfd610dee6008544361193390919063ffffffff16565b6009549063ffffffff61193316565b600955600b805460ff191660021790555b5050436008555050505050505050565b60085481565b610e2c6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b81525090610eaf5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50610eb8611846565b600854610ecc90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b81525090610f3f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000806000610f4d61205b565b60018560ff1681548110610f5d57fe5b6000918252602090912001546040516323eed0eb60e11b81526001600160a01b03909116906347dda1d6906002908d908d908c908c90600481019060440186825b81546001600160a01b03168152600190910190602001808311610f9e57505085815260200184604080828437600081840152601f19601f8201169050808301925050508060200180602001838103835285818151815260200191508051906020019080838360005b8381101561101e578181015183820152602001611006565b50505050905090810190601f16801561104b5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561107e578181015183820152602001611066565b50505050905090810190601f1680156110ab5780820380516001836020036101000a031916815260200191505b5097505050505050505060c06040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060c081101561110657600080fd5b5080516020820151600554919550935060409091019150821115611165576040805162461bcd60e51b8152602060048201526011602482015270544f4f5f4d414e595f4d4553534147455360781b604482015290519081900360640190fd5b6111758d8d63ffffffff611ab216565b8851106111b4576040805162461bcd60e51b815260206004820152600860248201526713d4d417d0d3d39560c21b604482015290519081900360640190fd5b6111c48d8d63ffffffff611ab216565b6111e767ffffffffffffffff85168a60005b60200201519063ffffffff611ab216565b1015611226576040805162461bcd60e51b815260206004820152600960248201526813d4d417d4d213d49560ba1b604482015290519081900360640190fd5b611239893560208b01358a868686611ce5565b8b1415611279576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6112968d8d6112908d8d3560208f01358e88611d84565b8e611b13565b93505050506112aa600c54828f8f8f611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906113175760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506040517f117efdf1fdd8be5a6ff0fb3c32333d7033bbd9523924bd0d9ca28f43540516f590600090a1611349611db5565b506002600b5460ff16600281111561135d57fe5b14156113905761137b610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556113b9565b6113a8610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b50504360085550505050505050505050565b60095481565b600281600281106113de57fe5b01546001600160a01b0316905081565b6006546001600160a01b031681565b6114056107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906114885760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50611491611846565b6008546114a590439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b815250906115185760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060006115258383611a86565b9050600061153587878488611b13565b9050611546600c54828c8c8c611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906115b35760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506115c4878763ffffffff611ab216565b841015611603576040805162461bcd60e51b81526020600482015260086024820152671393d517d0d3d39560c21b604482015290519081900360640190fd5b84821415611644576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6040517ff62bb8ab32072c0ea3337f57276b8e66418eca0dfcc5e3b8aef4905d43e8f8ca90600090a1611675611db5565b5060029050600b5460ff16600281111561168b57fe5b14156116be576116a9610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556116e7565b6116d6610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b505043600855505050505050565b6000600b5460ff16600281111561170857fe5b146040518060400160405280600f81526020016e4348414c5f494e49545f535441544560881b8152509061177d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5061178a60018c8c612079565b50600480546001600160a01b03199081166001600160a01b038c8116919091179092556005899055600680548216898416179055600780549091168783161790556009859055600a849055600b805460ff19166002908117909155600c8a905543600855604080518082019091528483168152918316602083015261180f91816120dc565b506040517f7003482dc89fcecb9f14e280f21ee716bd54187f7f3b0ab5ed78f3648218f2de90600090a15050505050505050505050565b60006001600b5460ff16600281111561185b57fe5b141561186a5750600954610668565b6002600b5460ff16600281111561187d57fe5b14156108225750600a54610668565b6001818154811061189957fe5b6000918252602090912001546001600160a01b0316905081565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff16156119265760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50806001600160a01b0316ff5b60008282111561198a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6004805460075460065460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b505af1158015611a05573d6000803e3d6000fd5b5050505061064a336118b3565b6004805460065460075460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b600081831015611a7f57508161198f565b508061198f565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600082820183811015611b0c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b6000611b93848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250869250899150611dbc9050565b90951495945050505050565b82516000906000190160608167ffffffffffffffff81118015611bc157600080fd5b50604051908082528060200260200182016040528015611beb578160200160208202803683370190505b5090506000611bfa8584611e8a565b90506000869050611c3581838a600081518110611c1357fe5b60200260200101518b600181518110611c2857fe5b6020026020010151611b13565b83600081518110611c4257fe5b6020908102919091010152611c5d818363ffffffff611ab216565b9050611c698685611ea8565b915060015b84811015611ccf57611c9e82848b8481518110611c8757fe5b60200260200101518c8560010181518110611c2857fe5b848281518110611caa57fe5b6020908102919091010152611cc5828463ffffffff611ab216565b9150600101611c6e565b50611cd983611ebb565b98975050505050505050565b600080611d0e83600260200201518914611d00576001611d03565b60005b60ff168760016111d6565b90506000611d3884600360200201518914611d2a576001611d2d565b60005b60ff168860026111d6565b9050611d77611d5367ffffffffffffffff88168960006111d6565b602086015160408701516060880151611d72928a929091889088612010565b611a86565b9998505050505050505050565b8151815160208401516040850151600093611dab939092611d72928b92918b918b90612010565b9695505050505050565b6000600c55565b8251600090610100811115611dd057600080fd5b8260005b82811015611e805760028606611e2d57868181518110611df057fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150611e72565b81878281518110611e3a57fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101611dd4565b5095945050505050565b6000818381611e9557fe5b06828481611e9f57fe5b04019392505050565b6000818381611eb357fe5b049392505050565b6000815b600181511115611ff35760606002825160010181611ed957fe5b0467ffffffffffffffff81118015611ef057600080fd5b50604051908082528060200260200182016040528015611f1a578160200160208202803683370190505b50905060005b8151811015611feb578251816002026001011015611fb357828160020281518110611f4757fe5b6020026020010151838260020260010181518110611f6157fe5b6020026020010151604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120828281518110611fa257fe5b602002602001018181525050611fe3565b828160020281518110611fc257fe5b6020026020010151828281518110611fd657fe5b6020026020010181815250505b600101611f20565b509050611ebf565b8060008151811061200057fe5b6020026020010151915050919050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b60405180608001604052806004906020820280368337509192915050565b8280548282559060005260206000209081019282156120cc579160200282015b828111156120cc5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612099565b506120d8929150612124565b5090565b82600281019282156120cc579160200282015b828111156120cc57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ef565b61066891905b808211156120d85780546001600160a01b031916815560010161212a56fea264697066735822122004e3428e1101f2e9ca875b69bcd83c6c08a8ff949a012ca33e2e16dfff5819f564736f6c634300060b0033608060405234801561001057600080fd5b506040516105d13803806105d18339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100aa16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100a4816001600160e01b036100ae16565b50610124565b3390565b6100c18161011e60201b61034c1760201c565b6100fc5760405162461bcd60e51b815260040180806020018281038252603381526020018061059e6033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b61046b806101336000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610084578063715018a6146100a85780638da5cb5b146100b0578063f2fde38b146100b8575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b03166100de565b005b61008c610180565b604080516001600160a01b039092168252519081900360200190f35b61008261018f565b61008c61023b565b610082600480360360208110156100ce57600080fd5b50356001600160a01b031661024a565b6100e6610352565b6001600160a01b03166100f761023b565b6001600160a01b031614610140576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b61014981610356565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001546001600160a01b031690565b610197610352565b6001600160a01b03166101a861023b565b6001600160a01b0316146101f1576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610252610352565b6001600160a01b031661026361023b565b6001600160a01b0316146102ac576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b6001600160a01b0381166102f15760405162461bcd60e51b81526004018080602001828103825260268152602001806103bd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b3390565b61035f8161034c565b61039a5760405162461bcd60e51b81526004018080602001828103825260338152602001806103e36033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e082b44760d7484daad017396b93ce8fb7ce2f11f19db0d8429a61aaedbc6f4564736f6c634300060b00335570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374", + Bin: "0x608060405234801561001057600080fd5b506040516135bf3803806135bf8339818101604052602081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825186602082028301116401000000008211171561008557600080fd5b82525081516020918201928201910280838360005b838110156100b257818101518382015260200161009a565b5050505091909101604052505082516100d492506000915060208401906101bb565b5060006040516100e390610220565b604051809103906000f0801580156100ff573d6000803e3d6000fd5b5090508060405161010f9061022d565b6001600160a01b03909116815260405190819003602001906000f08015801561013c573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b0392831617908190556040805163f2fde38b60e01b81523360048201529051919092169163f2fde38b91602480830192600092919082900301818387803b15801561019c57600080fd5b505af11580156101b0573d6000803e3d6000fd5b505050505050610261565b828054828255906000526020600020908101928215610210579160200282015b8281111561021057825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906101db565b5061021c92915061023a565b5090565b6121ab80610e4383390190565b6105d180612fee83390190565b61025e91905b8082111561021c5780546001600160a01b0319168155600101610240565b90565b610bd3806102706000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806359659e90146100465780638ecaab111461006a578063f97a05df146100cc575b600080fd5b61004e6100e9565b604080516001600160a01b039092168252519081900360200190f35b61004e600480360361012081101561008157600080fd5b506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166100f8565b61004e600480360360208110156100e257600080fd5b50356102af565b6001546001600160a01b031681565b60015460405160009182916001600160a01b0390911690610118906102d6565b6001600160a01b03909116815260406020820181905260008183018190529051918290036080019190f080158015610154573d6000803e3d6000fd5b509050806001600160a01b031663e0d42b8e60008d8d8d8d8d8d8d8d8d6040518b63ffffffff1660e01b815260040180806020018b6001600160a01b03166001600160a01b031681526020018a8152602001898152602001886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001868152602001858152602001846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b0316815260200182810382528c818154815260200191508054801561025f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610241575b50509b505050505050505050505050600060405180830381600087803b15801561028857600080fd5b505af115801561029c573d6000803e3d6000fd5b50929d9c50505050505050505050505050565b600081815481106102bc57fe5b6000918252602090912001546001600160a01b0316905081565b6108ba806102e48339019056fe60806040526040516108ba3803806108ba8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e626561636f6e0000000000000000000000008252519081900360140190206000805160206107fa83398151915260001990910114925061012a91505057fe5b61013d82826001600160e01b0361014416565b50506104f3565b610157826102a260201b6100311760201c565b6101925760405162461bcd60e51b815260040180806020018281038252602581526020018061083b6025913960400191505060405180910390fd5b61020a826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ce57600080fd5b505afa1580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b50516102a2602090811b61003117901c565b6102455760405162461bcd60e51b81526004018080602001828103825260348152602001806108866034913960400191505060405180910390fd5b6000805160206107fa83398151915282815581511561029d5761029b6102726001600160e01b036102a816565b8360405180606001604052806021815260200161081a6021913961032460201b6100371760201c565b505b505050565b3b151590565b60006102bb6001600160e01b0361043c16565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d602081101561031d57600080fd5b5051905090565b6060610338846001600160e01b036102a216565b6103735760405162461bcd60e51b81526004018080602001828103825260268152602001806108606026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106103b15780518252601f199092019160209182019101610392565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b5090925090506104308282866001600160e01b0361044f16565b925050505b9392505050565b6000805160206107fa8339815191525490565b6060831561045e575081610435565b82511561046e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b85781810151838201526020016104a0565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f8806105026000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013c565b6101af565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029d6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106100bb5780518252601f19909201916020918201910161009c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101308282866101d3565b925050505b9392505050565b6000610146610277565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101ce573d6000f35b3d6000fd5b606083156101e2575081610135565b8251156101f25782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023c578181015183820152602001610224565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a264697066735822122053dcbd8c0863f6517a5117ac7b858fc300ba6a67685a286f909e85f8150b82c764736f6c634300060b0033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220f0deb59cae5c82109427b2081f30691b0683bab3f4b27c916170ee73b803f7d764736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff1916600117905561217e8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063925f9a9611610092578063925f9a9614610285578063959792011461028d5780639a9e4f441461045e578063a3c4470514610466578063bb4af0b114610483578063deda41151461048b578063e0d42b8e14610517578063e87e3589146105ca578063f97a05df146105d2576100f5565b806214ebe7146100fa57806341e8510c14610104578063534db0e21461011e5780636f791d291461014257806370dea79a1461015e578063843d5a5c146101665780638a8cd2181461016e5780638b299903146101765780638e7b84c5146101a2575b600080fd5b6101026105ef565b005b61010c61064c565b60408051918252519081900360200190f35b610126610652565b604080516001600160a01b039092168252519081900360200190f35b61014a610661565b604080519115158252519081900360200190f35b61010261066b565b61010c6107c4565b6101266107ca565b61017e610859565b6040518082600281111561018e57fe5b60ff16815260200191505060405180910390f35b61010260048036036101008110156101b957600080fd5b810190602081018135600160201b8111156101d357600080fd5b8201836020820111156101e557600080fd5b803590602001918460208302840111600160201b8311171561020657600080fd5b9193909282359260208101359260408201359260608301359260808101359260a082013592909160e081019060c00135600160201b81111561024757600080fd5b82018360208201111561025957600080fd5b803590602001918460208302840111600160201b8311171561027a57600080fd5b509092509050610862565b61010c610e1e565b61010260048036036101c08110156102a457600080fd5b810190602081018135600160201b8111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460208302840111600160201b831117156102f157600080fd5b6040805160608181018352949693958335956020850135959385013594818101359460808201359460a08301949193919261014081019260e090910190600390839083908082843760009201919091525091949392602081019250359050600160201b81111561036057600080fd5b82018360208201111561037257600080fd5b803590602001918460018302840111600160201b8311171561039357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103e557600080fd5b8201836020820111156103f757600080fd5b803590602001918460018302840111600160201b8311171561041857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610e249050565b61010c6113cb565b6101266004803603602081101561047c57600080fd5b50356113d1565b6101266113ee565b610102600480360360e08110156104a157600080fd5b810190602081018135600160201b8111156104bb57600080fd5b8201836020820111156104cd57600080fd5b803590602001918460208302840111600160201b831117156104ee57600080fd5b919350915080359060208101359060408101359060608101359060808101359060a001356113fd565b610102600480360361014081101561052e57600080fd5b810190602081018135600160201b81111561054857600080fd5b82018360208201111561055a57600080fd5b803590602001918460208302840111600160201b8311171561057b57600080fd5b91935091506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166116f5565b61010c611846565b610126600480360360208110156105e857600080fd5b503561188c565b6004546001600160a01b03163314610641576040805162461bcd60e51b815260206004820152601060248201526f2727aa2fa922a9afa922a1a2a4ab22a960811b604482015290519081900360640190fd5b61064a336118b3565b565b600a5481565b6007546001600160a01b031681565b60005460ff165b90565b60006106826008544361193390919063ffffffff16565b905061068c611846565b81116040518060400160405280601081526020016f54494d454f55545f444541444c494e4560801b815250906107405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107055781810151838201526020016106ed565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506001600b5460ff16600281111561075457fe5b1415610790576040517f2b92a4b014281aa2424baba9ea60bf4f26833d1c1fbd873e51cd1a6caeef48f090600090a161078b611995565b6107c1565b6040517f4e1f1f06cf69d199fcdb4d87a5a92d5248ca6b540e9fc2d3698927c5002a236a90600090a16107c1611a12565b50565b600c5481565b60006001600b5460ff1660028111156107df57fe5b14156107f757506006546001600160a01b0316610668565b6002600b5460ff16600281111561080a57fe5b141561082257506007546001600160a01b0316610668565b6040805162461bcd60e51b81526020600482015260076024820152662727afaa2aa92760c91b604482015290519081900360640190fd5b600b5460ff1681565b61086a6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906108ed5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506108f6611846565b60085461090a90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b8152509061097d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060008282600019810181811061099057fe5b90506020020135146109dd57600186116109dd576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d213d49560ba1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b031663dc72a33b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2d57600080fd5b505afa158015610a41573d6000803e3d6000fd5b505050506040513d6020811015610a5757600080fd5b50519050610a658782611a6e565b6001018214610aa7576040805162461bcd60e51b815260206004820152600960248201526810d55517d0d3d5539560ba1b604482015290519081900360640190fd5b8583836000198101818110610ab857fe5b905060200201351415610afd576040805162461bcd60e51b815260206004820152600860248201526714d0535157d1539160c21b604482015290519081900360640190fd5b610b078585611a86565b83836000818110610b1457fe5b9050602002013514610b62576040805162461bcd60e51b81526020600482015260126024820152717365676d656e74207072652d6669656c647360701b604482015290519081900360640190fd5b600083838281610b6e57fe5b905060200201351415610bbc576040805162461bcd60e51b8152602060048201526011602482015270155394915050d21050931157d4d5105495607a1b604482015290519081900360640190fd5b610bcc888863ffffffff611ab216565b8510610c18576040805162461bcd60e51b81526020600482015260166024820152750d2dcecc2d8d2c840e6cacedacadce840d8cadccee8d60531b604482015290519081900360640190fd5b6000610c39898986866000818110610c2c57fe5b905060200201358a611b13565b9050610c4a600c54828e8e8e611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b81525090610cb75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000610cfa8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e92508d9150611b9f9050565b905080600c81905550807f0a2bdfea671da507e80b0cbae49dd25100a5bdacc5dff43a9163a3fcbd7c3c7d8b8b888860405180858152602001848152602001806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f191690920182900397509095505050505050a25060029150610d839050565b600b5460ff166002811115610d9457fe5b1415610dd657610dc1610db26008544361193390919063ffffffff16565b600a549063ffffffff61193316565b600a55600b805460ff19166001179055610e0e565b610dfd610dee6008544361193390919063ffffffff16565b6009549063ffffffff61193316565b600955600b805460ff191660021790555b5050436008555050505050505050565b60085481565b610e2c6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b81525090610eaf5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50610eb8611846565b600854610ecc90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b81525090610f3f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000806000610f4d61205b565b60018560ff1681548110610f5d57fe5b6000918252602090912001546040516323eed0eb60e11b81526001600160a01b03909116906347dda1d6906002908d908d908c908c90600481019060440186825b81546001600160a01b03168152600190910190602001808311610f9e57505085815260200184604080828437600081840152601f19601f8201169050808301925050508060200180602001838103835285818151815260200191508051906020019080838360005b8381101561101e578181015183820152602001611006565b50505050905090810190601f16801561104b5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561107e578181015183820152602001611066565b50505050905090810190601f1680156110ab5780820380516001836020036101000a031916815260200191505b5097505050505050505060c06040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060c081101561110657600080fd5b5080516020820151600554919550935060409091019150821115611165576040805162461bcd60e51b8152602060048201526011602482015270544f4f5f4d414e595f4d4553534147455360781b604482015290519081900360640190fd5b6111758d8d63ffffffff611ab216565b8851106111b4576040805162461bcd60e51b815260206004820152600860248201526713d4d417d0d3d39560c21b604482015290519081900360640190fd5b6111c48d8d63ffffffff611ab216565b6111e767ffffffffffffffff85168a60005b60200201519063ffffffff611ab216565b1015611226576040805162461bcd60e51b815260206004820152600960248201526813d4d417d4d213d49560ba1b604482015290519081900360640190fd5b611239893560208b01358a868686611ce5565b8b1415611279576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6112968d8d6112908d8d3560208f01358e88611d84565b8e611b13565b93505050506112aa600c54828f8f8f611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906113175760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506040517f117efdf1fdd8be5a6ff0fb3c32333d7033bbd9523924bd0d9ca28f43540516f590600090a1611349611db5565b506002600b5460ff16600281111561135d57fe5b14156113905761137b610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556113b9565b6113a8610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b50504360085550505050505050505050565b60095481565b600281600281106113de57fe5b01546001600160a01b0316905081565b6006546001600160a01b031681565b6114056107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906114885760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50611491611846565b6008546114a590439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b815250906115185760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060006115258383611a86565b9050600061153587878488611b13565b9050611546600c54828c8c8c611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906115b35760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506115c4878763ffffffff611ab216565b841015611603576040805162461bcd60e51b81526020600482015260086024820152671393d517d0d3d39560c21b604482015290519081900360640190fd5b84821415611644576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6040517ff62bb8ab32072c0ea3337f57276b8e66418eca0dfcc5e3b8aef4905d43e8f8ca90600090a1611675611db5565b5060029050600b5460ff16600281111561168b57fe5b14156116be576116a9610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556116e7565b6116d6610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b505043600855505050505050565b6000600b5460ff16600281111561170857fe5b146040518060400160405280600f81526020016e4348414c5f494e49545f535441544560881b8152509061177d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5061178a60018c8c612079565b50600480546001600160a01b03199081166001600160a01b038c8116919091179092556005899055600680548216898416179055600780549091168783161790556009859055600a849055600b805460ff19166002908117909155600c8a905543600855604080518082019091528483168152918316602083015261180f91816120dc565b506040517f7003482dc89fcecb9f14e280f21ee716bd54187f7f3b0ab5ed78f3648218f2de90600090a15050505050505050505050565b60006001600b5460ff16600281111561185b57fe5b141561186a5750600954610668565b6002600b5460ff16600281111561187d57fe5b14156108225750600a54610668565b6001818154811061189957fe5b6000918252602090912001546001600160a01b0316905081565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff16156119265760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50806001600160a01b0316ff5b60008282111561198a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6004805460075460065460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b505af1158015611a05573d6000803e3d6000fd5b5050505061064a336118b3565b6004805460065460075460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b600081831015611a7f57508161198f565b508061198f565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600082820183811015611b0c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b6000611b93848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250869250899150611dbc9050565b90951495945050505050565b82516000906000190160608167ffffffffffffffff81118015611bc157600080fd5b50604051908082528060200260200182016040528015611beb578160200160208202803683370190505b5090506000611bfa8584611e8a565b90506000869050611c3581838a600081518110611c1357fe5b60200260200101518b600181518110611c2857fe5b6020026020010151611b13565b83600081518110611c4257fe5b6020908102919091010152611c5d818363ffffffff611ab216565b9050611c698685611ea8565b915060015b84811015611ccf57611c9e82848b8481518110611c8757fe5b60200260200101518c8560010181518110611c2857fe5b848281518110611caa57fe5b6020908102919091010152611cc5828463ffffffff611ab216565b9150600101611c6e565b50611cd983611ebb565b98975050505050505050565b600080611d0e83600260200201518914611d00576001611d03565b60005b60ff168760016111d6565b90506000611d3884600360200201518914611d2a576001611d2d565b60005b60ff168860026111d6565b9050611d77611d5367ffffffffffffffff88168960006111d6565b602086015160408701516060880151611d72928a929091889088612010565b611a86565b9998505050505050505050565b8151815160208401516040850151600093611dab939092611d72928b92918b918b90612010565b9695505050505050565b6000600c55565b8251600090610100811115611dd057600080fd5b8260005b82811015611e805760028606611e2d57868181518110611df057fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150611e72565b81878281518110611e3a57fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101611dd4565b5095945050505050565b6000818381611e9557fe5b06828481611e9f57fe5b04019392505050565b6000818381611eb357fe5b049392505050565b6000815b600181511115611ff35760606002825160010181611ed957fe5b0467ffffffffffffffff81118015611ef057600080fd5b50604051908082528060200260200182016040528015611f1a578160200160208202803683370190505b50905060005b8151811015611feb578251816002026001011015611fb357828160020281518110611f4757fe5b6020026020010151838260020260010181518110611f6157fe5b6020026020010151604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120828281518110611fa257fe5b602002602001018181525050611fe3565b828160020281518110611fc257fe5b6020026020010151828281518110611fd657fe5b6020026020010181815250505b600101611f20565b509050611ebf565b8060008151811061200057fe5b6020026020010151915050919050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b60405180608001604052806004906020820280368337509192915050565b8280548282559060005260206000209081019282156120cc579160200282015b828111156120cc5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612099565b506120d8929150612124565b5090565b82600281019282156120cc579160200282015b828111156120cc57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ef565b61066891905b808211156120d85780546001600160a01b031916815560010161212a56fea2646970667358221220730f9074be73234957976483a3d9166828f711f999414d0055347cf9666d536964736f6c634300060b0033608060405234801561001057600080fd5b506040516105d13803806105d18339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100aa16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100a4816001600160e01b036100ae16565b50610124565b3390565b6100c18161011e60201b61034c1760201c565b6100fc5760405162461bcd60e51b815260040180806020018281038252603381526020018061059e6033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b61046b806101336000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610084578063715018a6146100a85780638da5cb5b146100b0578063f2fde38b146100b8575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b03166100de565b005b61008c610180565b604080516001600160a01b039092168252519081900360200190f35b61008261018f565b61008c61023b565b610082600480360360208110156100ce57600080fd5b50356001600160a01b031661024a565b6100e6610352565b6001600160a01b03166100f761023b565b6001600160a01b031614610140576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b61014981610356565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001546001600160a01b031690565b610197610352565b6001600160a01b03166101a861023b565b6001600160a01b0316146101f1576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610252610352565b6001600160a01b031661026361023b565b6001600160a01b0316146102ac576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b6001600160a01b0381166102f15760405162461bcd60e51b81526004018080602001828103825260268152602001806103bd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b3390565b61035f8161034c565b61039a5760405162461bcd60e51b81526004018080602001828103825260338152602001806103e36033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e082b44760d7484daad017396b93ce8fb7ce2f11f19db0d8429a61aaedbc6f4564736f6c634300060b00335570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374", } // ChallengeFactoryABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgetestcontracts/ChallengeTester.go b/packages/arb-util/ethbridgetestcontracts/ChallengeTester.go index b344911367..edb4aef4c1 100755 --- a/packages/arb-util/ethbridgetestcontracts/ChallengeTester.go +++ b/packages/arb-util/ethbridgetestcontracts/ChallengeTester.go @@ -31,7 +31,7 @@ var ( // ChallengeTesterMetaData contains all meta data concerning the ChallengeTester contract. var ChallengeTesterMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"contractIOneStepProof[]\",\"name\":\"_executors\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"challenge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeCompleted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeExecutionBisectionDegree\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengeFactory\",\"outputs\":[{\"internalType\":\"contractChallengeFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_winner\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"_loser\",\"type\":\"address\"}],\"name\":\"completeChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"loser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"executionHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"maxMessageCount\",\"type\":\"uint256\"},{\"internalType\":\"addresspayable\",\"name\":\"asserter\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"challenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"asserterTimeLeft\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"challengerTimeLeft\",\"type\":\"uint256\"},{\"internalType\":\"contractISequencerInbox\",\"name\":\"sequencerBridge\",\"type\":\"address\"},{\"internalType\":\"contractIBridge\",\"name\":\"delayedBridge\",\"type\":\"address\"}],\"name\":\"startChallenge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"winner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405261019060045534801561001657600080fd5b50604051613a51380380613a518339818101604052602081101561003957600080fd5b810190808051604051939291908464010000000082111561005957600080fd5b90830190602082018581111561006e57600080fd5b825186602082028301116401000000008211171561008b57600080fd5b82525081516020918201928201910280838360005b838110156100b85781810151838201526020016100a0565b50505050905001604052505050806040516100d290610157565b6020808252825181830152825182916040830191858201910280838360005b838110156101095781810151838201526020016100f1565b5050505090500192505050604051809103906000f080158015610130573d6000803e3d6000fd5b50600380546001600160a01b0319166001600160a01b039290921691909117905550610164565b6135bf8061049283390190565b61031f806101736000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c80635dbaf68b1461007d578063d2ef7398146100a1578063dc72a33b146100a9578063dfbf53ae146100c3578063e1022602146100cb578063e82898b3146100e7578063f5aa337c146100ef578063fa7803e614610148575b600080fd5b610085610176565b604080516001600160a01b039092168252519081900360200190f35b610085610185565b6100b1610194565b60408051918252519081900360200190f35b61008561019a565b6100d36101a9565b604080519115158252519081900360200190f35b6100856101b9565b610146600480360361010081101561010657600080fd5b508035906020810135906001600160a01b036040820135811691606081013582169160808201359160a08101359160c082013581169160e00135166101c8565b005b6101466004803603604081101561015e57600080fd5b506001600160a01b03813581169160200135166102a8565b6003546001600160a01b031681565b6000546001600160a01b031681565b60045481565b6001546001600160a01b031681565b600054600160a01b900460ff1681565b6002546001600160a01b031681565b60035460408051638ecaab1160e01b8152306004820152602481018b9052604481018a90526001600160a01b038981166064830152888116608483015260a4820188905260c4820187905285811660e483015284811661010483015291519190921691638ecaab11916101248083019260209291908290030181600087803b15801561025357600080fd5b505af1158015610267573d6000803e3d6000fd5b505050506040513d602081101561027d57600080fd5b5051600080546001600160a01b0319166001600160a01b039092169190911790555050505050505050565b600180546001600160a01b039384166001600160a01b031991821617909155600280549290931691161790556000805460ff60a01b1916600160a01b17905556fea2646970667358221220d9dfa8e6dcff8f5ded3fd1733d8e73f2fa450240b53dfb9b77efc396772ea65464736f6c634300060b0033608060405234801561001057600080fd5b506040516135bf3803806135bf8339818101604052602081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825186602082028301116401000000008211171561008557600080fd5b82525081516020918201928201910280838360005b838110156100b257818101518382015260200161009a565b5050505091909101604052505082516100d492506000915060208401906101bb565b5060006040516100e390610220565b604051809103906000f0801580156100ff573d6000803e3d6000fd5b5090508060405161010f9061022d565b6001600160a01b03909116815260405190819003602001906000f08015801561013c573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b0392831617908190556040805163f2fde38b60e01b81523360048201529051919092169163f2fde38b91602480830192600092919082900301818387803b15801561019c57600080fd5b505af11580156101b0573d6000803e3d6000fd5b505050505050610261565b828054828255906000526020600020908101928215610210579160200282015b8281111561021057825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906101db565b5061021c92915061023a565b5090565b6121ab80610e4383390190565b6105d180612fee83390190565b61025e91905b8082111561021c5780546001600160a01b0319168155600101610240565b90565b610bd3806102706000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806359659e90146100465780638ecaab111461006a578063f97a05df146100cc575b600080fd5b61004e6100e9565b604080516001600160a01b039092168252519081900360200190f35b61004e600480360361012081101561008157600080fd5b506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166100f8565b61004e600480360360208110156100e257600080fd5b50356102af565b6001546001600160a01b031681565b60015460405160009182916001600160a01b0390911690610118906102d6565b6001600160a01b03909116815260406020820181905260008183018190529051918290036080019190f080158015610154573d6000803e3d6000fd5b509050806001600160a01b031663e0d42b8e60008d8d8d8d8d8d8d8d8d6040518b63ffffffff1660e01b815260040180806020018b6001600160a01b03166001600160a01b031681526020018a8152602001898152602001886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001868152602001858152602001846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b0316815260200182810382528c818154815260200191508054801561025f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610241575b50509b505050505050505050505050600060405180830381600087803b15801561028857600080fd5b505af115801561029c573d6000803e3d6000fd5b50929d9c50505050505050505050505050565b600081815481106102bc57fe5b6000918252602090912001546001600160a01b0316905081565b6108ba806102e48339019056fe60806040526040516108ba3803806108ba8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e626561636f6e0000000000000000000000008252519081900360140190206000805160206107fa83398151915260001990910114925061012a91505057fe5b61013d82826001600160e01b0361014416565b50506104f3565b610157826102a260201b6100311760201c565b6101925760405162461bcd60e51b815260040180806020018281038252602581526020018061083b6025913960400191505060405180910390fd5b61020a826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ce57600080fd5b505afa1580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b50516102a2602090811b61003117901c565b6102455760405162461bcd60e51b81526004018080602001828103825260348152602001806108866034913960400191505060405180910390fd5b6000805160206107fa83398151915282815581511561029d5761029b6102726001600160e01b036102a816565b8360405180606001604052806021815260200161081a6021913961032460201b6100371760201c565b505b505050565b3b151590565b60006102bb6001600160e01b0361043c16565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d602081101561031d57600080fd5b5051905090565b6060610338846001600160e01b036102a216565b6103735760405162461bcd60e51b81526004018080602001828103825260268152602001806108606026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106103b15780518252601f199092019160209182019101610392565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b5090925090506104308282866001600160e01b0361044f16565b925050505b9392505050565b6000805160206107fa8339815191525490565b6060831561045e575081610435565b82511561046e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b85781810151838201526020016104a0565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f8806105026000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013c565b6101af565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029d6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106100bb5780518252601f19909201916020918201910161009c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101308282866101d3565b925050505b9392505050565b6000610146610277565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101ce573d6000f35b3d6000fd5b606083156101e2575081610135565b8251156101f25782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023c578181015183820152602001610224565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a264697066735822122053dcbd8c0863f6517a5117ac7b858fc300ba6a67685a286f909e85f8150b82c764736f6c634300060b0033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220bfe03482afd40c4416f944fd566dc2ab4f1db1cfcc8fd221f8cf19ac35f8f6fd64736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff1916600117905561217e8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063925f9a9611610092578063925f9a9614610285578063959792011461028d5780639a9e4f441461045e578063a3c4470514610466578063bb4af0b114610483578063deda41151461048b578063e0d42b8e14610517578063e87e3589146105ca578063f97a05df146105d2576100f5565b806214ebe7146100fa57806341e8510c14610104578063534db0e21461011e5780636f791d291461014257806370dea79a1461015e578063843d5a5c146101665780638a8cd2181461016e5780638b299903146101765780638e7b84c5146101a2575b600080fd5b6101026105ef565b005b61010c61064c565b60408051918252519081900360200190f35b610126610652565b604080516001600160a01b039092168252519081900360200190f35b61014a610661565b604080519115158252519081900360200190f35b61010261066b565b61010c6107c4565b6101266107ca565b61017e610859565b6040518082600281111561018e57fe5b60ff16815260200191505060405180910390f35b61010260048036036101008110156101b957600080fd5b810190602081018135600160201b8111156101d357600080fd5b8201836020820111156101e557600080fd5b803590602001918460208302840111600160201b8311171561020657600080fd5b9193909282359260208101359260408201359260608301359260808101359260a082013592909160e081019060c00135600160201b81111561024757600080fd5b82018360208201111561025957600080fd5b803590602001918460208302840111600160201b8311171561027a57600080fd5b509092509050610862565b61010c610e1e565b61010260048036036101c08110156102a457600080fd5b810190602081018135600160201b8111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460208302840111600160201b831117156102f157600080fd5b6040805160608181018352949693958335956020850135959385013594818101359460808201359460a08301949193919261014081019260e090910190600390839083908082843760009201919091525091949392602081019250359050600160201b81111561036057600080fd5b82018360208201111561037257600080fd5b803590602001918460018302840111600160201b8311171561039357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103e557600080fd5b8201836020820111156103f757600080fd5b803590602001918460018302840111600160201b8311171561041857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610e249050565b61010c6113cb565b6101266004803603602081101561047c57600080fd5b50356113d1565b6101266113ee565b610102600480360360e08110156104a157600080fd5b810190602081018135600160201b8111156104bb57600080fd5b8201836020820111156104cd57600080fd5b803590602001918460208302840111600160201b831117156104ee57600080fd5b919350915080359060208101359060408101359060608101359060808101359060a001356113fd565b610102600480360361014081101561052e57600080fd5b810190602081018135600160201b81111561054857600080fd5b82018360208201111561055a57600080fd5b803590602001918460208302840111600160201b8311171561057b57600080fd5b91935091506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166116f5565b61010c611846565b610126600480360360208110156105e857600080fd5b503561188c565b6004546001600160a01b03163314610641576040805162461bcd60e51b815260206004820152601060248201526f2727aa2fa922a9afa922a1a2a4ab22a960811b604482015290519081900360640190fd5b61064a336118b3565b565b600a5481565b6007546001600160a01b031681565b60005460ff165b90565b60006106826008544361193390919063ffffffff16565b905061068c611846565b81116040518060400160405280601081526020016f54494d454f55545f444541444c494e4560801b815250906107405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107055781810151838201526020016106ed565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506001600b5460ff16600281111561075457fe5b1415610790576040517f2b92a4b014281aa2424baba9ea60bf4f26833d1c1fbd873e51cd1a6caeef48f090600090a161078b611995565b6107c1565b6040517f4e1f1f06cf69d199fcdb4d87a5a92d5248ca6b540e9fc2d3698927c5002a236a90600090a16107c1611a12565b50565b600c5481565b60006001600b5460ff1660028111156107df57fe5b14156107f757506006546001600160a01b0316610668565b6002600b5460ff16600281111561080a57fe5b141561082257506007546001600160a01b0316610668565b6040805162461bcd60e51b81526020600482015260076024820152662727afaa2aa92760c91b604482015290519081900360640190fd5b600b5460ff1681565b61086a6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906108ed5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506108f6611846565b60085461090a90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b8152509061097d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060008282600019810181811061099057fe5b90506020020135146109dd57600186116109dd576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d213d49560ba1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b031663dc72a33b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2d57600080fd5b505afa158015610a41573d6000803e3d6000fd5b505050506040513d6020811015610a5757600080fd5b50519050610a658782611a6e565b6001018214610aa7576040805162461bcd60e51b815260206004820152600960248201526810d55517d0d3d5539560ba1b604482015290519081900360640190fd5b8583836000198101818110610ab857fe5b905060200201351415610afd576040805162461bcd60e51b815260206004820152600860248201526714d0535157d1539160c21b604482015290519081900360640190fd5b610b078585611a86565b83836000818110610b1457fe5b9050602002013514610b62576040805162461bcd60e51b81526020600482015260126024820152717365676d656e74207072652d6669656c647360701b604482015290519081900360640190fd5b600083838281610b6e57fe5b905060200201351415610bbc576040805162461bcd60e51b8152602060048201526011602482015270155394915050d21050931157d4d5105495607a1b604482015290519081900360640190fd5b610bcc888863ffffffff611ab216565b8510610c18576040805162461bcd60e51b81526020600482015260166024820152750d2dcecc2d8d2c840e6cacedacadce840d8cadccee8d60531b604482015290519081900360640190fd5b6000610c39898986866000818110610c2c57fe5b905060200201358a611b13565b9050610c4a600c54828e8e8e611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b81525090610cb75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000610cfa8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e92508d9150611b9f9050565b905080600c81905550807f0a2bdfea671da507e80b0cbae49dd25100a5bdacc5dff43a9163a3fcbd7c3c7d8b8b888860405180858152602001848152602001806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f191690920182900397509095505050505050a25060029150610d839050565b600b5460ff166002811115610d9457fe5b1415610dd657610dc1610db26008544361193390919063ffffffff16565b600a549063ffffffff61193316565b600a55600b805460ff19166001179055610e0e565b610dfd610dee6008544361193390919063ffffffff16565b6009549063ffffffff61193316565b600955600b805460ff191660021790555b5050436008555050505050505050565b60085481565b610e2c6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b81525090610eaf5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50610eb8611846565b600854610ecc90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b81525090610f3f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000806000610f4d61205b565b60018560ff1681548110610f5d57fe5b6000918252602090912001546040516323eed0eb60e11b81526001600160a01b03909116906347dda1d6906002908d908d908c908c90600481019060440186825b81546001600160a01b03168152600190910190602001808311610f9e57505085815260200184604080828437600081840152601f19601f8201169050808301925050508060200180602001838103835285818151815260200191508051906020019080838360005b8381101561101e578181015183820152602001611006565b50505050905090810190601f16801561104b5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561107e578181015183820152602001611066565b50505050905090810190601f1680156110ab5780820380516001836020036101000a031916815260200191505b5097505050505050505060c06040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060c081101561110657600080fd5b5080516020820151600554919550935060409091019150821115611165576040805162461bcd60e51b8152602060048201526011602482015270544f4f5f4d414e595f4d4553534147455360781b604482015290519081900360640190fd5b6111758d8d63ffffffff611ab216565b8851106111b4576040805162461bcd60e51b815260206004820152600860248201526713d4d417d0d3d39560c21b604482015290519081900360640190fd5b6111c48d8d63ffffffff611ab216565b6111e767ffffffffffffffff85168a60005b60200201519063ffffffff611ab216565b1015611226576040805162461bcd60e51b815260206004820152600960248201526813d4d417d4d213d49560ba1b604482015290519081900360640190fd5b611239893560208b01358a868686611ce5565b8b1415611279576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6112968d8d6112908d8d3560208f01358e88611d84565b8e611b13565b93505050506112aa600c54828f8f8f611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906113175760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506040517f117efdf1fdd8be5a6ff0fb3c32333d7033bbd9523924bd0d9ca28f43540516f590600090a1611349611db5565b506002600b5460ff16600281111561135d57fe5b14156113905761137b610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556113b9565b6113a8610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b50504360085550505050505050505050565b60095481565b600281600281106113de57fe5b01546001600160a01b0316905081565b6006546001600160a01b031681565b6114056107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906114885760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50611491611846565b6008546114a590439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b815250906115185760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060006115258383611a86565b9050600061153587878488611b13565b9050611546600c54828c8c8c611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906115b35760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506115c4878763ffffffff611ab216565b841015611603576040805162461bcd60e51b81526020600482015260086024820152671393d517d0d3d39560c21b604482015290519081900360640190fd5b84821415611644576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6040517ff62bb8ab32072c0ea3337f57276b8e66418eca0dfcc5e3b8aef4905d43e8f8ca90600090a1611675611db5565b5060029050600b5460ff16600281111561168b57fe5b14156116be576116a9610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556116e7565b6116d6610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b505043600855505050505050565b6000600b5460ff16600281111561170857fe5b146040518060400160405280600f81526020016e4348414c5f494e49545f535441544560881b8152509061177d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5061178a60018c8c612079565b50600480546001600160a01b03199081166001600160a01b038c8116919091179092556005899055600680548216898416179055600780549091168783161790556009859055600a849055600b805460ff19166002908117909155600c8a905543600855604080518082019091528483168152918316602083015261180f91816120dc565b506040517f7003482dc89fcecb9f14e280f21ee716bd54187f7f3b0ab5ed78f3648218f2de90600090a15050505050505050505050565b60006001600b5460ff16600281111561185b57fe5b141561186a5750600954610668565b6002600b5460ff16600281111561187d57fe5b14156108225750600a54610668565b6001818154811061189957fe5b6000918252602090912001546001600160a01b0316905081565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff16156119265760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50806001600160a01b0316ff5b60008282111561198a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6004805460075460065460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b505af1158015611a05573d6000803e3d6000fd5b5050505061064a336118b3565b6004805460065460075460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b600081831015611a7f57508161198f565b508061198f565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600082820183811015611b0c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b6000611b93848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250869250899150611dbc9050565b90951495945050505050565b82516000906000190160608167ffffffffffffffff81118015611bc157600080fd5b50604051908082528060200260200182016040528015611beb578160200160208202803683370190505b5090506000611bfa8584611e8a565b90506000869050611c3581838a600081518110611c1357fe5b60200260200101518b600181518110611c2857fe5b6020026020010151611b13565b83600081518110611c4257fe5b6020908102919091010152611c5d818363ffffffff611ab216565b9050611c698685611ea8565b915060015b84811015611ccf57611c9e82848b8481518110611c8757fe5b60200260200101518c8560010181518110611c2857fe5b848281518110611caa57fe5b6020908102919091010152611cc5828463ffffffff611ab216565b9150600101611c6e565b50611cd983611ebb565b98975050505050505050565b600080611d0e83600260200201518914611d00576001611d03565b60005b60ff168760016111d6565b90506000611d3884600360200201518914611d2a576001611d2d565b60005b60ff168860026111d6565b9050611d77611d5367ffffffffffffffff88168960006111d6565b602086015160408701516060880151611d72928a929091889088612010565b611a86565b9998505050505050505050565b8151815160208401516040850151600093611dab939092611d72928b92918b918b90612010565b9695505050505050565b6000600c55565b8251600090610100811115611dd057600080fd5b8260005b82811015611e805760028606611e2d57868181518110611df057fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150611e72565b81878281518110611e3a57fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101611dd4565b5095945050505050565b6000818381611e9557fe5b06828481611e9f57fe5b04019392505050565b6000818381611eb357fe5b049392505050565b6000815b600181511115611ff35760606002825160010181611ed957fe5b0467ffffffffffffffff81118015611ef057600080fd5b50604051908082528060200260200182016040528015611f1a578160200160208202803683370190505b50905060005b8151811015611feb578251816002026001011015611fb357828160020281518110611f4757fe5b6020026020010151838260020260010181518110611f6157fe5b6020026020010151604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120828281518110611fa257fe5b602002602001018181525050611fe3565b828160020281518110611fc257fe5b6020026020010151828281518110611fd657fe5b6020026020010181815250505b600101611f20565b509050611ebf565b8060008151811061200057fe5b6020026020010151915050919050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b60405180608001604052806004906020820280368337509192915050565b8280548282559060005260206000209081019282156120cc579160200282015b828111156120cc5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612099565b506120d8929150612124565b5090565b82600281019282156120cc579160200282015b828111156120cc57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ef565b61066891905b808211156120d85780546001600160a01b031916815560010161212a56fea264697066735822122004e3428e1101f2e9ca875b69bcd83c6c08a8ff949a012ca33e2e16dfff5819f564736f6c634300060b0033608060405234801561001057600080fd5b506040516105d13803806105d18339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100aa16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100a4816001600160e01b036100ae16565b50610124565b3390565b6100c18161011e60201b61034c1760201c565b6100fc5760405162461bcd60e51b815260040180806020018281038252603381526020018061059e6033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b61046b806101336000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610084578063715018a6146100a85780638da5cb5b146100b0578063f2fde38b146100b8575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b03166100de565b005b61008c610180565b604080516001600160a01b039092168252519081900360200190f35b61008261018f565b61008c61023b565b610082600480360360208110156100ce57600080fd5b50356001600160a01b031661024a565b6100e6610352565b6001600160a01b03166100f761023b565b6001600160a01b031614610140576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b61014981610356565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001546001600160a01b031690565b610197610352565b6001600160a01b03166101a861023b565b6001600160a01b0316146101f1576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610252610352565b6001600160a01b031661026361023b565b6001600160a01b0316146102ac576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b6001600160a01b0381166102f15760405162461bcd60e51b81526004018080602001828103825260268152602001806103bd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b3390565b61035f8161034c565b61039a5760405162461bcd60e51b81526004018080602001828103825260338152602001806103e36033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e082b44760d7484daad017396b93ce8fb7ce2f11f19db0d8429a61aaedbc6f4564736f6c634300060b00335570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374", + Bin: "0x608060405261019060045534801561001657600080fd5b50604051613a51380380613a518339818101604052602081101561003957600080fd5b810190808051604051939291908464010000000082111561005957600080fd5b90830190602082018581111561006e57600080fd5b825186602082028301116401000000008211171561008b57600080fd5b82525081516020918201928201910280838360005b838110156100b85781810151838201526020016100a0565b50505050905001604052505050806040516100d290610157565b6020808252825181830152825182916040830191858201910280838360005b838110156101095781810151838201526020016100f1565b5050505090500192505050604051809103906000f080158015610130573d6000803e3d6000fd5b50600380546001600160a01b0319166001600160a01b039290921691909117905550610164565b6135bf8061049283390190565b61031f806101736000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c80635dbaf68b1461007d578063d2ef7398146100a1578063dc72a33b146100a9578063dfbf53ae146100c3578063e1022602146100cb578063e82898b3146100e7578063f5aa337c146100ef578063fa7803e614610148575b600080fd5b610085610176565b604080516001600160a01b039092168252519081900360200190f35b610085610185565b6100b1610194565b60408051918252519081900360200190f35b61008561019a565b6100d36101a9565b604080519115158252519081900360200190f35b6100856101b9565b610146600480360361010081101561010657600080fd5b508035906020810135906001600160a01b036040820135811691606081013582169160808201359160a08101359160c082013581169160e00135166101c8565b005b6101466004803603604081101561015e57600080fd5b506001600160a01b03813581169160200135166102a8565b6003546001600160a01b031681565b6000546001600160a01b031681565b60045481565b6001546001600160a01b031681565b600054600160a01b900460ff1681565b6002546001600160a01b031681565b60035460408051638ecaab1160e01b8152306004820152602481018b9052604481018a90526001600160a01b038981166064830152888116608483015260a4820188905260c4820187905285811660e483015284811661010483015291519190921691638ecaab11916101248083019260209291908290030181600087803b15801561025357600080fd5b505af1158015610267573d6000803e3d6000fd5b505050506040513d602081101561027d57600080fd5b5051600080546001600160a01b0319166001600160a01b039092169190911790555050505050505050565b600180546001600160a01b039384166001600160a01b031991821617909155600280549290931691161790556000805460ff60a01b1916600160a01b17905556fea2646970667358221220e7df99fa9572dc5a270e0699f9e28fc3f73aecaa6a36e7b88a30ca801f58976564736f6c634300060b0033608060405234801561001057600080fd5b506040516135bf3803806135bf8339818101604052602081101561003357600080fd5b810190808051604051939291908464010000000082111561005357600080fd5b90830190602082018581111561006857600080fd5b825186602082028301116401000000008211171561008557600080fd5b82525081516020918201928201910280838360005b838110156100b257818101518382015260200161009a565b5050505091909101604052505082516100d492506000915060208401906101bb565b5060006040516100e390610220565b604051809103906000f0801580156100ff573d6000803e3d6000fd5b5090508060405161010f9061022d565b6001600160a01b03909116815260405190819003602001906000f08015801561013c573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b0392831617908190556040805163f2fde38b60e01b81523360048201529051919092169163f2fde38b91602480830192600092919082900301818387803b15801561019c57600080fd5b505af11580156101b0573d6000803e3d6000fd5b505050505050610261565b828054828255906000526020600020908101928215610210579160200282015b8281111561021057825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906101db565b5061021c92915061023a565b5090565b6121ab80610e4383390190565b6105d180612fee83390190565b61025e91905b8082111561021c5780546001600160a01b0319168155600101610240565b90565b610bd3806102706000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806359659e90146100465780638ecaab111461006a578063f97a05df146100cc575b600080fd5b61004e6100e9565b604080516001600160a01b039092168252519081900360200190f35b61004e600480360361012081101561008157600080fd5b506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166100f8565b61004e600480360360208110156100e257600080fd5b50356102af565b6001546001600160a01b031681565b60015460405160009182916001600160a01b0390911690610118906102d6565b6001600160a01b03909116815260406020820181905260008183018190529051918290036080019190f080158015610154573d6000803e3d6000fd5b509050806001600160a01b031663e0d42b8e60008d8d8d8d8d8d8d8d8d6040518b63ffffffff1660e01b815260040180806020018b6001600160a01b03166001600160a01b031681526020018a8152602001898152602001886001600160a01b03166001600160a01b03168152602001876001600160a01b03166001600160a01b03168152602001868152602001858152602001846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b0316815260200182810382528c818154815260200191508054801561025f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610241575b50509b505050505050505050505050600060405180830381600087803b15801561028857600080fd5b505af115801561029c573d6000803e3d6000fd5b50929d9c50505050505050505050505050565b600081815481106102bc57fe5b6000918252602090912001546001600160a01b0316905081565b6108ba806102e48339019056fe60806040526040516108ba3803806108ba8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e626561636f6e0000000000000000000000008252519081900360140190206000805160206107fa83398151915260001990910114925061012a91505057fe5b61013d82826001600160e01b0361014416565b50506104f3565b610157826102a260201b6100311760201c565b6101925760405162461bcd60e51b815260040180806020018281038252602581526020018061083b6025913960400191505060405180910390fd5b61020a826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ce57600080fd5b505afa1580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b50516102a2602090811b61003117901c565b6102455760405162461bcd60e51b81526004018080602001828103825260348152602001806108866034913960400191505060405180910390fd5b6000805160206107fa83398151915282815581511561029d5761029b6102726001600160e01b036102a816565b8360405180606001604052806021815260200161081a6021913961032460201b6100371760201c565b505b505050565b3b151590565b60006102bb6001600160e01b0361043c16565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d602081101561031d57600080fd5b5051905090565b6060610338846001600160e01b036102a216565b6103735760405162461bcd60e51b81526004018080602001828103825260268152602001806108606026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106103b15780518252601f199092019160209182019101610392565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b5090925090506104308282866001600160e01b0361044f16565b925050505b9392505050565b6000805160206107fa8339815191525490565b6060831561045e575081610435565b82511561046e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b85781810151838201526020016104a0565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f8806105026000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013c565b6101af565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029d6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106100bb5780518252601f19909201916020918201910161009c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101308282866101d3565b925050505b9392505050565b6000610146610277565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101ce573d6000f35b3d6000fd5b606083156101e2575081610135565b8251156101f25782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023c578181015183820152602001610224565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a264697066735822122053dcbd8c0863f6517a5117ac7b858fc300ba6a67685a286f909e85f8150b82c764736f6c634300060b0033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220f0deb59cae5c82109427b2081f30691b0683bab3f4b27c916170ee73b803f7d764736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff1916600117905561217e8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063925f9a9611610092578063925f9a9614610285578063959792011461028d5780639a9e4f441461045e578063a3c4470514610466578063bb4af0b114610483578063deda41151461048b578063e0d42b8e14610517578063e87e3589146105ca578063f97a05df146105d2576100f5565b806214ebe7146100fa57806341e8510c14610104578063534db0e21461011e5780636f791d291461014257806370dea79a1461015e578063843d5a5c146101665780638a8cd2181461016e5780638b299903146101765780638e7b84c5146101a2575b600080fd5b6101026105ef565b005b61010c61064c565b60408051918252519081900360200190f35b610126610652565b604080516001600160a01b039092168252519081900360200190f35b61014a610661565b604080519115158252519081900360200190f35b61010261066b565b61010c6107c4565b6101266107ca565b61017e610859565b6040518082600281111561018e57fe5b60ff16815260200191505060405180910390f35b61010260048036036101008110156101b957600080fd5b810190602081018135600160201b8111156101d357600080fd5b8201836020820111156101e557600080fd5b803590602001918460208302840111600160201b8311171561020657600080fd5b9193909282359260208101359260408201359260608301359260808101359260a082013592909160e081019060c00135600160201b81111561024757600080fd5b82018360208201111561025957600080fd5b803590602001918460208302840111600160201b8311171561027a57600080fd5b509092509050610862565b61010c610e1e565b61010260048036036101c08110156102a457600080fd5b810190602081018135600160201b8111156102be57600080fd5b8201836020820111156102d057600080fd5b803590602001918460208302840111600160201b831117156102f157600080fd5b6040805160608181018352949693958335956020850135959385013594818101359460808201359460a08301949193919261014081019260e090910190600390839083908082843760009201919091525091949392602081019250359050600160201b81111561036057600080fd5b82018360208201111561037257600080fd5b803590602001918460018302840111600160201b8311171561039357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103e557600080fd5b8201836020820111156103f757600080fd5b803590602001918460018302840111600160201b8311171561041857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610e249050565b61010c6113cb565b6101266004803603602081101561047c57600080fd5b50356113d1565b6101266113ee565b610102600480360360e08110156104a157600080fd5b810190602081018135600160201b8111156104bb57600080fd5b8201836020820111156104cd57600080fd5b803590602001918460208302840111600160201b831117156104ee57600080fd5b919350915080359060208101359060408101359060608101359060808101359060a001356113fd565b610102600480360361014081101561052e57600080fd5b810190602081018135600160201b81111561054857600080fd5b82018360208201111561055a57600080fd5b803590602001918460208302840111600160201b8311171561057b57600080fd5b91935091506001600160a01b0381358116916020810135916040820135916060810135821691608082013581169160a08101359160c08201359160e081013582169161010090910135166116f5565b61010c611846565b610126600480360360208110156105e857600080fd5b503561188c565b6004546001600160a01b03163314610641576040805162461bcd60e51b815260206004820152601060248201526f2727aa2fa922a9afa922a1a2a4ab22a960811b604482015290519081900360640190fd5b61064a336118b3565b565b600a5481565b6007546001600160a01b031681565b60005460ff165b90565b60006106826008544361193390919063ffffffff16565b905061068c611846565b81116040518060400160405280601081526020016f54494d454f55545f444541444c494e4560801b815250906107405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107055781810151838201526020016106ed565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506001600b5460ff16600281111561075457fe5b1415610790576040517f2b92a4b014281aa2424baba9ea60bf4f26833d1c1fbd873e51cd1a6caeef48f090600090a161078b611995565b6107c1565b6040517f4e1f1f06cf69d199fcdb4d87a5a92d5248ca6b540e9fc2d3698927c5002a236a90600090a16107c1611a12565b50565b600c5481565b60006001600b5460ff1660028111156107df57fe5b14156107f757506006546001600160a01b0316610668565b6002600b5460ff16600281111561080a57fe5b141561082257506007546001600160a01b0316610668565b6040805162461bcd60e51b81526020600482015260076024820152662727afaa2aa92760c91b604482015290519081900360640190fd5b600b5460ff1681565b61086a6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906108ed5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506108f6611846565b60085461090a90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b8152509061097d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060008282600019810181811061099057fe5b90506020020135146109dd57600186116109dd576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d213d49560ba1b604482015290519081900360640190fd5b6000600460009054906101000a90046001600160a01b03166001600160a01b031663dc72a33b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2d57600080fd5b505afa158015610a41573d6000803e3d6000fd5b505050506040513d6020811015610a5757600080fd5b50519050610a658782611a6e565b6001018214610aa7576040805162461bcd60e51b815260206004820152600960248201526810d55517d0d3d5539560ba1b604482015290519081900360640190fd5b8583836000198101818110610ab857fe5b905060200201351415610afd576040805162461bcd60e51b815260206004820152600860248201526714d0535157d1539160c21b604482015290519081900360640190fd5b610b078585611a86565b83836000818110610b1457fe5b9050602002013514610b62576040805162461bcd60e51b81526020600482015260126024820152717365676d656e74207072652d6669656c647360701b604482015290519081900360640190fd5b600083838281610b6e57fe5b905060200201351415610bbc576040805162461bcd60e51b8152602060048201526011602482015270155394915050d21050931157d4d5105495607a1b604482015290519081900360640190fd5b610bcc888863ffffffff611ab216565b8510610c18576040805162461bcd60e51b81526020600482015260166024820152750d2dcecc2d8d2c840e6cacedacadce840d8cadccee8d60531b604482015290519081900360640190fd5b6000610c39898986866000818110610c2c57fe5b905060200201358a611b13565b9050610c4a600c54828e8e8e611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b81525090610cb75760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000610cfa8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508e92508d9150611b9f9050565b905080600c81905550807f0a2bdfea671da507e80b0cbae49dd25100a5bdacc5dff43a9163a3fcbd7c3c7d8b8b888860405180858152602001848152602001806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f191690920182900397509095505050505050a25060029150610d839050565b600b5460ff166002811115610d9457fe5b1415610dd657610dc1610db26008544361193390919063ffffffff16565b600a549063ffffffff61193316565b600a55600b805460ff19166001179055610e0e565b610dfd610dee6008544361193390919063ffffffff16565b6009549063ffffffff61193316565b600955600b805460ff191660021790555b5050436008555050505050505050565b60085481565b610e2c6107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b81525090610eaf5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50610eb8611846565b600854610ecc90439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b81525090610f3f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506000806000610f4d61205b565b60018560ff1681548110610f5d57fe5b6000918252602090912001546040516323eed0eb60e11b81526001600160a01b03909116906347dda1d6906002908d908d908c908c90600481019060440186825b81546001600160a01b03168152600190910190602001808311610f9e57505085815260200184604080828437600081840152601f19601f8201169050808301925050508060200180602001838103835285818151815260200191508051906020019080838360005b8381101561101e578181015183820152602001611006565b50505050905090810190601f16801561104b5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561107e578181015183820152602001611066565b50505050905090810190601f1680156110ab5780820380516001836020036101000a031916815260200191505b5097505050505050505060c06040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060c081101561110657600080fd5b5080516020820151600554919550935060409091019150821115611165576040805162461bcd60e51b8152602060048201526011602482015270544f4f5f4d414e595f4d4553534147455360781b604482015290519081900360640190fd5b6111758d8d63ffffffff611ab216565b8851106111b4576040805162461bcd60e51b815260206004820152600860248201526713d4d417d0d3d39560c21b604482015290519081900360640190fd5b6111c48d8d63ffffffff611ab216565b6111e767ffffffffffffffff85168a60005b60200201519063ffffffff611ab216565b1015611226576040805162461bcd60e51b815260206004820152600960248201526813d4d417d4d213d49560ba1b604482015290519081900360640190fd5b611239893560208b01358a868686611ce5565b8b1415611279576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6112968d8d6112908d8d3560208f01358e88611d84565b8e611b13565b93505050506112aa600c54828f8f8f611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906113175760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506040517f117efdf1fdd8be5a6ff0fb3c32333d7033bbd9523924bd0d9ca28f43540516f590600090a1611349611db5565b506002600b5460ff16600281111561135d57fe5b14156113905761137b610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556113b9565b6113a8610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b50504360085550505050505050505050565b60095481565b600281600281106113de57fe5b01546001600160a01b0316905081565b6006546001600160a01b031681565b6114056107ca565b6001600160a01b0316336001600160a01b0316146040518060400160405280600a8152602001692124a9afa9a2a72222a960b11b815250906114885760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50611491611846565b6008546114a590439063ffffffff61193316565b11156040518060400160405280600c81526020016b4249535f444541444c494e4560a01b815250906115185760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5060006115258383611a86565b9050600061153587878488611b13565b9050611546600c54828c8c8c611b51565b604051806040016040528060088152602001672124a9afa82922ab60c11b815250906115b35760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b506115c4878763ffffffff611ab216565b841015611603576040805162461bcd60e51b81526020600482015260086024820152671393d517d0d3d39560c21b604482015290519081900360640190fd5b84821415611644576040805162461bcd60e51b815260206004820152600960248201526815d493d391d7d1539160ba1b604482015290519081900360640190fd5b6040517ff62bb8ab32072c0ea3337f57276b8e66418eca0dfcc5e3b8aef4905d43e8f8ca90600090a1611675611db5565b5060029050600b5460ff16600281111561168b57fe5b14156116be576116a9610db26008544361193390919063ffffffff16565b600a55600b805460ff191660011790556116e7565b6116d6610dee6008544361193390919063ffffffff16565b600955600b805460ff191660021790555b505043600855505050505050565b6000600b5460ff16600281111561170857fe5b146040518060400160405280600f81526020016e4348414c5f494e49545f535441544560881b8152509061177d5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b5061178a60018c8c612079565b50600480546001600160a01b03199081166001600160a01b038c8116919091179092556005899055600680548216898416179055600780549091168783161790556009859055600a849055600b805460ff19166002908117909155600c8a905543600855604080518082019091528483168152918316602083015261180f91816120dc565b506040517f7003482dc89fcecb9f14e280f21ee716bd54187f7f3b0ab5ed78f3648218f2de90600090a15050505050505050505050565b60006001600b5460ff16600281111561185b57fe5b141561186a5750600954610668565b6002600b5460ff16600281111561187d57fe5b14156108225750600a54610668565b6001818154811061189957fe5b6000918252602090912001546001600160a01b0316905081565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff16156119265760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107055781810151838201526020016106ed565b50806001600160a01b0316ff5b60008282111561198a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6004805460075460065460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b505af1158015611a05573d6000803e3d6000fd5b5050505061064a336118b3565b6004805460065460075460408051637d3c01f360e11b81526001600160a01b039384169581019590955290821660248501525191169163fa7803e691604480830192600092919082900301818387803b1580156119f157600080fd5b600081831015611a7f57508161198f565b508061198f565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600082820183811015611b0c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b6000611b93848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250869250899150611dbc9050565b90951495945050505050565b82516000906000190160608167ffffffffffffffff81118015611bc157600080fd5b50604051908082528060200260200182016040528015611beb578160200160208202803683370190505b5090506000611bfa8584611e8a565b90506000869050611c3581838a600081518110611c1357fe5b60200260200101518b600181518110611c2857fe5b6020026020010151611b13565b83600081518110611c4257fe5b6020908102919091010152611c5d818363ffffffff611ab216565b9050611c698685611ea8565b915060015b84811015611ccf57611c9e82848b8481518110611c8757fe5b60200260200101518c8560010181518110611c2857fe5b848281518110611caa57fe5b6020908102919091010152611cc5828463ffffffff611ab216565b9150600101611c6e565b50611cd983611ebb565b98975050505050505050565b600080611d0e83600260200201518914611d00576001611d03565b60005b60ff168760016111d6565b90506000611d3884600360200201518914611d2a576001611d2d565b60005b60ff168860026111d6565b9050611d77611d5367ffffffffffffffff88168960006111d6565b602086015160408701516060880151611d72928a929091889088612010565b611a86565b9998505050505050505050565b8151815160208401516040850151600093611dab939092611d72928b92918b918b90612010565b9695505050505050565b6000600c55565b8251600090610100811115611dd057600080fd5b8260005b82811015611e805760028606611e2d57868181518110611df057fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150611e72565b81878281518110611e3a57fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101611dd4565b5095945050505050565b6000818381611e9557fe5b06828481611e9f57fe5b04019392505050565b6000818381611eb357fe5b049392505050565b6000815b600181511115611ff35760606002825160010181611ed957fe5b0467ffffffffffffffff81118015611ef057600080fd5b50604051908082528060200260200182016040528015611f1a578160200160208202803683370190505b50905060005b8151811015611feb578251816002026001011015611fb357828160020281518110611f4757fe5b6020026020010151838260020260010181518110611f6157fe5b6020026020010151604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120828281518110611fa257fe5b602002602001018181525050611fe3565b828160020281518110611fc257fe5b6020026020010151828281518110611fd657fe5b6020026020010181815250505b600101611f20565b509050611ebf565b8060008151811061200057fe5b6020026020010151915050919050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b60405180608001604052806004906020820280368337509192915050565b8280548282559060005260206000209081019282156120cc579160200282015b828111156120cc5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612099565b506120d8929150612124565b5090565b82600281019282156120cc579160200282015b828111156120cc57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906120ef565b61066891905b808211156120d85780546001600160a01b031916815560010161212a56fea2646970667358221220730f9074be73234957976483a3d9166828f711f999414d0055347cf9666d536964736f6c634300060b0033608060405234801561001057600080fd5b506040516105d13803806105d18339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100aa16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100a4816001600160e01b036100ae16565b50610124565b3390565b6100c18161011e60201b61034c1760201c565b6100fc5760405162461bcd60e51b815260040180806020018281038252603381526020018061059e6033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b61046b806101336000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610084578063715018a6146100a85780638da5cb5b146100b0578063f2fde38b146100b8575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b03166100de565b005b61008c610180565b604080516001600160a01b039092168252519081900360200190f35b61008261018f565b61008c61023b565b610082600480360360208110156100ce57600080fd5b50356001600160a01b031661024a565b6100e6610352565b6001600160a01b03166100f761023b565b6001600160a01b031614610140576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b61014981610356565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001546001600160a01b031690565b610197610352565b6001600160a01b03166101a861023b565b6001600160a01b0316146101f1576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610252610352565b6001600160a01b031661026361023b565b6001600160a01b0316146102ac576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b6001600160a01b0381166102f15760405162461bcd60e51b81526004018080602001828103825260268152602001806103bd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b3390565b61035f8161034c565b61039a5760405162461bcd60e51b81526004018080602001828103825260338152602001806103e36033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e082b44760d7484daad017396b93ce8fb7ce2f11f19db0d8429a61aaedbc6f4564736f6c634300060b00335570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374", } // ChallengeTesterABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgetestcontracts/NodeFactory.go b/packages/arb-util/ethbridgetestcontracts/NodeFactory.go index 7e9879e05f..77b891362d 100755 --- a/packages/arb-util/ethbridgetestcontracts/NodeFactory.go +++ b/packages/arb-util/ethbridgetestcontracts/NodeFactory.go @@ -30,8 +30,8 @@ var ( // NodeFactoryMetaData contains all meta data concerning the NodeFactory contract. var NodeFactoryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"beacon\",\"outputs\":[{\"internalType\":\"contractUpgradeableBeacon\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_stateHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_challengeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_confirmData\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_prev\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_deadlineBlock\",\"type\":\"uint256\"}],\"name\":\"createNode\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50600060405161001f906100f2565b604051809103906000f08015801561003b573d6000803e3d6000fd5b5090508060405161004b906100ff565b6001600160a01b03909116815260405190819003602001906000f080158015610078573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b03928316178082556040805163f2fde38b60e01b81523360048201529051919093169263f2fde38b92602480830193919282900301818387803b1580156100d457600080fd5b505af11580156100e8573d6000803e3d6000fd5b505050505061010c565b61087b80610ba583390190565b6105d18061142083390190565b610a8a8061011b6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806359659e901461003b578063d45ab2b51461005f575b600080fd5b610043610094565b604080516001600160a01b039092168252519081900360200190f35b610043600480360360a081101561007557600080fd5b50803590602081013590604081013590606081013590608001356100a3565b6000546001600160a01b031681565b6000805460405182916001600160a01b0316906100bf9061018d565b6001600160a01b03909116815260406020820181905260008183018190529051918290036080019190f0801580156100fb573d6000803e3d6000fd5b5060408051632901acdd60e21b8152336004820152602481018a905260448101899052606481018890526084810187905260a4810186905290519192506001600160a01b0383169163a406b3749160c48082019260009290919082900301818387803b15801561016a57600080fd5b505af115801561017e573d6000803e3d6000fd5b50929998505050505050505050565b6108ba8061019b8339019056fe60806040526040516108ba3803806108ba8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e626561636f6e0000000000000000000000008252519081900360140190206000805160206107fa83398151915260001990910114925061012a91505057fe5b61013d82826001600160e01b0361014416565b50506104f3565b610157826102a260201b6100311760201c565b6101925760405162461bcd60e51b815260040180806020018281038252602581526020018061083b6025913960400191505060405180910390fd5b61020a826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ce57600080fd5b505afa1580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b50516102a2602090811b61003117901c565b6102455760405162461bcd60e51b81526004018080602001828103825260348152602001806108866034913960400191505060405180910390fd5b6000805160206107fa83398151915282815581511561029d5761029b6102726001600160e01b036102a816565b8360405180606001604052806021815260200161081a6021913961032460201b6100371760201c565b505b505050565b3b151590565b60006102bb6001600160e01b0361043c16565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d602081101561031d57600080fd5b5051905090565b6060610338846001600160e01b036102a216565b6103735760405162461bcd60e51b81526004018080602001828103825260268152602001806108606026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106103b15780518252601f199092019160209182019101610392565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b5090925090506104308282866001600160e01b0361044f16565b925050505b9392505050565b6000805160206107fa8339815191525490565b6060831561045e575081610435565b82511561046e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b85781810151838201526020016104a0565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f8806105026000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013c565b6101af565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029d6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106100bb5780518252601f19909201916020918201910161009c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101308282866101d3565b925050505b9392505050565b6000610146610277565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101ce573d6000f35b3d6000fd5b606083156101e2575081610135565b8251156101f25782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023c578181015183820152602001610224565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a264697066735822122053dcbd8c0863f6517a5117ac7b858fc300ba6a67685a286f909e85f8150b82c764736f6c634300060b0033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a26469706673582212201c7808e51890d65964007cea1cd560c6393b50bef68af6b3deb91da38a4eeb8364736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff1916600117905561084e8061002d6000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806388d221c6116100ad578063a406b37411610071578063a406b37414610255578063cb23bcb514610299578063d7ff5e35146102bd578063dff69787146102c5578063f0dd77ff146102cd5761012c565b806388d221c6146101f15780639168ae72146101f957806396a9fdc01461021f57806397bdc51014610245578063a0369c141461024d5761012c565b80635b8b2280116100f45780635b8b2280146101a05780636971dfe5146101a85780636f791d29146101c5578063701da98e146101e157806383197ef0146101e95761012c565b80631bc09d0a146101315780632466696e146101505780632edfb42a146101885780633aa1927414610190578063479c925414610198575b600080fd5b61014e6004803603602081101561014757600080fd5b50356102d5565b005b6101766004803603602081101561016657600080fd5b50356001600160a01b0316610333565b60408051918252519081900360200190f35b610176610416565b61014e61041c565b610176610468565b61017661046e565b61014e600480360360208110156101be57600080fd5b5035610474565b6101cd6104c6565b604080519115158252519081900360200190f35b6101766104cf565b61014e6104d5565b61014e61052b565b6101cd6004803603602081101561020f57600080fd5b50356001600160a01b0316610574565b61014e6004803603602081101561023557600080fd5b50356001600160a01b0316610589565b61017661065b565b610176610661565b61014e600480360360c081101561026b57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a00135610667565b6102a161073a565b604080516001600160a01b039092168252519081900360200190f35b610176610749565b61017661074f565b610176610755565b6009546001600160a01b03163314610322576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b600a5461032e5743600a555b600b55565b6009546000906001600160a01b03163314610383576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604090205460ff16156103e2576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b604482015290519081900360640190fd5b506001600160a01b03166000908152600860205260409020805460ff19166001908117909155600780549091019081905590565b60055481565b600654431015610466576040805162461bcd60e51b815260206004820152601060248201526f10d212531117d513d3d7d49150d1539560821b604482015290519081900360640190fd5b565b60045481565b60025481565b6009546001600160a01b031633146104c1576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b600655565b60005460ff1690565b60015481565b6009546001600160a01b03163314610522576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6104663361075b565b600554431015610466576040805162461bcd60e51b815260206004820152600f60248201526e4245464f52455f444541444c494e4560881b604482015290519081900360640190fd5b60086020526000908152604090205460ff1681565b6009546001600160a01b031633146105d6576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6001600160a01b03811660009081526008602052604090205460ff16610630576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b6001600160a01b03166000908152600860205260409020805460ff1916905560078054600019019055565b60035481565b60065481565b6001600160a01b0386166106b0576040805162461bcd60e51b815260206004820152600b60248201526a2927a6262aa82fa0a2222960a91b604482015290519081900360640190fd5b6009546001600160a01b0316156106fd576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0397909716969096179095556001939093556002919091556003556004556005819055600655565b6009546001600160a01b031681565b600a5481565b60075481565b600b5481565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff161561080b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107d05781810151838201526020016107b8565b50505050905090810190601f1680156107fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50806001600160a01b0316fffea26469706673582212203a8c6cd0754ce30fac0a025ae9bf8214862eb7455a8d97511f7a4245f8e3a11f64736f6c634300060b0033608060405234801561001057600080fd5b506040516105d13803806105d18339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100aa16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100a4816001600160e01b036100ae16565b50610124565b3390565b6100c18161011e60201b61034c1760201c565b6100fc5760405162461bcd60e51b815260040180806020018281038252603381526020018061059e6033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b61046b806101336000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610084578063715018a6146100a85780638da5cb5b146100b0578063f2fde38b146100b8575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b03166100de565b005b61008c610180565b604080516001600160a01b039092168252519081900360200190f35b61008261018f565b61008c61023b565b610082600480360360208110156100ce57600080fd5b50356001600160a01b031661024a565b6100e6610352565b6001600160a01b03166100f761023b565b6001600160a01b031614610140576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b61014981610356565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001546001600160a01b031690565b610197610352565b6001600160a01b03166101a861023b565b6001600160a01b0316146101f1576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610252610352565b6001600160a01b031661026361023b565b6001600160a01b0316146102ac576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b6001600160a01b0381166102f15760405162461bcd60e51b81526004018080602001828103825260268152602001806103bd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b3390565b61035f8161034c565b61039a5760405162461bcd60e51b81526004018080602001828103825260338152602001806103e36033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e082b44760d7484daad017396b93ce8fb7ce2f11f19db0d8429a61aaedbc6f4564736f6c634300060b00335570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"beacon\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_stateHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_challengeHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_confirmData\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_prev\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_deadlineBlock\",\"type\":\"uint256\"}],\"name\":\"createNode\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50600060405161001f90610106565b604051809103906000f08015801561003b573d6000803e3d6000fd5b50905060008160405161004d90610113565b6001600160a01b03909116815260405190819003602001906000f08015801561007a573d6000803e3d6000fd5b506040805163f2fde38b60e01b815233600482015290519192506001600160a01b0383169163f2fde38b9160248082019260009290919082900301818387803b1580156100c657600080fd5b505af11580156100da573d6000803e3d6000fd5b5050600080546001600160a01b0319166001600160a01b03949094169390931790925550610120915050565b6109ab80610bb983390190565b6105d18061156483390190565b610a8a8061012f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806359659e901461003b578063d45ab2b51461005f575b600080fd5b610043610094565b604080516001600160a01b039092168252519081900360200190f35b610043600480360360a081101561007557600080fd5b50803590602081013590604081013590606081013590608001356100a3565b6000546001600160a01b031681565b6000805460405182916001600160a01b0316906100bf9061018d565b6001600160a01b03909116815260406020820181905260008183018190529051918290036080019190f0801580156100fb573d6000803e3d6000fd5b5060408051632901acdd60e21b8152336004820152602481018a905260448101899052606481018890526084810187905260a4810186905290519192506001600160a01b0383169163a406b3749160c48082019260009290919082900301818387803b15801561016a57600080fd5b505af115801561017e573d6000803e3d6000fd5b50929998505050505050505050565b6108ba8061019b8339019056fe60806040526040516108ba3803806108ba8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e626561636f6e0000000000000000000000008252519081900360140190206000805160206107fa83398151915260001990910114925061012a91505057fe5b61013d82826001600160e01b0361014416565b50506104f3565b610157826102a260201b6100311760201c565b6101925760405162461bcd60e51b815260040180806020018281038252602581526020018061083b6025913960400191505060405180910390fd5b61020a826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ce57600080fd5b505afa1580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b50516102a2602090811b61003117901c565b6102455760405162461bcd60e51b81526004018080602001828103825260348152602001806108866034913960400191505060405180910390fd5b6000805160206107fa83398151915282815581511561029d5761029b6102726001600160e01b036102a816565b8360405180606001604052806021815260200161081a6021913961032460201b6100371760201c565b505b505050565b3b151590565b60006102bb6001600160e01b0361043c16565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d602081101561031d57600080fd5b5051905090565b6060610338846001600160e01b036102a216565b6103735760405162461bcd60e51b81526004018080602001828103825260268152602001806108606026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106103b15780518252601f199092019160209182019101610392565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b5090925090506104308282866001600160e01b0361044f16565b925050505b9392505050565b6000805160206107fa8339815191525490565b6060831561045e575081610435565b82511561046e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b85781810151838201526020016104a0565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f8806105026000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013c565b6101af565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029d6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106100bb5780518252601f19909201916020918201910161009c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101308282866101d3565b925050505b9392505050565b6000610146610277565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101ce573d6000f35b3d6000fd5b606083156101e2575081610135565b8251156101f25782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023c578181015183820152602001610224565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a264697066735822122053dcbd8c0863f6517a5117ac7b858fc300ba6a67685a286f909e85f8150b82c764736f6c634300060b0033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a264697066735822122083993765fb17d9e56f1f170178dae4a9b16953cf668bbf9cd1327252c4cac33564736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff1916600117905561097e8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806388d221c6116100b8578063a406b3741161007c578063a406b37414610260578063a8929e0b146102a4578063cb23bcb5146102ac578063d7ff5e35146102d0578063dff69787146102d8578063f0dd77ff146102e057610137565b806388d221c6146101fc5780639168ae721461020457806396a9fdc01461022a57806397bdc51014610250578063a0369c141461025857610137565b80635b8b2280116100ff5780635b8b2280146101ab5780636971dfe5146101b35780636f791d29146101d0578063701da98e146101ec57806383197ef0146101f457610137565b80631bc09d0a1461013c5780632466696e1461015b5780632edfb42a146101935780633aa192741461019b578063479c9254146101a3575b600080fd5b6101596004803603602081101561015257600080fd5b50356102e8565b005b6101816004803603602081101561017157600080fd5b50356001600160a01b0316610346565b60408051918252519081900360200190f35b610181610429565b6101596104c0565b61018161058d565b610181610593565b610159600480360360208110156101c957600080fd5b5035610599565b6101d86105eb565b604080519115158252519081900360200190f35b6101816105f4565b6101596105fa565b610159610650565b6101d86004803603602081101561021a57600080fd5b50356001600160a01b031661069e565b6101596004803603602081101561024057600080fd5b50356001600160a01b03166106b3565b610181610785565b61018161078b565b610159600480360360c081101561027657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a00135610791565b610181610864565b6102b461086a565b604080516001600160a01b039092168252519081900360200190f35b610181610879565b61018161087f565b610181610885565b6009546001600160a01b03163314610335576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b600a546103415743600a555b600b55565b6009546000906001600160a01b03163314610396576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604090205460ff16156103f5576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b604482015290519081900360640190fd5b506001600160a01b03166000908152600860205260409020805460ff19166001908117909155600780549091019081905590565b600080600960009054906101000a90046001600160a01b03166001600160a01b0316637f60abbb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561047a57600080fd5b505afa15801561048e573d6000803e3d6000fd5b505050506040513d60208110156104a457600080fd5b50519050438111156104b8576005546104ba565b805b91505090565b600960009054906101000a90046001600160a01b03166001600160a01b031663313a04fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561050e57600080fd5b505afa158015610522573d6000803e3d6000fd5b505050506040513d602081101561053857600080fd5b50518061054757506006544310155b61058b576040805162461bcd60e51b815260206004820152601060248201526f10d212531117d513d3d7d49150d1539560821b604482015290519081900360640190fd5b565b60045481565b60025481565b6009546001600160a01b031633146105e6576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b600655565b60005460ff1690565b60015481565b6009546001600160a01b03163314610647576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b61058b3361088b565b610658610429565b43101561058b576040805162461bcd60e51b815260206004820152600f60248201526e4245464f52455f444541444c494e4560881b604482015290519081900360640190fd5b60086020526000908152604090205460ff1681565b6009546001600160a01b03163314610700576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6001600160a01b03811660009081526008602052604090205460ff1661075a576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b6001600160a01b03166000908152600860205260409020805460ff1916905560078054600019019055565b60035481565b60065481565b6001600160a01b0386166107da576040805162461bcd60e51b815260206004820152600b60248201526a2927a6262aa82fa0a2222960a91b604482015290519081900360640190fd5b6009546001600160a01b031615610827576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0397909716969096179095556001939093556002919091556003556004556005819055600655565b61a4b390565b6009546001600160a01b031681565b600a5481565b60075481565b600b5481565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff161561093b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109005781810151838201526020016108e8565b50505050905090810190601f16801561092d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50806001600160a01b0316fffea2646970667358221220ac1de2b488909c055fe33469c43800e5232a0d3993909d2c062e17a0df1d6d2e64736f6c634300060b0033608060405234801561001057600080fd5b506040516105d13803806105d18339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100aa16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100a4816001600160e01b036100ae16565b50610124565b3390565b6100c18161011e60201b61034c1760201c565b6100fc5760405162461bcd60e51b815260040180806020018281038252603381526020018061059e6033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b61046b806101336000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610084578063715018a6146100a85780638da5cb5b146100b0578063f2fde38b146100b8575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b03166100de565b005b61008c610180565b604080516001600160a01b039092168252519081900360200190f35b61008261018f565b61008c61023b565b610082600480360360208110156100ce57600080fd5b50356001600160a01b031661024a565b6100e6610352565b6001600160a01b03166100f761023b565b6001600160a01b031614610140576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b61014981610356565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001546001600160a01b031690565b610197610352565b6001600160a01b03166101a861023b565b6001600160a01b0316146101f1576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610252610352565b6001600160a01b031661026361023b565b6001600160a01b0316146102ac576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b6001600160a01b0381166102f15760405162461bcd60e51b81526004018080602001828103825260268152602001806103bd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b3390565b61035f8161034c565b61039a5760405162461bcd60e51b81526004018080602001828103825260338152602001806103e36033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e082b44760d7484daad017396b93ce8fb7ce2f11f19db0d8429a61aaedbc6f4564736f6c634300060b00335570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374", } // NodeFactoryABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgetestcontracts/OneStepProof.go b/packages/arb-util/ethbridgetestcontracts/OneStepProof.go index 573950d122..e9ec60b927 100755 --- a/packages/arb-util/ethbridgetestcontracts/OneStepProof.go +++ b/packages/arb-util/ethbridgetestcontracts/OneStepProof.go @@ -31,7 +31,7 @@ var ( // OneStepProofMetaData contains all meta data concerning the OneStepProof contract. var OneStepProofMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address[2]\",\"name\":\"bridges\",\"type\":\"address[2]\"},{\"internalType\":\"uint256\",\"name\":\"initialMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[2]\",\"name\":\"accs\",\"type\":\"bytes32[2]\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"bproof\",\"type\":\"bytes\"}],\"name\":\"executeStep\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"gas\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"afterMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[4]\",\"name\":\"fields\",\"type\":\"bytes32[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[2]\",\"name\":\"bridges\",\"type\":\"address[2]\"},{\"internalType\":\"uint256\",\"name\":\"initialMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[2]\",\"name\":\"accs\",\"type\":\"bytes32[2]\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"bproof\",\"type\":\"bytes\"}],\"name\":\"executeStepDebug\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"startMachine\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"afterMachine\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5061531b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806347dda1d61461003b578063eba67f6e14610157575b600080fd5b610107600480360360e081101561005157600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561007957600080fd5b82018360208201111561008b57600080fd5b803590602001918460018302840111600160201b831117156100ac57600080fd5b919390929091602081019035600160201b8111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111600160201b831117156100fc57600080fd5b509092509050610301565b604080516001600160401b03851681526020810184905290810182608080838360005b8381101561014257818101518382015260200161012a565b50505050905001935050505060405180910390f35b610223600480360360e081101561016d57600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561019557600080fd5b8201836020820111156101a757600080fd5b803590602001918460018302840111600160201b831117156101c857600080fd5b919390929091602081019035600160201b8111156101e557600080fd5b8201836020820111156101f757600080fd5b803590602001918460018302840111600160201b8311171561021857600080fd5b5090925090506103c0565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561026457818101518382015260200161024c565b50505050905090810190601f1680156102915780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156102c45781810151838201526020016102ac565b50505050905090810190601f1680156102f15780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b60008061030c61505f565b61031461507d565b6103988a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600081840152601f19601f820116905080830192505050505050508f610485565b90506103a38161093c565b6103ac81610d52565b935093509350509750975097945050505050565b6060806103cb61507d565b61044f898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a9081908401838280828437600081840152601f19601f820116905080830192505050505050508e610485565b905061045a8161093c565b6104678160400151610db5565b92506104768160600151610db5565b91505097509795505050505050565b61048d61507d565b60008460008151811061049c57fe5b602001015160f81c60f81b60f81c90506000856001815181106104bb57fe5b602001015160f81c60f81b60f81c90506000866002815181106104da57fe5b016020015160f81c9050600360606004840160ff166001600160401b038111801561050457600080fd5b5060405190808252806020026020018201604052801561053e57816020015b61052b61510f565b8152602001906001900390816105235790505b50905060608360040160ff166001600160401b038111801561055f57600080fd5b5060405190808252806020026020018201604052801561059957816020015b61058661510f565b81526020019060019003908161057e5790505b50905060005b8560ff168110156105d5576105b48b856110c1565b8483815181106105c057fe5b6020908102919091010152935060010161059f565b5060005b8460ff1681101561060f576105ee8b856110c1565b8383815181106105fa57fe5b602090810291909101015293506001016105d9565b5061061861514c565b6106228b85611283565b809250819550505060008b858151811061063857fe5b01602001516001959095019460f81c905061065161507d565b6001600160a01b038b35811682526020808d0135909116908201526040810183905261067c83611323565b6060820152608081018f90528d3560a08201526020808f013560c0830152600060e0830181905260408051808201825260ff8c811682528185018a905261010086019190915281518083019092528a8116825292810187905261012084015283821660018114610140850152918b1661016084015261018083018f90526101c083018e90526101e08301526101a08201879052158061071e57508160ff166001145b6040518060400160405280600b81526020016a04241445f494d4d5f5459560ac1b815250906107cb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610790578181015183820152602001610778565b50505050905090810190601f1680156107bd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506107d461510f565b60ff83166107f5576107ee8a83604001516000015161138c565b9050610895565b6000865111604051806040016040528060068152602001654e4f5f494d4d60d01b815250906108655760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b506108928a8360400151600001518860018d0360ff168151811061088557fe5b60200260200101516113f0565b90505b61089e81611474565b60408301515260005b838a0360ff168110156108e6576108de8782815181106108c357fe5b602002602001015184604001516115e190919063ffffffff16565b6001016108a7565b5060005b8860ff168110156109275761091f86828151811061090457fe5b602002602001015184604001516115fb90919063ffffffff16565b6001016108ea565b50909f9e505050505050505050505050505050565b6000806000612c7c61095585610160015160ff16611615565b9350935093509350600084118061096f5750846101400151155b80156109815750610100850151518410155b806109a957508461014001518015610997575083155b80156109a95750610100850151516001145b6040518060400160405280600a815260200169535441434b5f4d414e5960b01b81525090610a185760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b50610120850151516040805180820190915260088152674155585f4d414e5960c01b602082015290841015610a8e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b5061010085015151841115610b4c57610aad610aa8611d76565b611474565b610abe866060015160200151611474565b146040518060400160405280600d81526020016c535441434b5f4d495353494e4760981b81525090610b315760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b50610b3d856005611dbd565b50610b4785611e32565b610c0c565b61012085015151831115610be757610b65610aa8611d76565b610b76866060015160400151611474565b146040518060400160405280600b81526020016a4155585f4d495353494e4760a81b81525090610b315760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b610bf18583611dbd565b15610bff57610b4785611e32565b610c0c858263ffffffff16565b846101e0015115610cb15760408051600160f81b6020808301919091526000602183018190526022808401919091528351808403909101815260429092019092528051910120606086015160c001511415610c7357610c6e8560600151611e3d565b610cb1565b60006101e0860152606085015160c081015190526101408501518015610c97575083155b610ca657610100850151600090525b610120850151600090525b60005b61010086015151811015610cfd57610cf5866101000151602001518281518110610cda57fe5b602002602001015187606001516115e190919063ffffffff16565b600101610cb4565b5060005b61012086015151811015610d4a57610d42866101200151602001518281518110610d2757fe5b602002602001015187606001516115fb90919063ffffffff16565b600101610d01565b505050505050565b600080610d5d61505f565b8360e0015184608001516040518060800160405280610d7f8860400151611e47565b8152602001610d918860600151611e47565b81526020018760a0015181526020018760c001518152509250925092509193909250565b6060610dc48260000151611f0b565b610dd9610dd48460200151611474565b611f0b565b610de9610dd48560400151611474565b610df9610dd48660600151611474565b610e09610dd48760800151611474565b610e168760a00151611fda565b610e238860c00151611f0b565b60405160200180806709ac2c6d0d2dcca560c31b81525060080188805190602001908083835b60208310610e685780518252601f199092019160209182019101610e49565b51815160209384036101000a60001901801990921691161790526216100560e91b9190930190815289516003909101928a0191508083835b60208310610ebf5780518252601f199092019160209182019101610ea0565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528851600390910192890191508083835b60208310610f165780518252601f199092019160209182019101610ef7565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528751600390910192880191508083835b60208310610f6d5780518252601f199092019160209182019101610f4e565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528651600390910192870191508083835b60208310610fc45780518252601f199092019160209182019101610fa5565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528551600390910192860191508083835b6020831061101b5780518252601f199092019160209182019101610ffc565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528451600390910192850191508083835b602083106110725780518252601f199092019160209182019101611053565b6001836020036101000a0380198251168184511680821785525050505050509050018061148560f11b81525060020197505050505050505060405160208183030381529060405290505b919050565b60006110cb61510f565b83518310611111576040805162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a59081bd9999cd95d60921b604482015290519081900360640190fd5b60008061111e86866120b4565b9150915061112a6120db565b60ff168160ff16141561115e57600061114387846120e0565b90935090508261115282612154565b9450945050505061127c565b611166612214565b60ff168160ff1614156111885761117d8683612219565b93509350505061127c565b6111906122bb565b60ff168160ff1614156111b85760006111a987846120e0565b909350905082611152826122c0565b6111c06123ac565b60ff168160ff1614156111d75761117d86836123b1565b6111df612446565b60ff168160ff161015801561120057506111f761244b565b60ff168160ff16105b1561123c57600061120f612446565b820390506060611220828986612450565b90945090508361122f826124f8565b955095505050505061127c565b6040805162461bcd60e51b815260206004820152601060248201526f696e76616c69642074797065636f646560801b604482015290519081900360640190fd5b9250929050565b600061128d61514c565b61129561514c565b600060e08201819052806112a987876120e0565b90965091506112b887876123b1565b602085015295506112c987876123b1565b604085015295506112da87876110c1565b606085015295506112eb87876110c1565b608085015295506112fc87876120e0565b60a0850152955061130d87876120e0565b92845260c0840192909252509590945092505050565b61132b61514c565b60405180610100016040528083600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020018360a0015181526020018360c0015181526020018360e001518152509050919050565b61139461510f565b6040805160608101825260ff8516815260208082018590528251600080825291810184526113e7938301916113df565b6113cc61510f565b8152602001906001900390816113c45790505b509052612639565b90505b92915050565b6113f861510f565b604080516001808252818301909252606091816020015b61141761510f565b81526020019060019003908161140f579050509050828160008151811061143a57fe5b602002602001018190525061146b60405180606001604052808760ff16815260200186815260200183815250612639565b95945050505050565b600061147e6120db565b60ff16826080015160ff1614156114a157815161149a906126c9565b90506110bc565b6114a9612214565b60ff16826080015160ff1614156114c75761149a82602001516126ed565b6114cf6123ac565b60ff16826080015160ff1614156114f157815160a083015161149a91906127ea565b6114f9612446565b60ff16826080015160ff1614156115325761151261510f565b61151f836040015161283b565b905061152a81611474565b9150506110bc565b61153a6129b3565b60ff16826080015160ff161415611553575080516110bc565b61155b6122bb565b60ff16826080015160ff1614156115a0575060608082015160408051607b602080830191909152818301939093528151808203830181529301905281519101206110bc565b6040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207479706520636f646560781b604482015290519081900360640190fd5b6115ef8260200151826129b8565b82602001819052505050565b6116098260400151826129b8565b82604001819052505050565b60008080612c7c600185148061162b5750600285145b806116365750600385145b156116505750600292506000915060039050612a36611d6f565b600485148061165f5750600685145b156116795750600292506000915060049050612c98611d6f565b60058514806116885750600785145b156116a25750600292506000915060079050612c98611d6f565b60088514806116b15750600985145b156116cb5750600392506000915060049050612d6a611d6f565b600a8514156116e95750600292506000915060199050612a36611d6f565b600b8514156117075750600292506000915060079050612a36611d6f565b60108514806117165750601185145b806117215750601285145b8061172c5750601385145b806117375750601685145b806117425750601785145b8061174d5750601885145b1561176657506002925060009150829050612a36611d6f565b601485141561178357506002925060009150829050612e57611d6f565b60158514156117a057506001925060009150829050612eb0611d6f565b60198514156117bd57506001925060009150829050612f02611d6f565b601a8514806117cc5750601b85145b806117d75750601c85145b806117e25750601d85145b156117fc5750600292506000915060049050612a36611d6f565b603085141561181957506001925060009150829050612f48611d6f565b603185141561183657506000925082915060019050612f5a611d6f565b603285141561185357506000925082915060019050612f71611d6f565b60338514156118715750600192506000915060029050612f88611d6f565b603485141561188f5750600192506000915060049050612fa2611d6f565b60358514156118ad5750600292506000915060049050612fe3611d6f565b60368514156118ca57506000925082915060029050613057611d6f565b60378514156118e75750600092508291506001905061309b611d6f565b6038851415611904575060019250600091508290506130b7611d6f565b6039851415611921575060009250600191508190506130ce611d6f565b603a85141561193e575060009250829150600290506130e5611d6f565b603b85141561195b57506000925082915060019050612c95611d6f565b603c85141561197857506000925082915060019050613113611d6f565b603d8514156119955750600192506000915082905061312f611d6f565b60408514156119b257506001925060009150829050613173611d6f565b60418514156119d057506002925060009150600190506131a9611d6f565b60428514156119ee5750600392506000915060019050613206611d6f565b6043851415611a0c575060029250600091506001905061328a611d6f565b6044851415611a2a57506003925060009150600190506132c9611d6f565b6050851415611a475750600292506000915082905061332f611d6f565b6051851415611a6557506003925060009150602890506133cc611d6f565b6052851415611a835750600192506000915060029050613490611d6f565b6053851415611aa0575060019250829150600390506134db611d6f565b6054851415611abe575060029250600191506029905061355d611d6f565b6060851415611adb57506000925082915060649050612c95611d6f565b6061851415611af9575060019250600091506064905061361a611d6f565b6072851415611b1657506000925082915060289050613661611d6f565b6073851415611b3357506000925082915060059050613673611d6f565b6074851415611b50575060009250829150600a905061367c611d6f565b6075851415611b6d57506001925060009150829050613689611d6f565b6076851415611b8a575060009250829150600190506136c4611d6f565b6077851415611ba7575060009250829150601990506136de611d6f565b6078851415611bc5575060029250600091506019905061372f611d6f565b6079851415611be357506003925060009150601990506137a7611d6f565b607b851415611c0157506001925060009150600a9050613838611d6f565b6080851415611c2057506004925060009150614e2090506138ae611d6f565b6081851415611c3f57506004925060009150610dac9050613a30611d6f565b6082851415611c5f57506003925060009150620140509050613b6d611d6f565b6083851415611c7e575060019250600091506103e89050613c71611d6f565b6090851415611c9b57506001925060009150829050612f48611d6f565b60a0851415611cb857506000925082915060019050613fb9611d6f565b60208510801590611cca575060248511155b15611d065760405162461bcd60e51b815260040180806020018281038252602e81526020018061528b602e913960400191505060405180910390fd5b60a18510801590611d18575060a68511155b80611d235750607085145b15611d5f5760405162461bcd60e51b815260040180806020018281038252602d8152602001806152b9602d913960400191505060405180910390fd5b5060009250829150600590506136735b9193509193565b611d7e61510f565b60408051600080825260208201909252611db891611db2565b611d9f61510f565b815260200190600190039081611d975790505b506124f8565b905090565b6000816001600160401b0316836060015160a001511015611e02575060e0820180516005016001600160401b03169052606082015160001960a09091015260016113ea565b5060e0820180516001600160401b039083018116909152606083015160a0018051918316909103905260006113ea565b60016101e090910152565b600160e090910152565b600060028260e001511415611e5e575060006110bc565b60018260e001511415611e73575060016110bc565b81516020830151611e8390611474565b611e908460400151611474565b611e9d8560600151611474565b611eaa8660800151611474565b8660a001518760c00151604051602001808881526020018781526020018681526020018581526020018481526020018381526020018281526020019750505050505050506040516020818303038152906040528051906020012090506110bc565b60408051818152606081810183529182919060208201818036833701905050905060005b6020811015611fd3576000848260208110611f4657fe5b1a60f881811b9250601080830480831b9360ff9091169091029003901b611f6c82613ff4565b858560020281518110611f7b57fe5b60200101906001600160f81b031916908160001a905350611f9b81613ff4565b858560020260010181518110611fad57fe5b60200101906001600160f81b031916908160001a9053505060019092019150611f2f9050565b5092915050565b606081806120015750506040805180820190915260018152600360fc1b60208201526110bc565b8060005b811561201957600101600a82049150612005565b6060816001600160401b038111801561203157600080fd5b506040519080825280601f01601f19166020018201604052801561205c576020820181803683370190505b50905060001982015b84156120aa57600a850660300160f81b8282806001900393508151811061208857fe5b60200101906001600160f81b031916908160001a905350600a85049450612065565b5095945050505050565b600080826001018484815181106120c757fe5b016020015190925060f81c90509250929050565b600090565b600080828451101580156120f8575060208385510310155b612135576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301612149858563ffffffff61402516565b915091509250929050565b61215c61510f565b6040805160c08101825283815281516060810183526000808252602080830182905284518281528082018652939490850193908301916121b2565b61219f61510f565b8152602001906001900390816121975790505b509052815260200160006040519080825280602002602001820160405280156121f557816020015b6121e261510f565b8152602001906001900390816121da5790505b5081526000602082018190526040820152600160609091015292915050565b600190565b600061222361510f565b8260008061222f61510f565b600061223b89866120b4565b909550935061224a89866120b4565b9095509250600160ff8516141561226b5761226589866110c1565b90955091505b612275898661407e565b9095509050600160ff851614156122a057846122928483856113f0565b96509650505050505061127c565b846122ab848361138c565b9650965050505050509250929050565b600c90565b6122c861510f565b6040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b038111801561230f57600080fd5b5060405190808252806020026020018201604052801561234957816020015b61233661510f565b81526020019060019003908161232e5790505b5090528152602001600060405190808252806020026020018201604052801561238c57816020015b61237961510f565b8152602001906001900390816123715790505b50815260208101849052600c604082015260016060909101529050919050565b600290565b60006123bb61510f565b828451101580156123d0575060408385510310155b61240d576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60008061241a868661407e565b909450915061242986856120e0565b9094509050836124398383614095565b9350935050509250929050565b600390565b600d90565b60006060828160ff87166001600160401b038111801561246f57600080fd5b506040519080825280602002602001820160405280156124a957816020015b61249661510f565b81526020019060019003908161248e5790505b50905060005b8760ff168160ff1610156124eb576124c787846110c1565b838360ff16815181106124d657fe5b602090810291909101015292506001016124af565b5090969095509350505050565b61250061510f565b61250a8251614154565b61255b576040805162461bcd60e51b815260206004820152601a60248201527f5475706c65206d75737420686176652076616c69642073697a65000000000000604482015290519081900360640190fd5b600160005b83518110156125925783818151811061257557fe5b602002602001015160a00151820191508080600101915050612560565b506040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b03811180156125da57600080fd5b5060405190808252806020026020018201604052801561261457816020015b61260161510f565b8152602001906001900390816125f95790505b5090528152602081019490945260006040850152600360608501526080909301525090565b61264161510f565b6040518060c001604052806000815260200183815260200160006001600160401b038111801561267057600080fd5b506040519080825280602002602001820160405280156126aa57816020015b61269761510f565b81526020019060019003908161268f5790505b5081526000602082015260016040820181905260609091015292915050565b60408051602080820193909352815180820384018152908201909152805191012090565b60006002826040015151106126fe57fe5b60408201515161276357612710612214565b8251602080850151604080516001600160f81b031960f896871b8116828601529490951b9093166021850152602280850191909152825180850390910181526042909301909152815191012090506110bc565b61276b612214565b8260000151612791846040015160008151811061278457fe5b6020026020010151611474565b8460200151604051602001808560ff1660ff1660f81b81526001018460ff1660ff1660f81b8152600101838152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b60006127f4612446565b8383604051602001808460ff1660ff1660f81b8152600101838152602001828152602001935050505060405160208183030381529060405280519060200120905092915050565b61284361510f565b600882511115612891576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e8eae0d8ca40d8cadccee8d60631b604482015290519081900360640190fd5b606082516001600160401b03811180156128aa57600080fd5b506040519080825280602002602001820160405280156128d4578160200160208202803683370190505b508051909150600160005b82811015612937576128f686828151811061278457fe5b84828151811061290257fe5b60200260200101818152505085818151811061291a57fe5b602002602001015160a001518201915080806001019150506128df565b506000835184604051602001808360ff1660ff1660f81b8152600101828051906020019060200280838360005b8381101561297c578181015183820152602001612964565b50505050905001925050506040516020818303038152906040528051906020012090506129a98183614095565b9695505050505050565b606490565b6129c061510f565b6040805160028082526060828101909352816020015b6129de61510f565b8152602001906001900390816129d65790505090508281600081518110612a0157fe5b60200260200101819052508381600181518110612a1a57fe5b6020026020010181905250612a2e8161283b565b949350505050565b612a3e61510f565b612a4c82610100015161415b565b9050612a5661510f565b612a6483610100015161415b565b9050612a6f8261419d565b1580612a815750612a7f8161419d565b155b15612a9657612a8f836141a8565b5050612c95565b8151815161016085015160009060ff1660011415612ab75750818101612c7e565b61016086015160ff1660021415612ad15750818102612c7e565b61016086015160ff1660031415612aeb5750808203612c7e565b61016086015160ff16600a1415612b05575080820a612c7e565b61016086015160ff16600b1415612b1f575080820b612c7e565b61016086015160ff1660101415612b395750808210612c7e565b61016086015160ff1660111415612b535750808211612c7e565b61016086015160ff1660121415612b6d5750808212612c7e565b61016086015160ff1660131415612b875750808213612c7e565b61016086015160ff1660161415612ba15750818116612c7e565b61016086015160ff1660171415612bbb5750818117612c7e565b61016086015160ff1660181415612bd55750818118612c7e565b61016086015160ff16601a1415612bef575080821a612c7e565b61016086015160ff16601b1415612c09575080821b612c7e565b61016086015160ff16601c1415612c23575080821c612c7e565b61016086015160ff16601d1415612c3d575080821d612c7e565b61016086015160ff1660221415612c7c575060408051602080820185905281830184905282518083038401815260609092019092528051910120612c7e565bfe5b610d4a866101000151612c9083612154565b6141b1565b50565b612ca061510f565b612cae82610100015161415b565b9050612cb861510f565b612cc683610100015161415b565b9050612cd18261419d565b1580612ce35750612ce18161419d565b155b80612ced57508051155b15612cfb57612a8f836141a8565b8151815161016085015160009060ff1660041415612d1c5750808204612c7e565b61016086015160ff1660051415612d365750808205612c7e565b61016086015160ff1660061415612d505750808206612c7e565b61016086015160ff1660071415612c7c5750808207612c7e565b612d7261510f565b612d8082610100015161415b565b9050612d8a61510f565b612d9883610100015161415b565b9050612da261510f565b612db084610100015161415b565b9050612dbb8361419d565b1580612dcd5750612dcb8261419d565b155b80612dde5750612ddc8161419d565b155b80612de857508051155b15612dfe57612df6846141a8565b505050612c95565b82518251825161016087015160009060ff1660081415612e2357818385089050612e3b565b61016088015160ff1660091415612c7c578183850990505b612e4d886101000151612c9083612154565b5050505050505050565b612e5f61510f565b612e6d82610100015161415b565b9050612e7761510f565b612e8583610100015161415b565b9050612eab836101000151612c90612e9c84611474565b612ea586611474565b146141db565b505050565b612eb861510f565b612ec682610100015161415b565b9050612ed18161419d565b612ee457612ede826141a8565b50612c95565b8051610100830151811590612efc90612c9083612154565b50505050565b612f0a61510f565b612f1882610100015161415b565b9050612f238161419d565b612f3057612ede826141a8565b8051610100830151811990612efc90612c9083612154565b612f5681610100015161415b565b5050565b612c958161010001518260600151608001516141b1565b612c958161010001518260600151606001516141b1565b612f9681610100015161415b565b60609182015190910152565b612faa61510f565b612fb882610100015161415b565b9050612fc3816141fd565b612fd057612ede826141a8565b612fd981611474565b6060830151525050565b612feb61510f565b612ff982610100015161415b565b905061300361510f565b61301183610100015161415b565b905061301c826141fd565b158061302e575061302c8161419d565b155b1561303c57612a8f836141a8565b805115612eab5761304c82611474565b606084015152505050565b610100810151516000901580156130875750613074610aa8611d76565b613085836060015160200151611474565b145b9050612f56826101000151612c90836141db565b612c95816101000151612c90836040015160000151600161420a565b612c95816101200151612c9083610100015161415b565b612c95816101000151612c9083610120015161415b565b610120810151516000901580156130875750613102610aa8611d76565b613085836060015160400151611474565b612c95816101000151612c90836060015160c00151600161420a565b61313761510f565b61314582610100015161415b565b9050613150816141fd565b61315d57612ede826141a8565b61316681611474565b606083015160c001525050565b61317b61510f565b61318982610100015161415b565b905061319a826101000151826141b1565b612f56826101000151826141b1565b6131b161510f565b6131bf82610100015161415b565b90506131c961510f565b6131d783610100015161415b565b90506131e8836101000151826141b1565b6131f7836101000151836141b1565b612eab836101000151826141b1565b61320e61510f565b61321c82610100015161415b565b905061322661510f565b61323483610100015161415b565b905061323e61510f565b61324c84610100015161415b565b905061325d846101000151826141b1565b61326c846101000151836141b1565b61327b846101000151846141b1565b612efc846101000151826141b1565b61329261510f565b6132a082610100015161415b565b90506132aa61510f565b6132b883610100015161415b565b90506131f7836101000151836141b1565b6132d161510f565b6132df82610100015161415b565b90506132e961510f565b6132f783610100015161415b565b905061330161510f565b61330f84610100015161415b565b9050613320846101000151846141b1565b61327b846101000151836141b1565b61333761510f565b61334582610100015161415b565b905061334f61510f565b61335d83610100015161415b565b90506133688261419d565b158061337a5750613378816142c9565b155b806133945750613389816142d6565b60ff16826000015110155b156133a257612a8f836141a8565b612eab83610100015182604001518460000151815181106133bf57fe5b60200260200101516141b1565b6133d461510f565b6133e282610100015161415b565b90506133ec61510f565b6133fa83610100015161415b565b905061340461510f565b61341284610100015161415b565b905061341d8361419d565b158061342f575061342d826142c9565b155b80613449575061343e826142d6565b60ff16836000015110155b1561345757612df6846141a8565b60408201518351815183918391811061346c57fe5b6020026020010181905250613489856101000151612c90836124f8565b5050505050565b61349861510f565b6134a682610100015161415b565b90506134b1816142c9565b6134be57612ede826141a8565b612f56826101000151612c906134d3846142d6565b60ff16612154565b6134e361510f565b6134f182610100015161415b565b90506134fb61510f565b61350983610120015161415b565b90506135148261419d565b15806135265750613524816142c9565b155b806135405750613535816142d6565b60ff16826000015110155b1561354e57612a8f836141a8565b6133a2836101200151826141b1565b61356561510f565b61357382610100015161415b565b905061357d61510f565b61358b83610100015161415b565b905061359561510f565b6135a384610120015161415b565b90506135ae816142c9565b15806135c057506135be8361419d565b155b806135da57506135cf816142d6565b60ff16836000015110155b156135e857612df6846141a8565b6040810151835181518491839181106135fd57fe5b6020026020010181905250613489856101200151612c90836124f8565b8060c00151613630610aa883610100015161415b565b604080516020808201949094528082019290925280518083038201815260609092019052805191012060c090910152565b612c95816101000151612c90836142fd565b612c95816141a8565b612c958160600151614dcd565b61369161510f565b61369f82610100015161415b565b90506136aa8161419d565b6136b757612ede826141a8565b51606082015160a0015250565b612c95816101000151612c90836060015160a00151612154565b61010081015160408051600160f81b6020808301919091526000602183018190526022808401919091528351808403909101815260429092019092528051910120612c959190612c9090600161420a565b61373761510f565b61374582610100015161415b565b905061374f61510f565b61375d83610100015161415b565b90506137688261419d565b158061377a5750613778816141fd565b155b1561378857612a8f836141a8565b612eab836101000151612c9084600001516137a285611474565b61138c565b6137af61510f565b6137bd82610100015161415b565b90506137c761510f565b6137d583610100015161415b565b90506137df61510f565b6137ed84610100015161415b565b90506137f88361419d565b158061380a5750613808816141fd565b155b1561381857612df6846141a8565b612efc846101000151612c90856000015161383285611474565b866113f0565b61384061510f565b61384e82610100015161415b565b90506138598161419d565b61386657612ede826141a8565b60408051600080825260208201909252606091613899565b61388661510f565b81526020019060019003908161387e5790505b509050612eab836101000151612c90836124f8565b6138b661510f565b6138c482610100015161415b565b90506138ce61510f565b6138dc83610100015161415b565b90506138e661510f565b6138f484610100015161415b565b90506138fe61510f565b61390c85610100015161415b565b90506139178461419d565b158061392957506139278361419d565b155b8061393a57506139388261419d565b155b8061394b57506139498161419d565b155b1561396257613959856141a8565b50505050612c95565b8351835183511580159061397857508351600114155b1561399b57613990876101000151612c906000612154565b505050505050612c95565b83518351604080516000808252602080830180855285905260ff601b9096019586168385015260608301889052608083018790529251909260019260a080820193601f1981019281900390910190855afa1580156139fd573d6000803e3d6000fd5b505050602060405103519050613a248a6101000151612c90836001600160a01b0316612154565b50505050505050505050565b613a3861510f565b613a4682610100015161415b565b9050613a5061510f565b613a5e83610100015161415b565b9050613a6861510f565b613a7684610100015161415b565b9050613a8061510f565b613a8e85610100015161415b565b9050613a998461419d565b1580613aab5750613aa98361419d565b155b80613abc5750613aba8261419d565b155b80613acd5750613acb8161419d565b155b15613adb57613959856141a8565b613ae361505f565b5060408051608081018252855181528451602082015283519181019190915281516060820152613b116151aa565b600060408260808560066107d05a03fa905080613b3d57613b31886141a8565b50505050505050612c95565b610100880151613b5890612c908460015b6020020151612154565b610100880151612e4d90612c90846000613b4e565b613b7561510f565b613b8382610100015161415b565b9050613b8d61510f565b613b9b83610100015161415b565b9050613ba561510f565b613bb384610100015161415b565b9050613bbe8361419d565b1580613bd05750613bce8261419d565b155b80613be15750613bdf8161419d565b155b15613bef57612df6846141a8565b613bf76151c8565b50604080516060810182528451815283516020820152825191810191909152613c1e6151aa565b600060408260808560076107d05a03fa905080613c3e57613990876141a8565b610100870151613c5390612c90846001613b4e565b610100870151613c6890612c90846000613b4e565b50505050505050565b613c7961510f565b613c8782610100015161415b565b9050613c916151e6565b6000805b601e811015613d2357613ca7846142c9565b613cb45760019150613d23565b60408401518051613cc55750613d23565b8051600214613cd8576001925050613d23565b80600081518110613ce557fe5b60200260200101518483601e8110613cf957fe5b6020020152805181906001908110613d0d57fe5b6020908102919091010151945050600101613c95565b613d32856207a1208302611dbd565b15613d565760e0850180516103e719016001600160401b0316905261395985611e32565b8180613d685750613d66846142c9565b155b80613d77575060408401515115155b15613d8557613959856141a8565b613d8d615214565b60005b82811015613f6a57613da061510f565b8582601e8110613dac57fe5b60200201519050613dbc816142c9565b613dc957613b31886141a8565b60408101518051600614613ded57613de0896141a8565b5050505050505050612c95565b60005b6006811015613e3857613e15828281518110613e0857fe5b602002602001015161419d565b613e3057613e228a6141a8565b505050505050505050612c95565b600101613df0565b5080600081518110613e4657fe5b602002602001015160000151848460060260b48110613e6157fe5b6020020152805181906001908110613e7557fe5b602002602001015160000151848460060260010160b48110613e9357fe5b6020020152805181906003908110613ea757fe5b602002602001015160000151848460060260020160b48110613ec557fe5b6020020152805181906002908110613ed957fe5b602002602001015160000151848460060260030160b48110613ef757fe5b6020020152805181906005908110613f0b57fe5b602002602001015160000151848460060260040160b48110613f2957fe5b6020020152805181906004908110613f3d57fe5b602002602001015160000151848460060260050160b48110613f5b57fe5b60200201525050600101613d90565b5060c08202613f77615233565b6000602082848660086107d05a03fa905080613f9657613de0896141a8565b6101008901518251613fae9190612c909015156141db565b505050505050505050565b612c95816101000151612c906000801b60405160200180828152602001915050604051602081830303815290604052805190602001206122c0565b6000600a60f883901c1015614014578160f81c60300160f81b90506110bc565b8160f81c60570160f81b90506110bc565b60008160200183511015614075576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b60008060208301612149858563ffffffff61402516565b61409d61510f565b6040805160c08101825284815281516060810183526000808252602080830182905284518281528082018652939490850193908301916140f3565b6140e061510f565b8152602001906001900390816140d85790505b5090528152602001600060405190808252806020026020018201604052801561413657816020015b61412361510f565b81526020019060019003908161411b5790505b50815260006020820152600260408201526060019290925250919050565b6008101590565b61416361510f565b61416b61510f565b826020015160018460000151038151811061418257fe5b60209081029190910101518351600019018452915050919050565b6080015160ff161590565b612c9581611e32565b8082602001518360000151815181106141c657fe5b60209081029190910101525080516001019052565b6141e361510f565b81156141f35761149a6001612154565b61149a6000612154565b6080015160ff1660011490565b61421261510f565b6040805160c0810182528481528151606081018352600080825260208083018290528451828152808201865293949085019390830191614268565b61425561510f565b81526020019060019003908161424d5790505b509052815260200160006040519080825280602002602001820160405280156142ab57816020015b61429861510f565b8152602001906001900390816142905790505b50815260006020820152606460408201526060019290925250919050565b6080015160ff1660031490565b608081015160009060ff16600314156142f557506040810151516110bc565b5060016110bc565b61430561510f565b6101808201516143136151c8565b604080516008808252610120820190925260009160609190816020015b61433861510f565b815260200190600190039081614330579050509050600084876101a001518151811061436057fe5b01602001516101a0880180516001019081905260f89190911c9150600090819081908190614395908a9063ffffffff614dd716565b6101a08c018051601401908190529091506143b1908a906120e0565b6101a08d0182905294506143c6908a906120e0565b6101a08d0182905293506143db908a906120e0565b6101a08d0182905297506143f0908a906120e0565b6101a08d018290529250600090614408908b906120e0565b6101a08e018290529150600090614421908c9084614e37565b6101a08e0180518d810160200185902085820190925291925061444989868a8a8f8b87614e60565b8c526000841561445b5750600361445f565b5060065b8060ff168a60ff16148015614472575086155b156144c65760408051606088901b6001600160601b031916602080830191909152603482018c905260548083018c90528351808403909101815260749092018352815191810191909120908f01528d018290525b6144d28a60ff16612154565b8b6000815181106144df57fe5b60200260200101819052506144f389612154565b8b60018151811061450057fe5b602002602001018190525061451488612154565b8b60028151811061452157fe5b602002602001018190525061453e866001600160a01b0316612154565b8b60038151811061454b57fe5b602002602001018190525061455f8c612154565b8b60048151811061456c57fe5b602002602001018190525061458087612154565b8b60058151811061458d57fe5b60200260200101819052506145a185612154565b8b6006815181106145ae57fe5b60200260200101819052506145c484600161420a565b8b6007815181106145d157fe5b60200260200101819052505050505050505050505060006145f785886101a001516120e0565b6101a0890182905286519092506000918791811061461157fe5b01602001516101a089018051600101905260f81c905080158061463757508060ff166001145b614679576040805162461bcd60e51b815260206004820152600e60248201526d1254d7d111531056515117d5905360921b604482015290519081900360640190fd5b600061468a878a6101a001516120e0565b6101a08b0191909152905060ff821661474f578085876001602002015188600260200201516040516020018085815260200184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120905088608001518514614744576040805162461bcd60e51b815260206004820152601b60248201527f57524f4e475f53455155454e4345525f4d53475f5345515f4e554d0000000000604482015290519081900360640190fd5b600190940193614ac5565b60008060006147638a8d6101a001516120e0565b6101a08e018290529350614778908b906120e0565b6101a08e01829052925061478d908b906120e0565b6101a08e01919091526020808e01516040805163d9dd67ab60e01b81526000198501600482015290519394506000936001600160a01b039092169263d9dd67ab92602480840193829003018186803b1580156147e857600080fd5b505afa1580156147fc573d6000803e3d6000fd5b505050506040513d602081101561481257600080fd5b505190508289101561485b576040805162461bcd60e51b815260206004820152600d60248201526c1111531056515117d4d5105495609a1b604482015290519081900360640190fd5b81891061489d576040805162461bcd60e51b815260206004820152600b60248201526a1111531056515117d1539160aa1b604482015290519081900360640190fd5b6000891561491f578d602001516001600160a01b031663d9dd67ab60018c036040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156148f057600080fd5b505afa158015614904573d6000803e3d6000fd5b505050506040513d602081101561491a57600080fd5b505190505b8d602001516001600160a01b031663d9dd67ab8b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561496757600080fd5b505afa15801561497b573d6000803e3d6000fd5b505050506040513d602081101561499157600080fd5b50518b516149a0908390614ed1565b146149e0576040805162461bcd60e51b815260206004820152600b60248201526a44454c415945445f41434360a81b604482015290519081900360640190fd5b6149ef8a600160ff1b17612154565b896004815181106149fc57fe5b60200260200101819052508d6080015185858c030114614a5f576040805162461bcd60e51b815260206004820152601960248201527857524f4e475f44454c415945445f4d53475f5345515f4e554d60381b604482015290519081900360640190fd5b5060408051702232b630bcb2b21036b2b9b9b0b3b2b99d60791b602080830191909152603182019790975260518101869052607181018590526091810184905260b1808201939093528151808203909301835260d1019052805194019390932092030194505b86896101a0015181518110614ad657fe5b016020015160f81c91506002821415614aee57614cf3565b60ff82161580614b0157508160ff166001145b614b47576040805162461bcd60e51b815260206004820152601260248201527114915357d254d7d111531056515117d5905360721b604482015290519081900360640190fd5b6101a089018051600101905260ff8216614bd257600080614b6d898c6101a001516120e0565b6101a08d018290529250614b82908a906120e0565b6101a08d0191909152604080516020808201969096528082018a905260608101949094526080808501929092528051808503909201825260a0909301909252508051910120600190940193614cee565b600080614be4898c6101a001516120e0565b6101a08d018290529250614bf9908a906120e0565b8c6101a001819350828152505050828783838e602001516001600160a01b031663d9dd67ab600187036040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015614c5657600080fd5b505afa158015614c6a573d6000803e3d6000fd5b505050506040513d6020811015614c8057600080fd5b505160408051702232b630bcb2b21036b2b9b9b0b3b2b99d60791b602082810191909152603182019790975260518101959095526071850193909352609184019190915260b1808401919091528151808403909101815260d190920190528051910120919003959095019490505b614ac5565b88600001516001600160a01b031663d9dd67ab846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015614d3b57600080fd5b505afa158015614d4f573d6000803e3d6000fd5b505050506040513d6020811015614d6557600080fd5b50518114614dac576040805162461bcd60e51b815260206004820152600f60248201526e57524f4e475f42415443485f41434360881b604482015290519081900360640190fd5b6080890180516001019052614dc0846124f8565b9998505050505050505050565b600260e090910152565b60008160140183511015614e27576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b500160200151600160601b900490565b600080614e528584860186614e4b87614efd565b6001614f28565b50905061146b607b82614ed1565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6001600160601b0319166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600060018211614f0f575060016110bc565b614f1e60026001840104614efd565b60020290506110bc565b60008060208411614f7c57858510614f4f57614f4460006126c9565b600191509150614ff6565b6000614f64614f5f89888a615000565b6126c9565b905080614f7160006126c9565b909350149050614ff6565b600080614f968989600289048a0160028a5b046000614f28565b91509150808015614fa45750845b15614fc457614fb989898960028a0489614f28565b935093505050614ff6565b600080614fd58b8b8b60028c614f8e565b91509150614fe38285614ed1565b818015614fed5750835b95509550505050505b9550959350505050565b600080805b602081101561505657600882901b915060008186018511615027576000615045565b868287018151811061503557fe5b01602001516001600160f81b0319165b60f81c929092179150600101615005565b50949350505050565b60405180608001604052806004906020820280368337509192915050565b60408051610200810182526000808252602082015290810161509d61514c565b81526020016150aa61514c565b81526000602082018190526040820181905260608201819052608082015260a0016150d3615251565b81526020016150e0615251565b81526000602082018190526040820181905260608083018190526080830182905260a083015260c09091015290565b6040518060c001604052806000815260200161512961526b565b815260606020820181905260006040830181905290820181905260809091015290565b604080516101008101909152600081526020810161516861510f565b815260200161517561510f565b815260200161518261510f565b815260200161518f61510f565b81526000602082018190526040820181905260609091015290565b60405180604001604052806002906020820280368337509192915050565b60405180606001604052806003906020820280368337509192915050565b604051806103c00160405280601e905b6151fe61510f565b8152602001906001900390816151f65790505090565b60405180611680016040528060b4906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b604051806040016040528060008152602001606081525090565b604080516060808201835260008083526020830152918101919091529056fe75736520616e6f7468657220636f6e747261637420746f2068616e646c652068617368696e67206f70636f64657375736520616e6f7468657220636f6e747261637420746f2068616e646c6520627566666572206f70636f646573a264697066735822122036ccd7c361117d3d27c8c78e442dfa9319f6c1d4e523d3f7e29d6e73788354ba64736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b5061531b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806347dda1d61461003b578063eba67f6e14610157575b600080fd5b610107600480360360e081101561005157600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561007957600080fd5b82018360208201111561008b57600080fd5b803590602001918460018302840111600160201b831117156100ac57600080fd5b919390929091602081019035600160201b8111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111600160201b831117156100fc57600080fd5b509092509050610301565b604080516001600160401b03851681526020810184905290810182608080838360005b8381101561014257818101518382015260200161012a565b50505050905001935050505060405180910390f35b610223600480360360e081101561016d57600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561019557600080fd5b8201836020820111156101a757600080fd5b803590602001918460018302840111600160201b831117156101c857600080fd5b919390929091602081019035600160201b8111156101e557600080fd5b8201836020820111156101f757600080fd5b803590602001918460018302840111600160201b8311171561021857600080fd5b5090925090506103c0565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561026457818101518382015260200161024c565b50505050905090810190601f1680156102915780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156102c45781810151838201526020016102ac565b50505050905090810190601f1680156102f15780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b60008061030c61505f565b61031461507d565b6103988a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600081840152601f19601f820116905080830192505050505050508f610485565b90506103a38161093c565b6103ac81610d52565b935093509350509750975097945050505050565b6060806103cb61507d565b61044f898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a9081908401838280828437600081840152601f19601f820116905080830192505050505050508e610485565b905061045a8161093c565b6104678160400151610db5565b92506104768160600151610db5565b91505097509795505050505050565b61048d61507d565b60008460008151811061049c57fe5b602001015160f81c60f81b60f81c90506000856001815181106104bb57fe5b602001015160f81c60f81b60f81c90506000866002815181106104da57fe5b016020015160f81c9050600360606004840160ff166001600160401b038111801561050457600080fd5b5060405190808252806020026020018201604052801561053e57816020015b61052b61510f565b8152602001906001900390816105235790505b50905060608360040160ff166001600160401b038111801561055f57600080fd5b5060405190808252806020026020018201604052801561059957816020015b61058661510f565b81526020019060019003908161057e5790505b50905060005b8560ff168110156105d5576105b48b856110c1565b8483815181106105c057fe5b6020908102919091010152935060010161059f565b5060005b8460ff1681101561060f576105ee8b856110c1565b8383815181106105fa57fe5b602090810291909101015293506001016105d9565b5061061861514c565b6106228b85611283565b809250819550505060008b858151811061063857fe5b01602001516001959095019460f81c905061065161507d565b6001600160a01b038b35811682526020808d0135909116908201526040810183905261067c83611323565b6060820152608081018f90528d3560a08201526020808f013560c0830152600060e0830181905260408051808201825260ff8c811682528185018a905261010086019190915281518083019092528a8116825292810187905261012084015283821660018114610140850152918b1661016084015261018083018f90526101c083018e90526101e08301526101a08201879052158061071e57508160ff166001145b6040518060400160405280600b81526020016a04241445f494d4d5f5459560ac1b815250906107cb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610790578181015183820152602001610778565b50505050905090810190601f1680156107bd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506107d461510f565b60ff83166107f5576107ee8a83604001516000015161138c565b9050610895565b6000865111604051806040016040528060068152602001654e4f5f494d4d60d01b815250906108655760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b506108928a8360400151600001518860018d0360ff168151811061088557fe5b60200260200101516113f0565b90505b61089e81611474565b60408301515260005b838a0360ff168110156108e6576108de8782815181106108c357fe5b602002602001015184604001516115e190919063ffffffff16565b6001016108a7565b5060005b8860ff168110156109275761091f86828151811061090457fe5b602002602001015184604001516115fb90919063ffffffff16565b6001016108ea565b50909f9e505050505050505050505050505050565b6000806000612c7c61095585610160015160ff16611615565b9350935093509350600084118061096f5750846101400151155b80156109815750610100850151518410155b806109a957508461014001518015610997575083155b80156109a95750610100850151516001145b6040518060400160405280600a815260200169535441434b5f4d414e5960b01b81525090610a185760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b50610120850151516040805180820190915260088152674155585f4d414e5960c01b602082015290841015610a8e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b5061010085015151841115610b4c57610aad610aa8611d76565b611474565b610abe866060015160200151611474565b146040518060400160405280600d81526020016c535441434b5f4d495353494e4760981b81525090610b315760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b50610b3d856005611dbd565b50610b4785611e32565b610c0c565b61012085015151831115610be757610b65610aa8611d76565b610b76866060015160400151611474565b146040518060400160405280600b81526020016a4155585f4d495353494e4760a81b81525090610b315760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b610bf18583611dbd565b15610bff57610b4785611e32565b610c0c858263ffffffff16565b846101e0015115610cb15760408051600160f81b6020808301919091526000602183018190526022808401919091528351808403909101815260429092019092528051910120606086015160c001511415610c7357610c6e8560600151611e3d565b610cb1565b60006101e0860152606085015160c081015190526101408501518015610c97575083155b610ca657610100850151600090525b610120850151600090525b60005b61010086015151811015610cfd57610cf5866101000151602001518281518110610cda57fe5b602002602001015187606001516115e190919063ffffffff16565b600101610cb4565b5060005b61012086015151811015610d4a57610d42866101200151602001518281518110610d2757fe5b602002602001015187606001516115fb90919063ffffffff16565b600101610d01565b505050505050565b600080610d5d61505f565b8360e0015184608001516040518060800160405280610d7f8860400151611e47565b8152602001610d918860600151611e47565b81526020018760a0015181526020018760c001518152509250925092509193909250565b6060610dc48260000151611f0b565b610dd9610dd48460200151611474565b611f0b565b610de9610dd48560400151611474565b610df9610dd48660600151611474565b610e09610dd48760800151611474565b610e168760a00151611fda565b610e238860c00151611f0b565b60405160200180806709ac2c6d0d2dcca560c31b81525060080188805190602001908083835b60208310610e685780518252601f199092019160209182019101610e49565b51815160209384036101000a60001901801990921691161790526216100560e91b9190930190815289516003909101928a0191508083835b60208310610ebf5780518252601f199092019160209182019101610ea0565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528851600390910192890191508083835b60208310610f165780518252601f199092019160209182019101610ef7565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528751600390910192880191508083835b60208310610f6d5780518252601f199092019160209182019101610f4e565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528651600390910192870191508083835b60208310610fc45780518252601f199092019160209182019101610fa5565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528551600390910192860191508083835b6020831061101b5780518252601f199092019160209182019101610ffc565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528451600390910192850191508083835b602083106110725780518252601f199092019160209182019101611053565b6001836020036101000a0380198251168184511680821785525050505050509050018061148560f11b81525060020197505050505050505060405160208183030381529060405290505b919050565b60006110cb61510f565b83518310611111576040805162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a59081bd9999cd95d60921b604482015290519081900360640190fd5b60008061111e86866120b4565b9150915061112a6120db565b60ff168160ff16141561115e57600061114387846120e0565b90935090508261115282612154565b9450945050505061127c565b611166612214565b60ff168160ff1614156111885761117d8683612219565b93509350505061127c565b6111906122bb565b60ff168160ff1614156111b85760006111a987846120e0565b909350905082611152826122c0565b6111c06123ac565b60ff168160ff1614156111d75761117d86836123b1565b6111df612446565b60ff168160ff161015801561120057506111f761244b565b60ff168160ff16105b1561123c57600061120f612446565b820390506060611220828986612450565b90945090508361122f826124f8565b955095505050505061127c565b6040805162461bcd60e51b815260206004820152601060248201526f696e76616c69642074797065636f646560801b604482015290519081900360640190fd5b9250929050565b600061128d61514c565b61129561514c565b600060e08201819052806112a987876120e0565b90965091506112b887876123b1565b602085015295506112c987876123b1565b604085015295506112da87876110c1565b606085015295506112eb87876110c1565b608085015295506112fc87876120e0565b60a0850152955061130d87876120e0565b92845260c0840192909252509590945092505050565b61132b61514c565b60405180610100016040528083600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020018360a0015181526020018360c0015181526020018360e001518152509050919050565b61139461510f565b6040805160608101825260ff8516815260208082018590528251600080825291810184526113e7938301916113df565b6113cc61510f565b8152602001906001900390816113c45790505b509052612639565b90505b92915050565b6113f861510f565b604080516001808252818301909252606091816020015b61141761510f565b81526020019060019003908161140f579050509050828160008151811061143a57fe5b602002602001018190525061146b60405180606001604052808760ff16815260200186815260200183815250612639565b95945050505050565b600061147e6120db565b60ff16826080015160ff1614156114a157815161149a906126c9565b90506110bc565b6114a9612214565b60ff16826080015160ff1614156114c75761149a82602001516126ed565b6114cf6123ac565b60ff16826080015160ff1614156114f157815160a083015161149a91906127ea565b6114f9612446565b60ff16826080015160ff1614156115325761151261510f565b61151f836040015161283b565b905061152a81611474565b9150506110bc565b61153a6129b3565b60ff16826080015160ff161415611553575080516110bc565b61155b6122bb565b60ff16826080015160ff1614156115a0575060608082015160408051607b602080830191909152818301939093528151808203830181529301905281519101206110bc565b6040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207479706520636f646560781b604482015290519081900360640190fd5b6115ef8260200151826129b8565b82602001819052505050565b6116098260400151826129b8565b82604001819052505050565b60008080612c7c600185148061162b5750600285145b806116365750600385145b156116505750600292506000915060039050612a36611d6f565b600485148061165f5750600685145b156116795750600292506000915060049050612c98611d6f565b60058514806116885750600785145b156116a25750600292506000915060079050612c98611d6f565b60088514806116b15750600985145b156116cb5750600392506000915060049050612d6a611d6f565b600a8514156116e95750600292506000915060199050612a36611d6f565b600b8514156117075750600292506000915060079050612a36611d6f565b60108514806117165750601185145b806117215750601285145b8061172c5750601385145b806117375750601685145b806117425750601785145b8061174d5750601885145b1561176657506002925060009150829050612a36611d6f565b601485141561178357506002925060009150829050612e57611d6f565b60158514156117a057506001925060009150829050612eb0611d6f565b60198514156117bd57506001925060009150829050612f02611d6f565b601a8514806117cc5750601b85145b806117d75750601c85145b806117e25750601d85145b156117fc5750600292506000915060049050612a36611d6f565b603085141561181957506001925060009150829050612f48611d6f565b603185141561183657506000925082915060019050612f5a611d6f565b603285141561185357506000925082915060019050612f71611d6f565b60338514156118715750600192506000915060029050612f88611d6f565b603485141561188f5750600192506000915060049050612fa2611d6f565b60358514156118ad5750600292506000915060049050612fe3611d6f565b60368514156118ca57506000925082915060029050613057611d6f565b60378514156118e75750600092508291506001905061309b611d6f565b6038851415611904575060019250600091508290506130b7611d6f565b6039851415611921575060009250600191508190506130ce611d6f565b603a85141561193e575060009250829150600290506130e5611d6f565b603b85141561195b57506000925082915060019050612c95611d6f565b603c85141561197857506000925082915060019050613113611d6f565b603d8514156119955750600192506000915082905061312f611d6f565b60408514156119b257506001925060009150829050613173611d6f565b60418514156119d057506002925060009150600190506131a9611d6f565b60428514156119ee5750600392506000915060019050613206611d6f565b6043851415611a0c575060029250600091506001905061328a611d6f565b6044851415611a2a57506003925060009150600190506132c9611d6f565b6050851415611a475750600292506000915082905061332f611d6f565b6051851415611a6557506003925060009150602890506133cc611d6f565b6052851415611a835750600192506000915060029050613490611d6f565b6053851415611aa0575060019250829150600390506134db611d6f565b6054851415611abe575060029250600191506029905061355d611d6f565b6060851415611adb57506000925082915060649050612c95611d6f565b6061851415611af9575060019250600091506064905061361a611d6f565b6072851415611b1657506000925082915060289050613661611d6f565b6073851415611b3357506000925082915060059050613673611d6f565b6074851415611b50575060009250829150600a905061367c611d6f565b6075851415611b6d57506001925060009150829050613689611d6f565b6076851415611b8a575060009250829150600190506136c4611d6f565b6077851415611ba7575060009250829150601990506136de611d6f565b6078851415611bc5575060029250600091506019905061372f611d6f565b6079851415611be357506003925060009150601990506137a7611d6f565b607b851415611c0157506001925060009150600a9050613838611d6f565b6080851415611c2057506004925060009150614e2090506138ae611d6f565b6081851415611c3f57506004925060009150610dac9050613a30611d6f565b6082851415611c5f57506003925060009150620140509050613b6d611d6f565b6083851415611c7e575060019250600091506103e89050613c71611d6f565b6090851415611c9b57506001925060009150829050612f48611d6f565b60a0851415611cb857506000925082915060019050613fb9611d6f565b60208510801590611cca575060248511155b15611d065760405162461bcd60e51b815260040180806020018281038252602e81526020018061528b602e913960400191505060405180910390fd5b60a18510801590611d18575060a68511155b80611d235750607085145b15611d5f5760405162461bcd60e51b815260040180806020018281038252602d8152602001806152b9602d913960400191505060405180910390fd5b5060009250829150600590506136735b9193509193565b611d7e61510f565b60408051600080825260208201909252611db891611db2565b611d9f61510f565b815260200190600190039081611d975790505b506124f8565b905090565b6000816001600160401b0316836060015160a001511015611e02575060e0820180516005016001600160401b03169052606082015160001960a09091015260016113ea565b5060e0820180516001600160401b039083018116909152606083015160a0018051918316909103905260006113ea565b60016101e090910152565b600160e090910152565b600060028260e001511415611e5e575060006110bc565b60018260e001511415611e73575060016110bc565b81516020830151611e8390611474565b611e908460400151611474565b611e9d8560600151611474565b611eaa8660800151611474565b8660a001518760c00151604051602001808881526020018781526020018681526020018581526020018481526020018381526020018281526020019750505050505050506040516020818303038152906040528051906020012090506110bc565b60408051818152606081810183529182919060208201818036833701905050905060005b6020811015611fd3576000848260208110611f4657fe5b1a60f881811b9250601080830480831b9360ff9091169091029003901b611f6c82613ff4565b858560020281518110611f7b57fe5b60200101906001600160f81b031916908160001a905350611f9b81613ff4565b858560020260010181518110611fad57fe5b60200101906001600160f81b031916908160001a9053505060019092019150611f2f9050565b5092915050565b606081806120015750506040805180820190915260018152600360fc1b60208201526110bc565b8060005b811561201957600101600a82049150612005565b6060816001600160401b038111801561203157600080fd5b506040519080825280601f01601f19166020018201604052801561205c576020820181803683370190505b50905060001982015b84156120aa57600a850660300160f81b8282806001900393508151811061208857fe5b60200101906001600160f81b031916908160001a905350600a85049450612065565b5095945050505050565b600080826001018484815181106120c757fe5b016020015190925060f81c90509250929050565b600090565b600080828451101580156120f8575060208385510310155b612135576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301612149858563ffffffff61402516565b915091509250929050565b61215c61510f565b6040805160c08101825283815281516060810183526000808252602080830182905284518281528082018652939490850193908301916121b2565b61219f61510f565b8152602001906001900390816121975790505b509052815260200160006040519080825280602002602001820160405280156121f557816020015b6121e261510f565b8152602001906001900390816121da5790505b5081526000602082018190526040820152600160609091015292915050565b600190565b600061222361510f565b8260008061222f61510f565b600061223b89866120b4565b909550935061224a89866120b4565b9095509250600160ff8516141561226b5761226589866110c1565b90955091505b612275898661407e565b9095509050600160ff851614156122a057846122928483856113f0565b96509650505050505061127c565b846122ab848361138c565b9650965050505050509250929050565b600c90565b6122c861510f565b6040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b038111801561230f57600080fd5b5060405190808252806020026020018201604052801561234957816020015b61233661510f565b81526020019060019003908161232e5790505b5090528152602001600060405190808252806020026020018201604052801561238c57816020015b61237961510f565b8152602001906001900390816123715790505b50815260208101849052600c604082015260016060909101529050919050565b600290565b60006123bb61510f565b828451101580156123d0575060408385510310155b61240d576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60008061241a868661407e565b909450915061242986856120e0565b9094509050836124398383614095565b9350935050509250929050565b600390565b600d90565b60006060828160ff87166001600160401b038111801561246f57600080fd5b506040519080825280602002602001820160405280156124a957816020015b61249661510f565b81526020019060019003908161248e5790505b50905060005b8760ff168160ff1610156124eb576124c787846110c1565b838360ff16815181106124d657fe5b602090810291909101015292506001016124af565b5090969095509350505050565b61250061510f565b61250a8251614154565b61255b576040805162461bcd60e51b815260206004820152601a60248201527f5475706c65206d75737420686176652076616c69642073697a65000000000000604482015290519081900360640190fd5b600160005b83518110156125925783818151811061257557fe5b602002602001015160a00151820191508080600101915050612560565b506040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b03811180156125da57600080fd5b5060405190808252806020026020018201604052801561261457816020015b61260161510f565b8152602001906001900390816125f95790505b5090528152602081019490945260006040850152600360608501526080909301525090565b61264161510f565b6040518060c001604052806000815260200183815260200160006001600160401b038111801561267057600080fd5b506040519080825280602002602001820160405280156126aa57816020015b61269761510f565b81526020019060019003908161268f5790505b5081526000602082015260016040820181905260609091015292915050565b60408051602080820193909352815180820384018152908201909152805191012090565b60006002826040015151106126fe57fe5b60408201515161276357612710612214565b8251602080850151604080516001600160f81b031960f896871b8116828601529490951b9093166021850152602280850191909152825180850390910181526042909301909152815191012090506110bc565b61276b612214565b8260000151612791846040015160008151811061278457fe5b6020026020010151611474565b8460200151604051602001808560ff1660ff1660f81b81526001018460ff1660ff1660f81b8152600101838152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b60006127f4612446565b8383604051602001808460ff1660ff1660f81b8152600101838152602001828152602001935050505060405160208183030381529060405280519060200120905092915050565b61284361510f565b600882511115612891576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e8eae0d8ca40d8cadccee8d60631b604482015290519081900360640190fd5b606082516001600160401b03811180156128aa57600080fd5b506040519080825280602002602001820160405280156128d4578160200160208202803683370190505b508051909150600160005b82811015612937576128f686828151811061278457fe5b84828151811061290257fe5b60200260200101818152505085818151811061291a57fe5b602002602001015160a001518201915080806001019150506128df565b506000835184604051602001808360ff1660ff1660f81b8152600101828051906020019060200280838360005b8381101561297c578181015183820152602001612964565b50505050905001925050506040516020818303038152906040528051906020012090506129a98183614095565b9695505050505050565b606490565b6129c061510f565b6040805160028082526060828101909352816020015b6129de61510f565b8152602001906001900390816129d65790505090508281600081518110612a0157fe5b60200260200101819052508381600181518110612a1a57fe5b6020026020010181905250612a2e8161283b565b949350505050565b612a3e61510f565b612a4c82610100015161415b565b9050612a5661510f565b612a6483610100015161415b565b9050612a6f8261419d565b1580612a815750612a7f8161419d565b155b15612a9657612a8f836141a8565b5050612c95565b8151815161016085015160009060ff1660011415612ab75750818101612c7e565b61016086015160ff1660021415612ad15750818102612c7e565b61016086015160ff1660031415612aeb5750808203612c7e565b61016086015160ff16600a1415612b05575080820a612c7e565b61016086015160ff16600b1415612b1f575080820b612c7e565b61016086015160ff1660101415612b395750808210612c7e565b61016086015160ff1660111415612b535750808211612c7e565b61016086015160ff1660121415612b6d5750808212612c7e565b61016086015160ff1660131415612b875750808213612c7e565b61016086015160ff1660161415612ba15750818116612c7e565b61016086015160ff1660171415612bbb5750818117612c7e565b61016086015160ff1660181415612bd55750818118612c7e565b61016086015160ff16601a1415612bef575080821a612c7e565b61016086015160ff16601b1415612c09575080821b612c7e565b61016086015160ff16601c1415612c23575080821c612c7e565b61016086015160ff16601d1415612c3d575080821d612c7e565b61016086015160ff1660221415612c7c575060408051602080820185905281830184905282518083038401815260609092019092528051910120612c7e565bfe5b610d4a866101000151612c9083612154565b6141b1565b50565b612ca061510f565b612cae82610100015161415b565b9050612cb861510f565b612cc683610100015161415b565b9050612cd18261419d565b1580612ce35750612ce18161419d565b155b80612ced57508051155b15612cfb57612a8f836141a8565b8151815161016085015160009060ff1660041415612d1c5750808204612c7e565b61016086015160ff1660051415612d365750808205612c7e565b61016086015160ff1660061415612d505750808206612c7e565b61016086015160ff1660071415612c7c5750808207612c7e565b612d7261510f565b612d8082610100015161415b565b9050612d8a61510f565b612d9883610100015161415b565b9050612da261510f565b612db084610100015161415b565b9050612dbb8361419d565b1580612dcd5750612dcb8261419d565b155b80612dde5750612ddc8161419d565b155b80612de857508051155b15612dfe57612df6846141a8565b505050612c95565b82518251825161016087015160009060ff1660081415612e2357818385089050612e3b565b61016088015160ff1660091415612c7c578183850990505b612e4d886101000151612c9083612154565b5050505050505050565b612e5f61510f565b612e6d82610100015161415b565b9050612e7761510f565b612e8583610100015161415b565b9050612eab836101000151612c90612e9c84611474565b612ea586611474565b146141db565b505050565b612eb861510f565b612ec682610100015161415b565b9050612ed18161419d565b612ee457612ede826141a8565b50612c95565b8051610100830151811590612efc90612c9083612154565b50505050565b612f0a61510f565b612f1882610100015161415b565b9050612f238161419d565b612f3057612ede826141a8565b8051610100830151811990612efc90612c9083612154565b612f5681610100015161415b565b5050565b612c958161010001518260600151608001516141b1565b612c958161010001518260600151606001516141b1565b612f9681610100015161415b565b60609182015190910152565b612faa61510f565b612fb882610100015161415b565b9050612fc3816141fd565b612fd057612ede826141a8565b612fd981611474565b6060830151525050565b612feb61510f565b612ff982610100015161415b565b905061300361510f565b61301183610100015161415b565b905061301c826141fd565b158061302e575061302c8161419d565b155b1561303c57612a8f836141a8565b805115612eab5761304c82611474565b606084015152505050565b610100810151516000901580156130875750613074610aa8611d76565b613085836060015160200151611474565b145b9050612f56826101000151612c90836141db565b612c95816101000151612c90836040015160000151600161420a565b612c95816101200151612c9083610100015161415b565b612c95816101000151612c9083610120015161415b565b610120810151516000901580156130875750613102610aa8611d76565b613085836060015160400151611474565b612c95816101000151612c90836060015160c00151600161420a565b61313761510f565b61314582610100015161415b565b9050613150816141fd565b61315d57612ede826141a8565b61316681611474565b606083015160c001525050565b61317b61510f565b61318982610100015161415b565b905061319a826101000151826141b1565b612f56826101000151826141b1565b6131b161510f565b6131bf82610100015161415b565b90506131c961510f565b6131d783610100015161415b565b90506131e8836101000151826141b1565b6131f7836101000151836141b1565b612eab836101000151826141b1565b61320e61510f565b61321c82610100015161415b565b905061322661510f565b61323483610100015161415b565b905061323e61510f565b61324c84610100015161415b565b905061325d846101000151826141b1565b61326c846101000151836141b1565b61327b846101000151846141b1565b612efc846101000151826141b1565b61329261510f565b6132a082610100015161415b565b90506132aa61510f565b6132b883610100015161415b565b90506131f7836101000151836141b1565b6132d161510f565b6132df82610100015161415b565b90506132e961510f565b6132f783610100015161415b565b905061330161510f565b61330f84610100015161415b565b9050613320846101000151846141b1565b61327b846101000151836141b1565b61333761510f565b61334582610100015161415b565b905061334f61510f565b61335d83610100015161415b565b90506133688261419d565b158061337a5750613378816142c9565b155b806133945750613389816142d6565b60ff16826000015110155b156133a257612a8f836141a8565b612eab83610100015182604001518460000151815181106133bf57fe5b60200260200101516141b1565b6133d461510f565b6133e282610100015161415b565b90506133ec61510f565b6133fa83610100015161415b565b905061340461510f565b61341284610100015161415b565b905061341d8361419d565b158061342f575061342d826142c9565b155b80613449575061343e826142d6565b60ff16836000015110155b1561345757612df6846141a8565b60408201518351815183918391811061346c57fe5b6020026020010181905250613489856101000151612c90836124f8565b5050505050565b61349861510f565b6134a682610100015161415b565b90506134b1816142c9565b6134be57612ede826141a8565b612f56826101000151612c906134d3846142d6565b60ff16612154565b6134e361510f565b6134f182610100015161415b565b90506134fb61510f565b61350983610120015161415b565b90506135148261419d565b15806135265750613524816142c9565b155b806135405750613535816142d6565b60ff16826000015110155b1561354e57612a8f836141a8565b6133a2836101200151826141b1565b61356561510f565b61357382610100015161415b565b905061357d61510f565b61358b83610100015161415b565b905061359561510f565b6135a384610120015161415b565b90506135ae816142c9565b15806135c057506135be8361419d565b155b806135da57506135cf816142d6565b60ff16836000015110155b156135e857612df6846141a8565b6040810151835181518491839181106135fd57fe5b6020026020010181905250613489856101200151612c90836124f8565b8060c00151613630610aa883610100015161415b565b604080516020808201949094528082019290925280518083038201815260609092019052805191012060c090910152565b612c95816101000151612c90836142fd565b612c95816141a8565b612c958160600151614dcd565b61369161510f565b61369f82610100015161415b565b90506136aa8161419d565b6136b757612ede826141a8565b51606082015160a0015250565b612c95816101000151612c90836060015160a00151612154565b61010081015160408051600160f81b6020808301919091526000602183018190526022808401919091528351808403909101815260429092019092528051910120612c959190612c9090600161420a565b61373761510f565b61374582610100015161415b565b905061374f61510f565b61375d83610100015161415b565b90506137688261419d565b158061377a5750613778816141fd565b155b1561378857612a8f836141a8565b612eab836101000151612c9084600001516137a285611474565b61138c565b6137af61510f565b6137bd82610100015161415b565b90506137c761510f565b6137d583610100015161415b565b90506137df61510f565b6137ed84610100015161415b565b90506137f88361419d565b158061380a5750613808816141fd565b155b1561381857612df6846141a8565b612efc846101000151612c90856000015161383285611474565b866113f0565b61384061510f565b61384e82610100015161415b565b90506138598161419d565b61386657612ede826141a8565b60408051600080825260208201909252606091613899565b61388661510f565b81526020019060019003908161387e5790505b509050612eab836101000151612c90836124f8565b6138b661510f565b6138c482610100015161415b565b90506138ce61510f565b6138dc83610100015161415b565b90506138e661510f565b6138f484610100015161415b565b90506138fe61510f565b61390c85610100015161415b565b90506139178461419d565b158061392957506139278361419d565b155b8061393a57506139388261419d565b155b8061394b57506139498161419d565b155b1561396257613959856141a8565b50505050612c95565b8351835183511580159061397857508351600114155b1561399b57613990876101000151612c906000612154565b505050505050612c95565b83518351604080516000808252602080830180855285905260ff601b9096019586168385015260608301889052608083018790529251909260019260a080820193601f1981019281900390910190855afa1580156139fd573d6000803e3d6000fd5b505050602060405103519050613a248a6101000151612c90836001600160a01b0316612154565b50505050505050505050565b613a3861510f565b613a4682610100015161415b565b9050613a5061510f565b613a5e83610100015161415b565b9050613a6861510f565b613a7684610100015161415b565b9050613a8061510f565b613a8e85610100015161415b565b9050613a998461419d565b1580613aab5750613aa98361419d565b155b80613abc5750613aba8261419d565b155b80613acd5750613acb8161419d565b155b15613adb57613959856141a8565b613ae361505f565b5060408051608081018252855181528451602082015283519181019190915281516060820152613b116151aa565b600060408260808560066107d05a03fa905080613b3d57613b31886141a8565b50505050505050612c95565b610100880151613b5890612c908460015b6020020151612154565b610100880151612e4d90612c90846000613b4e565b613b7561510f565b613b8382610100015161415b565b9050613b8d61510f565b613b9b83610100015161415b565b9050613ba561510f565b613bb384610100015161415b565b9050613bbe8361419d565b1580613bd05750613bce8261419d565b155b80613be15750613bdf8161419d565b155b15613bef57612df6846141a8565b613bf76151c8565b50604080516060810182528451815283516020820152825191810191909152613c1e6151aa565b600060408260808560076107d05a03fa905080613c3e57613990876141a8565b610100870151613c5390612c90846001613b4e565b610100870151613c6890612c90846000613b4e565b50505050505050565b613c7961510f565b613c8782610100015161415b565b9050613c916151e6565b6000805b601e811015613d2357613ca7846142c9565b613cb45760019150613d23565b60408401518051613cc55750613d23565b8051600214613cd8576001925050613d23565b80600081518110613ce557fe5b60200260200101518483601e8110613cf957fe5b6020020152805181906001908110613d0d57fe5b6020908102919091010151945050600101613c95565b613d32856207a1208302611dbd565b15613d565760e0850180516103e719016001600160401b0316905261395985611e32565b8180613d685750613d66846142c9565b155b80613d77575060408401515115155b15613d8557613959856141a8565b613d8d615214565b60005b82811015613f6a57613da061510f565b8582601e8110613dac57fe5b60200201519050613dbc816142c9565b613dc957613b31886141a8565b60408101518051600614613ded57613de0896141a8565b5050505050505050612c95565b60005b6006811015613e3857613e15828281518110613e0857fe5b602002602001015161419d565b613e3057613e228a6141a8565b505050505050505050612c95565b600101613df0565b5080600081518110613e4657fe5b602002602001015160000151848460060260b48110613e6157fe5b6020020152805181906001908110613e7557fe5b602002602001015160000151848460060260010160b48110613e9357fe5b6020020152805181906003908110613ea757fe5b602002602001015160000151848460060260020160b48110613ec557fe5b6020020152805181906002908110613ed957fe5b602002602001015160000151848460060260030160b48110613ef757fe5b6020020152805181906005908110613f0b57fe5b602002602001015160000151848460060260040160b48110613f2957fe5b6020020152805181906004908110613f3d57fe5b602002602001015160000151848460060260050160b48110613f5b57fe5b60200201525050600101613d90565b5060c08202613f77615233565b6000602082848660086107d05a03fa905080613f9657613de0896141a8565b6101008901518251613fae9190612c909015156141db565b505050505050505050565b612c95816101000151612c906000801b60405160200180828152602001915050604051602081830303815290604052805190602001206122c0565b6000600a60f883901c1015614014578160f81c60300160f81b90506110bc565b8160f81c60570160f81b90506110bc565b60008160200183511015614075576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b60008060208301612149858563ffffffff61402516565b61409d61510f565b6040805160c08101825284815281516060810183526000808252602080830182905284518281528082018652939490850193908301916140f3565b6140e061510f565b8152602001906001900390816140d85790505b5090528152602001600060405190808252806020026020018201604052801561413657816020015b61412361510f565b81526020019060019003908161411b5790505b50815260006020820152600260408201526060019290925250919050565b6008101590565b61416361510f565b61416b61510f565b826020015160018460000151038151811061418257fe5b60209081029190910101518351600019018452915050919050565b6080015160ff161590565b612c9581611e32565b8082602001518360000151815181106141c657fe5b60209081029190910101525080516001019052565b6141e361510f565b81156141f35761149a6001612154565b61149a6000612154565b6080015160ff1660011490565b61421261510f565b6040805160c0810182528481528151606081018352600080825260208083018290528451828152808201865293949085019390830191614268565b61425561510f565b81526020019060019003908161424d5790505b509052815260200160006040519080825280602002602001820160405280156142ab57816020015b61429861510f565b8152602001906001900390816142905790505b50815260006020820152606460408201526060019290925250919050565b6080015160ff1660031490565b608081015160009060ff16600314156142f557506040810151516110bc565b5060016110bc565b61430561510f565b6101808201516143136151c8565b604080516008808252610120820190925260009160609190816020015b61433861510f565b815260200190600190039081614330579050509050600084876101a001518151811061436057fe5b01602001516101a0880180516001019081905260f89190911c9150600090819081908190614395908a9063ffffffff614dd716565b6101a08c018051601401908190529091506143b1908a906120e0565b6101a08d0182905294506143c6908a906120e0565b6101a08d0182905293506143db908a906120e0565b6101a08d0182905297506143f0908a906120e0565b6101a08d018290529250600090614408908b906120e0565b6101a08e018290529150600090614421908c9084614e37565b6101a08e0180518d810160200185902085820190925291925061444989868a8a8f8b87614e60565b8c526000841561445b5750600361445f565b5060065b8060ff168a60ff16148015614472575086155b156144c65760408051606088901b6001600160601b031916602080830191909152603482018c905260548083018c90528351808403909101815260749092018352815191810191909120908f01528d018290525b6144d28a60ff16612154565b8b6000815181106144df57fe5b60200260200101819052506144f389612154565b8b60018151811061450057fe5b602002602001018190525061451488612154565b8b60028151811061452157fe5b602002602001018190525061453e866001600160a01b0316612154565b8b60038151811061454b57fe5b602002602001018190525061455f8c612154565b8b60048151811061456c57fe5b602002602001018190525061458087612154565b8b60058151811061458d57fe5b60200260200101819052506145a185612154565b8b6006815181106145ae57fe5b60200260200101819052506145c484600161420a565b8b6007815181106145d157fe5b60200260200101819052505050505050505050505060006145f785886101a001516120e0565b6101a0890182905286519092506000918791811061461157fe5b01602001516101a089018051600101905260f81c905080158061463757508060ff166001145b614679576040805162461bcd60e51b815260206004820152600e60248201526d1254d7d111531056515117d5905360921b604482015290519081900360640190fd5b600061468a878a6101a001516120e0565b6101a08b0191909152905060ff821661474f578085876001602002015188600260200201516040516020018085815260200184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120905088608001518514614744576040805162461bcd60e51b815260206004820152601b60248201527f57524f4e475f53455155454e4345525f4d53475f5345515f4e554d0000000000604482015290519081900360640190fd5b600190940193614ac5565b60008060006147638a8d6101a001516120e0565b6101a08e018290529350614778908b906120e0565b6101a08e01829052925061478d908b906120e0565b6101a08e01919091526020808e01516040805163d9dd67ab60e01b81526000198501600482015290519394506000936001600160a01b039092169263d9dd67ab92602480840193829003018186803b1580156147e857600080fd5b505afa1580156147fc573d6000803e3d6000fd5b505050506040513d602081101561481257600080fd5b505190508289101561485b576040805162461bcd60e51b815260206004820152600d60248201526c1111531056515117d4d5105495609a1b604482015290519081900360640190fd5b81891061489d576040805162461bcd60e51b815260206004820152600b60248201526a1111531056515117d1539160aa1b604482015290519081900360640190fd5b6000891561491f578d602001516001600160a01b031663d9dd67ab60018c036040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156148f057600080fd5b505afa158015614904573d6000803e3d6000fd5b505050506040513d602081101561491a57600080fd5b505190505b8d602001516001600160a01b031663d9dd67ab8b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561496757600080fd5b505afa15801561497b573d6000803e3d6000fd5b505050506040513d602081101561499157600080fd5b50518b516149a0908390614ed1565b146149e0576040805162461bcd60e51b815260206004820152600b60248201526a44454c415945445f41434360a81b604482015290519081900360640190fd5b6149ef8a600160ff1b17612154565b896004815181106149fc57fe5b60200260200101819052508d6080015185858c030114614a5f576040805162461bcd60e51b815260206004820152601960248201527857524f4e475f44454c415945445f4d53475f5345515f4e554d60381b604482015290519081900360640190fd5b5060408051702232b630bcb2b21036b2b9b9b0b3b2b99d60791b602080830191909152603182019790975260518101869052607181018590526091810184905260b1808201939093528151808203909301835260d1019052805194019390932092030194505b86896101a0015181518110614ad657fe5b016020015160f81c91506002821415614aee57614cf3565b60ff82161580614b0157508160ff166001145b614b47576040805162461bcd60e51b815260206004820152601260248201527114915357d254d7d111531056515117d5905360721b604482015290519081900360640190fd5b6101a089018051600101905260ff8216614bd257600080614b6d898c6101a001516120e0565b6101a08d018290529250614b82908a906120e0565b6101a08d0191909152604080516020808201969096528082018a905260608101949094526080808501929092528051808503909201825260a0909301909252508051910120600190940193614cee565b600080614be4898c6101a001516120e0565b6101a08d018290529250614bf9908a906120e0565b8c6101a001819350828152505050828783838e602001516001600160a01b031663d9dd67ab600187036040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015614c5657600080fd5b505afa158015614c6a573d6000803e3d6000fd5b505050506040513d6020811015614c8057600080fd5b505160408051702232b630bcb2b21036b2b9b9b0b3b2b99d60791b602082810191909152603182019790975260518101959095526071850193909352609184019190915260b1808401919091528151808403909101815260d190920190528051910120919003959095019490505b614ac5565b88600001516001600160a01b031663d9dd67ab846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015614d3b57600080fd5b505afa158015614d4f573d6000803e3d6000fd5b505050506040513d6020811015614d6557600080fd5b50518114614dac576040805162461bcd60e51b815260206004820152600f60248201526e57524f4e475f42415443485f41434360881b604482015290519081900360640190fd5b6080890180516001019052614dc0846124f8565b9998505050505050505050565b600260e090910152565b60008160140183511015614e27576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b500160200151600160601b900490565b600080614e528584860186614e4b87614efd565b6001614f28565b50905061146b607b82614ed1565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6001600160601b0319166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600060018211614f0f575060016110bc565b614f1e60026001840104614efd565b60020290506110bc565b60008060208411614f7c57858510614f4f57614f4460006126c9565b600191509150614ff6565b6000614f64614f5f89888a615000565b6126c9565b905080614f7160006126c9565b909350149050614ff6565b600080614f968989600289048a0160028a5b046000614f28565b91509150808015614fa45750845b15614fc457614fb989898960028a0489614f28565b935093505050614ff6565b600080614fd58b8b8b60028c614f8e565b91509150614fe38285614ed1565b818015614fed5750835b95509550505050505b9550959350505050565b600080805b602081101561505657600882901b915060008186018511615027576000615045565b868287018151811061503557fe5b01602001516001600160f81b0319165b60f81c929092179150600101615005565b50949350505050565b60405180608001604052806004906020820280368337509192915050565b60408051610200810182526000808252602082015290810161509d61514c565b81526020016150aa61514c565b81526000602082018190526040820181905260608201819052608082015260a0016150d3615251565b81526020016150e0615251565b81526000602082018190526040820181905260608083018190526080830182905260a083015260c09091015290565b6040518060c001604052806000815260200161512961526b565b815260606020820181905260006040830181905290820181905260809091015290565b604080516101008101909152600081526020810161516861510f565b815260200161517561510f565b815260200161518261510f565b815260200161518f61510f565b81526000602082018190526040820181905260609091015290565b60405180604001604052806002906020820280368337509192915050565b60405180606001604052806003906020820280368337509192915050565b604051806103c00160405280601e905b6151fe61510f565b8152602001906001900390816151f65790505090565b60405180611680016040528060b4906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b604051806040016040528060008152602001606081525090565b604080516060808201835260008083526020830152918101919091529056fe75736520616e6f7468657220636f6e747261637420746f2068616e646c652068617368696e67206f70636f64657375736520616e6f7468657220636f6e747261637420746f2068616e646c6520627566666572206f70636f646573a26469706673582212201e02c1b243221b088f7c6f9bcf65f852483967895ff9153e31810bb5f61d50eb64736f6c634300060b0033", } // OneStepProofABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgetestcontracts/OneStepProof2.go b/packages/arb-util/ethbridgetestcontracts/OneStepProof2.go index ba08bce0b5..b994af2d6c 100755 --- a/packages/arb-util/ethbridgetestcontracts/OneStepProof2.go +++ b/packages/arb-util/ethbridgetestcontracts/OneStepProof2.go @@ -31,7 +31,7 @@ var ( // OneStepProof2MetaData contains all meta data concerning the OneStepProof2 contract. var OneStepProof2MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address[2]\",\"name\":\"bridges\",\"type\":\"address[2]\"},{\"internalType\":\"uint256\",\"name\":\"initialMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[2]\",\"name\":\"accs\",\"type\":\"bytes32[2]\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"bproof\",\"type\":\"bytes\"}],\"name\":\"executeStep\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"gas\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"afterMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[4]\",\"name\":\"fields\",\"type\":\"bytes32[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[2]\",\"name\":\"bridges\",\"type\":\"address[2]\"},{\"internalType\":\"uint256\",\"name\":\"initialMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[2]\",\"name\":\"accs\",\"type\":\"bytes32[2]\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"bproof\",\"type\":\"bytes\"}],\"name\":\"executeStepDebug\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"startMachine\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"afterMachine\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"parseProof\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506140e3806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806347dda1d614610046578063793deea314610162578063eba67f6e14610329575b600080fd5b610112600480360360e081101561005c57600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561008457600080fd5b82018360208201111561009657600080fd5b803590602001918460018302840111600160201b831117156100b757600080fd5b919390929091602081019035600160201b8111156100d457600080fd5b8201836020820111156100e657600080fd5b803590602001918460018302840111600160201b8311171561010757600080fd5b5090925090506104d3565b604080516001600160401b03851681526020810184905290810182608080838360005b8381101561014d578181015183820152602001610135565b50505050905001935050505060405180910390f35b6102066004803603602081101561017857600080fd5b810190602081018135600160201b81111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111600160201b831117156101c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610592945050505050565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b8381101561025257818101518382015260200161023a565b50505050905001858103845288818151815260200191508051906020019060200280838360005b83811015610291578181015183820152602001610279565b50505050905001858103835287818151815260200191508051906020019060200280838360005b838110156102d05781810151838201526020016102b8565b50505050905001858103825286818151815260200191508051906020019060200280838360005b8381101561030f5781810151838201526020016102f7565b505050509050019850505050505050505060405180910390f35b6103f5600480360360e081101561033f57600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561036757600080fd5b82018360208201111561037957600080fd5b803590602001918460018302840111600160201b8311171561039a57600080fd5b919390929091602081019035600160201b8111156103b757600080fd5b8201836020820111156103c957600080fd5b803590602001918460018302840111600160201b831117156103ea57600080fd5b5090925090506105ce565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561043657818101518382015260200161041e565b50505050905090810190601f1680156104635780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561049657818101518382015260200161047e565b50505050905090810190601f1680156104c35780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b6000806104de613ed3565b6104e6613ef1565b61056a8a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600081840152601f19601f820116905080830192505050505050508f610693565b905061057581610b4a565b61057e81610f60565b935093509350509750975097945050505050565b6060806060806105a0613f83565b6105a986610fc3565b80516020820151604083015160609093015191975095509093509150505b9193509193565b6060806105d9613ef1565b61065d898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a9081908401838280828437600081840152601f19601f820116905080830192505050505050508e610693565b905061066881610b4a565b61067581604001516110bb565b925061068481606001516110bb565b91505097509795505050505050565b61069b613ef1565b6000846000815181106106aa57fe5b602001015160f81c60f81b60f81c90506000856001815181106106c957fe5b602001015160f81c60f81b60f81c90506000866002815181106106e857fe5b016020015160f81c9050600360606004840160ff166001600160401b038111801561071257600080fd5b5060405190808252806020026020018201604052801561074c57816020015b610739613fab565b8152602001906001900390816107315790505b50905060608360040160ff166001600160401b038111801561076d57600080fd5b506040519080825280602002602001820160405280156107a757816020015b610794613fab565b81526020019060019003908161078c5790505b50905060005b8560ff168110156107e3576107c28b856113c4565b8483815181106107ce57fe5b602090810291909101015293506001016107ad565b5060005b8460ff1681101561081d576107fc8b856113c4565b83838151811061080857fe5b602090810291909101015293506001016107e7565b50610826613fe8565b6108308b85611586565b809250819550505060008b858151811061084657fe5b01602001516001959095019460f81c905061085f613ef1565b6001600160a01b038b35811682526020808d0135909116908201526040810183905261088a83611626565b6060820152608081018f90528d3560a08201526020808f013560c0830152600060e0830181905260408051808201825260ff8c811682528185018a905261010086019190915281518083019092528a8116825292810187905261012084015283821660018114610140850152918b1661016084015261018083018f90526101c083018e90526101e08301526101a08201879052158061092c57508160ff166001145b6040518060400160405280600b81526020016a04241445f494d4d5f5459560ac1b815250906109d95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561099e578181015183820152602001610986565b50505050905090810190601f1680156109cb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506109e2613fab565b60ff8316610a03576109fc8a83604001516000015161168f565b9050610aa3565b6000865111604051806040016040528060068152602001654e4f5f494d4d60d01b81525090610a735760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b50610aa08a8360400151600001518860018d0360ff1681518110610a9357fe5b60200260200101516116f3565b90505b610aac81611779565b60408301515260005b838a0360ff16811015610af457610aec878281518110610ad157fe5b602002602001015184604001516118e690919063ffffffff16565b600101610ab5565b5060005b8860ff16811015610b3557610b2d868281518110610b1257fe5b6020026020010151846040015161190090919063ffffffff16565b600101610af8565b50909f9e505050505050505050505050505050565b6000806000614046610b6385610160015160ff1661191a565b93509350935093506000841180610b7d5750846101400151155b8015610b8f5750610100850151518410155b80610bb757508461014001518015610ba5575083155b8015610bb75750610100850151516001145b6040518060400160405280600a815260200169535441434b5f4d414e5960b01b81525090610c265760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b50610120850151516040805180820190915260088152674155585f4d414e5960c01b602082015290841015610c9c5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b5061010085015151841115610d5a57610cbb610cb6611a2a565b611779565b610ccc866060015160200151611779565b146040518060400160405280600d81526020016c535441434b5f4d495353494e4760981b81525090610d3f5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b50610d4b856005611a71565b50610d5585611ae6565b610e1a565b61012085015151831115610df557610d73610cb6611a2a565b610d84866060015160400151611779565b146040518060400160405280600b81526020016a4155585f4d495353494e4760a81b81525090610d3f5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b610dff8583611a71565b15610e0d57610d5585611ae6565b610e1a858263ffffffff16565b846101e0015115610ebf5760408051600160f81b6020808301919091526000602183018190526022808401919091528351808403909101815260429092019092528051910120606086015160c001511415610e8157610e7c8560600151611af1565b610ebf565b60006101e0860152606085015160c081015190526101408501518015610ea5575083155b610eb457610100850151600090525b610120850151600090525b60005b61010086015151811015610f0b57610f03866101000151602001518281518110610ee857fe5b602002602001015187606001516118e690919063ffffffff16565b600101610ec2565b5060005b61012086015151811015610f5857610f50866101200151602001518281518110610f3557fe5b6020026020010151876060015161190090919063ffffffff16565b600101610f0f565b505050505050565b600080610f6b613ed3565b8360e0015184608001516040518060800160405280610f8d8860400151611afb565b8152602001610f9f8860600151611afb565b81526020018760a0015181526020018760c001518152509250925092509193909250565b610fcb613f83565b606061100a8384600081518110610fde57fe5b602001015160f81c60f81b85600181518110610ff657fe5b01602001516001600160f81b031916611bbf565b90506060611037848560018151811061101f57fe5b602001015160f81c60f81b86600281518110610ff657fe5b90506060611064858660028151811061104c57fe5b602001015160f81c60f81b87600381518110610ff657fe5b90506060611091868760038151811061107957fe5b602001015160f81c60f81b88600481518110610ff657fe5b6040805160808101825295865260208601949094529284019190915250606082015290505b919050565b60606110ca8260000151611c5c565b6110df6110da8460200151611779565b611c5c565b6110ef6110da8560400151611779565b6110ff6110da8660600151611779565b61110f6110da8760800151611779565b61111c8760a00151611d2b565b6111298860c00151611c5c565b60405160200180806709ac2c6d0d2dcca560c31b81525060080188805190602001908083835b6020831061116e5780518252601f19909201916020918201910161114f565b51815160209384036101000a60001901801990921691161790526216100560e91b9190930190815289516003909101928a0191508083835b602083106111c55780518252601f1990920191602091820191016111a6565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528851600390910192890191508083835b6020831061121c5780518252601f1990920191602091820191016111fd565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528751600390910192880191508083835b602083106112735780518252601f199092019160209182019101611254565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528651600390910192870191508083835b602083106112ca5780518252601f1990920191602091820191016112ab565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528551600390910192860191508083835b602083106113215780518252601f199092019160209182019101611302565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528451600390910192850191508083835b602083106113785780518252601f199092019160209182019101611359565b5181516020939093036101000a600019018019909116921691909117905261148560f11b92019182525060408051808303601d19018152600290920190529a9950505050505050505050565b60006113ce613fab565b83518310611414576040805162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a59081bd9999cd95d60921b604482015290519081900360640190fd5b6000806114218686611e05565b9150915061142d611e2c565b60ff168160ff1614156114615760006114468784611e31565b90935090508261145582611ea5565b9450945050505061157f565b611469611f65565b60ff168160ff16141561148b576114808683611f6a565b93509350505061157f565b61149361200c565b60ff168160ff1614156114bb5760006114ac8784611e31565b90935090508261145582612011565b6114c36120fd565b60ff168160ff1614156114da576114808683612102565b6114e2612197565b60ff168160ff161015801561150357506114fa61219c565b60ff168160ff16105b1561153f576000611512612197565b8203905060606115238289866121a1565b90945090508361153282612249565b955095505050505061157f565b6040805162461bcd60e51b815260206004820152601060248201526f696e76616c69642074797065636f646560801b604482015290519081900360640190fd5b9250929050565b6000611590613fe8565b611598613fe8565b600060e08201819052806115ac8787611e31565b90965091506115bb8787612102565b602085015295506115cc8787612102565b604085015295506115dd87876113c4565b606085015295506115ee87876113c4565b608085015295506115ff8787611e31565b60a085015295506116108787611e31565b92845260c0840192909252509590945092505050565b61162e613fe8565b60405180610100016040528083600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020018360a0015181526020018360c0015181526020018360e001518152509050919050565b611697613fab565b6040805160608101825260ff8516815260208082018590528251600080825291810184526116ea938301916116e2565b6116cf613fab565b8152602001906001900390816116c75790505b50905261238a565b90505b92915050565b6116fb613fab565b604080516001808252818301909252606091816020015b61171a613fab565b815260200190600190039081611712579050509050828160008151811061173d57fe5b602002602001018190525061176e60405180606001604052808760ff1681526020018681526020018381525061238a565b9150505b9392505050565b6000611783611e2c565b60ff16826080015160ff1614156117a657815161179f9061241a565b90506110b6565b6117ae611f65565b60ff16826080015160ff1614156117cc5761179f826020015161243e565b6117d46120fd565b60ff16826080015160ff1614156117f657815160a083015161179f919061253b565b6117fe612197565b60ff16826080015160ff16141561183757611817613fab565b611824836040015161258c565b905061182f81611779565b9150506110b6565b61183f612704565b60ff16826080015160ff161415611858575080516110b6565b61186061200c565b60ff16826080015160ff1614156118a5575060608082015160408051607b602080830191909152818301939093528151808203830181529301905281519101206110b6565b6040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207479706520636f646560781b604482015290519081900360640190fd5b6118f4826020015182612709565b82602001819052505050565b61190e826040015182612709565b82604001819052505050565b6000808061404660a185141561193f57506002925060009150600a90506127876105c7565b60a285141561195d57506002925060009150600a905061283e6105c7565b60a385141561197b57506002925060009150600a90506128d26105c7565b60a485141561199957506003925060009150606490506129666105c7565b60a58514156119b75750600392506000915060649050612a576105c7565b60a68514156119d55750600392506000915060649050612b2b6105c7565b60708514156119f35750600292506000915060649050612bed6105c7565b60405162461bcd60e51b815260040180806020018281038252602c815260200180614082602c913960400191505060405180910390fd5b611a32613fab565b60408051600080825260208201909252611a6c91611a66565b611a53613fab565b815260200190600190039081611a4b5790505b50612249565b905090565b6000816001600160401b0316836060015160a001511015611ab6575060e0820180516005016001600160401b03169052606082015160001960a09091015260016116ed565b5060e0820180516001600160401b039083018116909152606083015160a0018051918316909103905260006116ed565b60016101e090910152565b600160e090910152565b600060028260e001511415611b12575060006110b6565b60018260e001511415611b27575060016110b6565b81516020830151611b3790611779565b611b448460400151611779565b611b518560600151611779565b611b5e8660800151611779565b8660a001518760c00151604051602001808881526020018781526020018681526020018581526020018481526020018381526020018281526020019750505050505050506040516020818303038152906040528051906020012090506110b6565b606060f883811c9083901c81900360ff169082826001600160401b0381118015611be857600080fd5b50604051908082528060200260200182016040528015611c12578160200160208202803683370190505b50905060005b83811015611c5157611c2f88828501602002612d89565b60001b828281518110611c3e57fe5b6020908102919091010152600101611c18565b509695505050505050565b60408051818152606081810183529182919060208201818036833701905050905060005b6020811015611d24576000848260208110611c9757fe5b1a60f881811b9250601080830480831b9360ff9091169091029003901b611cbd82612dc9565b858560020281518110611ccc57fe5b60200101906001600160f81b031916908160001a905350611cec81612dc9565b858560020260010181518110611cfe57fe5b60200101906001600160f81b031916908160001a9053505060019092019150611c809050565b5092915050565b60608180611d525750506040805180820190915260018152600360fc1b60208201526110b6565b8060005b8115611d6a57600101600a82049150611d56565b6060816001600160401b0381118015611d8257600080fd5b506040519080825280601f01601f191660200182016040528015611dad576020820181803683370190505b50905060001982015b8415611dfb57600a850660300160f81b82828060019003935081518110611dd957fe5b60200101906001600160f81b031916908160001a905350600a85049450611db6565b5095945050505050565b60008082600101848481518110611e1857fe5b016020015190925060f81c90509250929050565b600090565b60008082845110158015611e49575060208385510310155b611e86576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301611e9a858563ffffffff612dfa16565b915091509250929050565b611ead613fab565b6040805160c0810182528381528151606081018352600080825260208083018290528451828152808201865293949085019390830191611f03565b611ef0613fab565b815260200190600190039081611ee85790505b50905281526020016000604051908082528060200260200182016040528015611f4657816020015b611f33613fab565b815260200190600190039081611f2b5790505b5081526000602082018190526040820152600160609091015292915050565b600190565b6000611f74613fab565b82600080611f80613fab565b6000611f8c8986611e05565b9095509350611f9b8986611e05565b9095509250600160ff85161415611fbc57611fb689866113c4565b90955091505b611fc68986612e53565b9095509050600160ff85161415611ff15784611fe38483856116f3565b96509650505050505061157f565b84611ffc848361168f565b9650965050505050509250929050565b600c90565b612019613fab565b6040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b038111801561206057600080fd5b5060405190808252806020026020018201604052801561209a57816020015b612087613fab565b81526020019060019003908161207f5790505b509052815260200160006040519080825280602002602001820160405280156120dd57816020015b6120ca613fab565b8152602001906001900390816120c25790505b50815260208101849052600c604082015260016060909101529050919050565b600290565b600061210c613fab565b82845110158015612121575060408385510310155b61215e576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60008061216b8686612e53565b909450915061217a8685611e31565b90945090508361218a8383612e6a565b9350935050509250929050565b600390565b600d90565b60006060828160ff87166001600160401b03811180156121c057600080fd5b506040519080825280602002602001820160405280156121fa57816020015b6121e7613fab565b8152602001906001900390816121df5790505b50905060005b8760ff168160ff16101561223c5761221887846113c4565b838360ff168151811061222757fe5b60209081029190910101529250600101612200565b5090969095509350505050565b612251613fab565b61225b8251612f29565b6122ac576040805162461bcd60e51b815260206004820152601a60248201527f5475706c65206d75737420686176652076616c69642073697a65000000000000604482015290519081900360640190fd5b600160005b83518110156122e3578381815181106122c657fe5b602002602001015160a001518201915080806001019150506122b1565b506040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b038111801561232b57600080fd5b5060405190808252806020026020018201604052801561236557816020015b612352613fab565b81526020019060019003908161234a5790505b5090528152602081019490945260006040850152600360608501526080909301525090565b612392613fab565b6040518060c001604052806000815260200183815260200160006001600160401b03811180156123c157600080fd5b506040519080825280602002602001820160405280156123fb57816020015b6123e8613fab565b8152602001906001900390816123e05790505b5081526000602082015260016040820181905260609091015292915050565b60408051602080820193909352815180820384018152908201909152805191012090565b600060028260400151511061244f57fe5b6040820151516124b457612461611f65565b8251602080850151604080516001600160f81b031960f896871b8116828601529490951b9093166021850152602280850191909152825180850390910181526042909301909152815191012090506110b6565b6124bc611f65565b82600001516124e284604001516000815181106124d557fe5b6020026020010151611779565b8460200151604051602001808560ff1660ff1660f81b81526001018460ff1660ff1660f81b8152600101838152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b6000612545612197565b8383604051602001808460ff1660ff1660f81b8152600101838152602001828152602001935050505060405160208183030381529060405280519060200120905092915050565b612594613fab565b6008825111156125e2576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e8eae0d8ca40d8cadccee8d60631b604482015290519081900360640190fd5b606082516001600160401b03811180156125fb57600080fd5b50604051908082528060200260200182016040528015612625578160200160208202803683370190505b508051909150600160005b82811015612688576126478682815181106124d557fe5b84828151811061265357fe5b60200260200101818152505085818151811061266b57fe5b602002602001015160a00151820191508080600101915050612630565b506000835184604051602001808360ff1660ff1660f81b8152600101828051906020019060200280838360005b838110156126cd5781810151838201526020016126b5565b50505050905001925050506040516020818303038152906040528051906020012090506126fa8183612e6a565b9695505050505050565b606490565b612711613fab565b6040805160028082526060828101909352816020015b61272f613fab565b815260200190600190039081612727579050509050828160008151811061275257fe5b6020026020010181905250838160018151811061276b57fe5b602002602001018190525061277f8161258c565b949350505050565b61278f613fab565b61279d826101000151612f30565b90506127a7613fab565b6127b5836101000151612f30565b90506127c082612f72565b15806127d257506127d081612f90565b155b156127e7576127e083612f9d565b505061283b565b8151600160401b116127fc576127e083612f9d565b600061281e82606001518460000151612819876101c00151610fc3565b612fa6565b905061283784610100015161283283611ea5565b612fc8565b5050505b50565b612846613fab565b612854826101000151612f30565b905061285e613fab565b61286c836101000151612f30565b905061287782612f72565b1580612889575061288781612f90565b155b15612897576127e083612f9d565b815167fffffffffffffff9116128b0576127e083612f9d565b600061281e826060015184600001516128cd876101c00151610fc3565b612ff2565b6128da613fab565b6128e8826101000151612f30565b90506128f2613fab565b612900836101000151612f30565b905061290b82612f72565b158061291d575061291b81612f90565b155b1561292b576127e083612f9d565b815167ffffffffffffffe111612944576127e083612f9d565b600061281e82606001518460000151612961876101c00151610fc3565b613152565b61296e613fab565b61297c826101000151612f30565b9050612986613fab565b612994836101000151612f30565b905061299e613fab565b6129ac846101000151612f30565b90506129b783612f72565b15806129c957506129c782613286565b155b806129da57506129d881612f90565b155b156129f0576129e884612f9d565b50505061283b565b8251600160401b111580612a075750815161010011155b15612a15576129e884612f9d565b6000612a3c826060015185600001518560000151612a37896101c00151610fc3565b613291565b9050612a5085610100015161283283612011565b5050505050565b612a5f613fab565b612a6d826101000151612f30565b9050612a77613fab565b612a85836101000151612f30565b9050612a8f613fab565b612a9d846101000151612f30565b9050612aa883612f72565b1580612aba5750612ab882613286565b155b80612acb5750612ac981612f90565b155b15612ad9576129e884612f9d565b825167fffffffffffffff9111580612af657508151600160401b11155b15612b04576129e884612f9d565b6000612a3c826060015185600001518560000151612b26896101c00151610fc3565b6132da565b612b33613fab565b612b41826101000151612f30565b9050612b4b613fab565b612b59836101000151612f30565b9050612b63613fab565b612b71846101000151612f30565b9050612b7c83612f72565b1580612b8e5750612b8c82613286565b155b80612b9f5750612b9d81612f90565b155b15612bad576129e884612f9d565b825167ffffffffffffffe111612bc6576129e884612f9d565b6000612a3c826060015185600001518560000151612be8896101c00151610fc3565b613423565b612bf5613fab565b612c03826101000151612f30565b9050612c0d613fab565b612c1b836101000151612f30565b9050612c2682612f72565b1580612c385750612c3681612f90565b155b15612c46576127e083612f9d565b81516127101080612c5657508151155b15612c64576127e083612f9d565b82610180015151836101a001511415612cdf57612c9781606001518360000151612c92866101c00151610fc3565b6134f5565b15612cd6576040805162461bcd60e51b815260206004820152600a602482015269084aa8cbe988a9c8ea8960b31b604482015290519081900360640190fd5b6127e083612f9d565b6101a083015182516101808501516000612cfa828585613549565b905080612d0686611779565b14612d45576040805162461bcd60e51b815260206004820152600a60248201526915d493d391d7d4d1539160b21b604482015290519081900360640190fd5b5090910160209081019190912060a0850180516040805180860192909252818101939093528251808203840181526060909101909252815191909201209052505050565b600080805b6020811015612dc157600882901b91508481850181518110612dac57fe5b016020015160f81c9190911790600101612d8e565b509392505050565b6000600a60f883901c1015612de9578160f81c60300160f81b90506110b6565b8160f81c60570160f81b90506110b6565b60008160200183511015612e4a576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b60008060208301611e9a858563ffffffff612dfa16565b612e72613fab565b6040805160c0810182528481528151606081018352600080825260208083018290528451828152808201865293949085019390830191612ec8565b612eb5613fab565b815260200190600190039081612ead5790505b50905281526020016000604051908082528060200260200182016040528015612f0b57816020015b612ef8613fab565b815260200190600190039081612ef05790505b50815260006020820152600260408201526060019290925250919050565b6008101590565b612f38613fab565b612f40613fab565b8260200151600184600001510381518110612f5757fe5b60209081029190910101518351600019018452915050919050565b608081015160009060ff161580156116ed57505051600160401b1190565b6080015160ff16600c1490565b61283b81611ae6565b600061277f612fbe856020865b048560000151613572565b6020855b066136e0565b808260200151836000015181518110612fdd57fe5b60209081029190910101525080516001019052565b60408051600880825281830190925260009160609190602082018180368337019050509050600061302c866020875b048660000151613572565b905060208086066008011115613100576000613054876020885b046001018760400151613572565b905060005b6018601f8816600803018110156130a85761307a838260208a5b06016136e0565b60f81b84828151811061308957fe5b60200101906001600160f81b031916908160001a905350600101613059565b506018601f8716600803015b60088110156130f9576130cb826020898401612fc2565b60f81b8482815181106130da57fe5b60200101906001600160f81b031916908160001a9053506001016130b4565b5050613149565b60005b6008811015613147576131198282602089613073565b60f81b83828151811061312857fe5b60200101906001600160f81b031916908160001a905350600101613103565b505b6126fa826136ed565b60408051602080825281830190925260009160609190602082018180368337019050509050600061318586602087613021565b90506020808606602001111561323f5760006131a387602088613046565b905060005b601f87166020038110156131f1576131c3838260208a613073565b60f81b8482815181106131d257fe5b60200101906001600160f81b031916908160001a9053506001016131a8565b50601f86166020035b60208110156130f957613211826020898401612fc2565b60f81b84828151811061322057fe5b60200101906001600160f81b031916908160001a9053506001016131fa565b60005b6020811015613147576132588282602089613073565b60f81b83828151811061326757fe5b60200101906001600160f81b031916908160001a905350600101613242565b6080015160ff161590565b6000806132a086602087612fb3565b905060006132b2826020880687613723565b905060006132ce88602089048488600001518960200151613762565b98975050505050505050565b600060606132e784613802565b905060006132f787602088613021565b9050602080870660080111156133d95760005b6018601f881660080301811015613352576133488260208984010685846018018151811061333457fe5b01602001516001600160f81b03191661386c565b915060010161330a565b5061336c876020885b048387600001518860200151613762565b9650600061337c88602089613046565b90506018601f8816600803015b60088110156133b5576133ab8260208a84010686846018018151811061333457fe5b9150600101613389565b506133d188602089046001018388604001518960600151613762565b975050613418565b60005b6008811015613408576133fe828260208a060185846018018151811061333457fe5b91506001016133dc565b506134158760208861335b565b96505b509495945050505050565b6000606061343084613802565b9050600061344087602088613021565b9050602080870660200111156134d25760005b601f871660200381101561348257613478828260208a5b060185848151811061333457fe5b9150600101613453565b5061348f8760208861335b565b9650600061349f88602089613046565b9050601f87166020035b60208110156133b5576134c88260208a84010686848151811061333457fe5b91506001016134a9565b60005b6020811015613408576134eb828260208a61346a565b91506001016134d5565b60008061350485602086612fb3565b9050601f84165b60208110156135365761351e82826136e0565b1561352e57600092505050611772565b60010161350b565b5061176e85602086048560000151613888565b600080613564858486018661355d87613a04565b6001613a2f565b50905061176e607b82613b07565b60008151600014156135db57613588600061241a565b84146135d3576040805162461bcd60e51b815260206004820152601560248201527432bc3832b1ba32b21032b6b83a3c90313ab33332b960591b604482015290519081900360640190fd5b506000611772565b60006135fa836000815181106135ed57fe5b602002602001015161241a565b905060015b83518110156136645784600116600114156136385761363184828151811061362357fe5b602002602001015183613b07565b9150613658565b6136558285838151811061364857fe5b6020026020010151613b07565b91505b600194851c94016135ff565b508481146136b1576040805162461bcd60e51b8152602060048201526015602482015274195e1c1958dd19590818dbdc9c9958dd081c9bdbdd605a1b604482015290519081900360640190fd5b83156136c1575060009050611772565b826000815181106136ce57fe5b60200260200101519150509392505050565b601f036008021c60ff1690565b600080805b8351811015611d2457600882901b915083818151811061370e57fe5b016020015160f81c91909117906001016136f2565b6000606061373085613802565b90508260f81b81858151811061374257fe5b60200101906001600160f81b031916908160001a90535061176e816136ed565b600081516003146137b4576040805162461bcd60e51b81526020600482015260176024820152762120a22fa727a926a0a624ad20aa24a7a72fa82927a7a360491b604482015290519081900360640190fd5b6126fa86868686866000815181106137c857fe5b602002602001015160001c876001815181106137e057fe5b6020026020010151886002815181106137f557fe5b6020026020010151613b33565b6040805160208082528183019092526060918391839160208201818036833701905050905060005b6020811015612dc1578260f81b8282601f038151811061384657fe5b60200101906001600160f81b031916908160001a90535060089290921c9160010161382a565b6000606061387985613802565b90508281858151811061374257fe5b60008151600014156138f15761389e600061241a565b84146138e9576040805162461bcd60e51b815260206004820152601560248201527432bc3832b1ba32b21032b6b83a3c90313ab33332b960591b604482015290519081900360640190fd5b506001611772565b6000613903836000815181106135ed57fe5b905060016060613911613dad565b905060015b85518110156139a557866001166001141561394f5761394886828151811061393a57fe5b602002602001015185613b07565b9350613999565b61395f8487838151811061364857fe5b9350828015613996575081600182038151811061397857fe5b602002602001015186828151811061398c57fe5b6020026020010151145b92505b600196871c9601613916565b508683146139f2576040805162461bcd60e51b8152602060048201526015602482015274195e1c1958dd19590818dbdc9c9958dd081c9bdbdd605a1b604482015290519081900360640190fd5b8515611dfb5760019350505050611772565b600060018211613a16575060016110b6565b613a2560026001840104613a04565b60020290506110b6565b60008060208411613a8357858510613a5657613a4b600061241a565b600191509150613afd565b6000613a6b613a6689888a613e4e565b61241a565b905080613a78600061241a565b909350149050613afd565b600080613a9d8989600289048a0160028a5b046000613a2f565b91509150808015613aab5750845b15613acb57613ac089898960028a0489613a2f565b935093505050613afd565b600080613adc8b8b8b60028c613a95565b91509150613aea8285613b07565b818015613af45750835b95509550505050505b9550959350505050565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600080613b3f8761241a565b9050613b4c898988613572565b506060613b57613dad565b905060018751036001901b8910613c1b5787613b77578992505050613da2565b6000613b828a613ead565b88519091505b60018203811015613bb057613ba68c84600184038151811061364857fe5b9b50600101613b88565b5060015b60018203811015613c06578a60011660011415613be457613bdd83600183038151811061393a57fe5b9350613bfa565b613bf78484600184038151811061364857fe5b93505b60019a8b1c9a01613bb4565b50613c118b84613b07565b9350505050613da2565b60015b8751811015613c9b5760008a600116600114613c3a5783613c4f565b888281518110613c4657fe5b60200260200101515b905060008b600116600114613c7757898381518110613c6a57fe5b6020026020010151613c79565b845b9050613c858282613b07565b60019c8d1c9c909550929092019150613c1e9050565b508715613caa57509050613da2565b600086613cb8575084613d2d565b818781518110613cc457fe5b6020026020010151851415613d20576040805162461bcd60e51b815260206004820152601c60248201527f726967687420737562747265652063616e6e6f74206265207a65726f00000000604482015290519081900360640190fd5b613d2a8686613b07565b90505b80875b60018a5103811015613d5657613d4c8285838151811061364857fe5b9150600101613d30565b50838114613d9c576040805162461bcd60e51b815260206004820152600e60248201526d0caf0e0cac6e8cac840dac2e8c6d60931b604482015290519081900360640190fd5b50925050505b979650505050505050565b60408051818152610820810182526060918291906020820161080080368337019050509050613ddc600061241a565b81600081518110613de957fe5b602090810291909101015260015b6040811015613e4857613e29826001830381518110613e1257fe5b602002602001015183600184038151811061364857fe5b828281518110613e3557fe5b6020908102919091010152600101613df7565b50905090565b600080805b6020811015613ea457600882901b915060008186018511613e75576000613e93565b8682870181518110613e8357fe5b01602001516001600160f81b0319165b60f81c929092179150600101613e53565b50949350505050565b600081613ebc575060016110b6565b613ec9600183901c613ead565b60010190506110b6565b60405180608001604052806004906020820280368337509192915050565b604080516102008101825260008082526020820152908101613f11613fe8565b8152602001613f1e613fe8565b81526000602082018190526040820181905260608201819052608082015260a001613f47614048565b8152602001613f54614048565b81526000602082018190526040820181905260608083018190526080830182905260a083015260c09091015290565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b6040518060c0016040528060008152602001613fc5614062565b815260606020820181905260006040830181905290820181905260809091015290565b6040805161010081019091526000815260208101614004613fab565b8152602001614011613fab565b815260200161401e613fab565b815260200161402b613fab565b81526000602082018190526040820181905260609091015290565bfe5b604051806040016040528060008152602001606081525090565b604080516060808201835260008083526020830152918101919091529056fe75736520616e6f7468657220636f6e747261637420746f2068616e646c65206f74686572206f70636f646573a2646970667358221220736f8cdda3e321bbc50bdfc0fadfe70f5bdda4c7efa77340b5f022c400e078ab64736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b506140e3806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806347dda1d614610046578063793deea314610162578063eba67f6e14610329575b600080fd5b610112600480360360e081101561005c57600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561008457600080fd5b82018360208201111561009657600080fd5b803590602001918460018302840111600160201b831117156100b757600080fd5b919390929091602081019035600160201b8111156100d457600080fd5b8201836020820111156100e657600080fd5b803590602001918460018302840111600160201b8311171561010757600080fd5b5090925090506104d3565b604080516001600160401b03851681526020810184905290810182608080838360005b8381101561014d578181015183820152602001610135565b50505050905001935050505060405180910390f35b6102066004803603602081101561017857600080fd5b810190602081018135600160201b81111561019257600080fd5b8201836020820111156101a457600080fd5b803590602001918460018302840111600160201b831117156101c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610592945050505050565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b8381101561025257818101518382015260200161023a565b50505050905001858103845288818151815260200191508051906020019060200280838360005b83811015610291578181015183820152602001610279565b50505050905001858103835287818151815260200191508051906020019060200280838360005b838110156102d05781810151838201526020016102b8565b50505050905001858103825286818151815260200191508051906020019060200280838360005b8381101561030f5781810151838201526020016102f7565b505050509050019850505050505050505060405180910390f35b6103f5600480360360e081101561033f57600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561036757600080fd5b82018360208201111561037957600080fd5b803590602001918460018302840111600160201b8311171561039a57600080fd5b919390929091602081019035600160201b8111156103b757600080fd5b8201836020820111156103c957600080fd5b803590602001918460018302840111600160201b831117156103ea57600080fd5b5090925090506105ce565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561043657818101518382015260200161041e565b50505050905090810190601f1680156104635780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561049657818101518382015260200161047e565b50505050905090810190601f1680156104c35780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b6000806104de613ed3565b6104e6613ef1565b61056a8a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600081840152601f19601f820116905080830192505050505050508f610693565b905061057581610b4a565b61057e81610f60565b935093509350509750975097945050505050565b6060806060806105a0613f83565b6105a986610fc3565b80516020820151604083015160609093015191975095509093509150505b9193509193565b6060806105d9613ef1565b61065d898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a9081908401838280828437600081840152601f19601f820116905080830192505050505050508e610693565b905061066881610b4a565b61067581604001516110bb565b925061068481606001516110bb565b91505097509795505050505050565b61069b613ef1565b6000846000815181106106aa57fe5b602001015160f81c60f81b60f81c90506000856001815181106106c957fe5b602001015160f81c60f81b60f81c90506000866002815181106106e857fe5b016020015160f81c9050600360606004840160ff166001600160401b038111801561071257600080fd5b5060405190808252806020026020018201604052801561074c57816020015b610739613fab565b8152602001906001900390816107315790505b50905060608360040160ff166001600160401b038111801561076d57600080fd5b506040519080825280602002602001820160405280156107a757816020015b610794613fab565b81526020019060019003908161078c5790505b50905060005b8560ff168110156107e3576107c28b856113c4565b8483815181106107ce57fe5b602090810291909101015293506001016107ad565b5060005b8460ff1681101561081d576107fc8b856113c4565b83838151811061080857fe5b602090810291909101015293506001016107e7565b50610826613fe8565b6108308b85611586565b809250819550505060008b858151811061084657fe5b01602001516001959095019460f81c905061085f613ef1565b6001600160a01b038b35811682526020808d0135909116908201526040810183905261088a83611626565b6060820152608081018f90528d3560a08201526020808f013560c0830152600060e0830181905260408051808201825260ff8c811682528185018a905261010086019190915281518083019092528a8116825292810187905261012084015283821660018114610140850152918b1661016084015261018083018f90526101c083018e90526101e08301526101a08201879052158061092c57508160ff166001145b6040518060400160405280600b81526020016a04241445f494d4d5f5459560ac1b815250906109d95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561099e578181015183820152602001610986565b50505050905090810190601f1680156109cb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506109e2613fab565b60ff8316610a03576109fc8a83604001516000015161168f565b9050610aa3565b6000865111604051806040016040528060068152602001654e4f5f494d4d60d01b81525090610a735760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b50610aa08a8360400151600001518860018d0360ff1681518110610a9357fe5b60200260200101516116f3565b90505b610aac81611779565b60408301515260005b838a0360ff16811015610af457610aec878281518110610ad157fe5b602002602001015184604001516118e690919063ffffffff16565b600101610ab5565b5060005b8860ff16811015610b3557610b2d868281518110610b1257fe5b6020026020010151846040015161190090919063ffffffff16565b600101610af8565b50909f9e505050505050505050505050505050565b6000806000614046610b6385610160015160ff1661191a565b93509350935093506000841180610b7d5750846101400151155b8015610b8f5750610100850151518410155b80610bb757508461014001518015610ba5575083155b8015610bb75750610100850151516001145b6040518060400160405280600a815260200169535441434b5f4d414e5960b01b81525090610c265760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b50610120850151516040805180820190915260088152674155585f4d414e5960c01b602082015290841015610c9c5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b5061010085015151841115610d5a57610cbb610cb6611a2a565b611779565b610ccc866060015160200151611779565b146040518060400160405280600d81526020016c535441434b5f4d495353494e4760981b81525090610d3f5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b50610d4b856005611a71565b50610d5585611ae6565b610e1a565b61012085015151831115610df557610d73610cb6611a2a565b610d84866060015160400151611779565b146040518060400160405280600b81526020016a4155585f4d495353494e4760a81b81525090610d3f5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561099e578181015183820152602001610986565b610dff8583611a71565b15610e0d57610d5585611ae6565b610e1a858263ffffffff16565b846101e0015115610ebf5760408051600160f81b6020808301919091526000602183018190526022808401919091528351808403909101815260429092019092528051910120606086015160c001511415610e8157610e7c8560600151611af1565b610ebf565b60006101e0860152606085015160c081015190526101408501518015610ea5575083155b610eb457610100850151600090525b610120850151600090525b60005b61010086015151811015610f0b57610f03866101000151602001518281518110610ee857fe5b602002602001015187606001516118e690919063ffffffff16565b600101610ec2565b5060005b61012086015151811015610f5857610f50866101200151602001518281518110610f3557fe5b6020026020010151876060015161190090919063ffffffff16565b600101610f0f565b505050505050565b600080610f6b613ed3565b8360e0015184608001516040518060800160405280610f8d8860400151611afb565b8152602001610f9f8860600151611afb565b81526020018760a0015181526020018760c001518152509250925092509193909250565b610fcb613f83565b606061100a8384600081518110610fde57fe5b602001015160f81c60f81b85600181518110610ff657fe5b01602001516001600160f81b031916611bbf565b90506060611037848560018151811061101f57fe5b602001015160f81c60f81b86600281518110610ff657fe5b90506060611064858660028151811061104c57fe5b602001015160f81c60f81b87600381518110610ff657fe5b90506060611091868760038151811061107957fe5b602001015160f81c60f81b88600481518110610ff657fe5b6040805160808101825295865260208601949094529284019190915250606082015290505b919050565b60606110ca8260000151611c5c565b6110df6110da8460200151611779565b611c5c565b6110ef6110da8560400151611779565b6110ff6110da8660600151611779565b61110f6110da8760800151611779565b61111c8760a00151611d2b565b6111298860c00151611c5c565b60405160200180806709ac2c6d0d2dcca560c31b81525060080188805190602001908083835b6020831061116e5780518252601f19909201916020918201910161114f565b51815160209384036101000a60001901801990921691161790526216100560e91b9190930190815289516003909101928a0191508083835b602083106111c55780518252601f1990920191602091820191016111a6565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528851600390910192890191508083835b6020831061121c5780518252601f1990920191602091820191016111fd565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528751600390910192880191508083835b602083106112735780518252601f199092019160209182019101611254565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528651600390910192870191508083835b602083106112ca5780518252601f1990920191602091820191016112ab565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528551600390910192860191508083835b602083106113215780518252601f199092019160209182019101611302565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528451600390910192850191508083835b602083106113785780518252601f199092019160209182019101611359565b5181516020939093036101000a600019018019909116921691909117905261148560f11b92019182525060408051808303601d19018152600290920190529a9950505050505050505050565b60006113ce613fab565b83518310611414576040805162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a59081bd9999cd95d60921b604482015290519081900360640190fd5b6000806114218686611e05565b9150915061142d611e2c565b60ff168160ff1614156114615760006114468784611e31565b90935090508261145582611ea5565b9450945050505061157f565b611469611f65565b60ff168160ff16141561148b576114808683611f6a565b93509350505061157f565b61149361200c565b60ff168160ff1614156114bb5760006114ac8784611e31565b90935090508261145582612011565b6114c36120fd565b60ff168160ff1614156114da576114808683612102565b6114e2612197565b60ff168160ff161015801561150357506114fa61219c565b60ff168160ff16105b1561153f576000611512612197565b8203905060606115238289866121a1565b90945090508361153282612249565b955095505050505061157f565b6040805162461bcd60e51b815260206004820152601060248201526f696e76616c69642074797065636f646560801b604482015290519081900360640190fd5b9250929050565b6000611590613fe8565b611598613fe8565b600060e08201819052806115ac8787611e31565b90965091506115bb8787612102565b602085015295506115cc8787612102565b604085015295506115dd87876113c4565b606085015295506115ee87876113c4565b608085015295506115ff8787611e31565b60a085015295506116108787611e31565b92845260c0840192909252509590945092505050565b61162e613fe8565b60405180610100016040528083600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020018360a0015181526020018360c0015181526020018360e001518152509050919050565b611697613fab565b6040805160608101825260ff8516815260208082018590528251600080825291810184526116ea938301916116e2565b6116cf613fab565b8152602001906001900390816116c75790505b50905261238a565b90505b92915050565b6116fb613fab565b604080516001808252818301909252606091816020015b61171a613fab565b815260200190600190039081611712579050509050828160008151811061173d57fe5b602002602001018190525061176e60405180606001604052808760ff1681526020018681526020018381525061238a565b9150505b9392505050565b6000611783611e2c565b60ff16826080015160ff1614156117a657815161179f9061241a565b90506110b6565b6117ae611f65565b60ff16826080015160ff1614156117cc5761179f826020015161243e565b6117d46120fd565b60ff16826080015160ff1614156117f657815160a083015161179f919061253b565b6117fe612197565b60ff16826080015160ff16141561183757611817613fab565b611824836040015161258c565b905061182f81611779565b9150506110b6565b61183f612704565b60ff16826080015160ff161415611858575080516110b6565b61186061200c565b60ff16826080015160ff1614156118a5575060608082015160408051607b602080830191909152818301939093528151808203830181529301905281519101206110b6565b6040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207479706520636f646560781b604482015290519081900360640190fd5b6118f4826020015182612709565b82602001819052505050565b61190e826040015182612709565b82604001819052505050565b6000808061404660a185141561193f57506002925060009150600a90506127876105c7565b60a285141561195d57506002925060009150600a905061283e6105c7565b60a385141561197b57506002925060009150600a90506128d26105c7565b60a485141561199957506003925060009150606490506129666105c7565b60a58514156119b75750600392506000915060649050612a576105c7565b60a68514156119d55750600392506000915060649050612b2b6105c7565b60708514156119f35750600292506000915060649050612bed6105c7565b60405162461bcd60e51b815260040180806020018281038252602c815260200180614082602c913960400191505060405180910390fd5b611a32613fab565b60408051600080825260208201909252611a6c91611a66565b611a53613fab565b815260200190600190039081611a4b5790505b50612249565b905090565b6000816001600160401b0316836060015160a001511015611ab6575060e0820180516005016001600160401b03169052606082015160001960a09091015260016116ed565b5060e0820180516001600160401b039083018116909152606083015160a0018051918316909103905260006116ed565b60016101e090910152565b600160e090910152565b600060028260e001511415611b12575060006110b6565b60018260e001511415611b27575060016110b6565b81516020830151611b3790611779565b611b448460400151611779565b611b518560600151611779565b611b5e8660800151611779565b8660a001518760c00151604051602001808881526020018781526020018681526020018581526020018481526020018381526020018281526020019750505050505050506040516020818303038152906040528051906020012090506110b6565b606060f883811c9083901c81900360ff169082826001600160401b0381118015611be857600080fd5b50604051908082528060200260200182016040528015611c12578160200160208202803683370190505b50905060005b83811015611c5157611c2f88828501602002612d89565b60001b828281518110611c3e57fe5b6020908102919091010152600101611c18565b509695505050505050565b60408051818152606081810183529182919060208201818036833701905050905060005b6020811015611d24576000848260208110611c9757fe5b1a60f881811b9250601080830480831b9360ff9091169091029003901b611cbd82612dc9565b858560020281518110611ccc57fe5b60200101906001600160f81b031916908160001a905350611cec81612dc9565b858560020260010181518110611cfe57fe5b60200101906001600160f81b031916908160001a9053505060019092019150611c809050565b5092915050565b60608180611d525750506040805180820190915260018152600360fc1b60208201526110b6565b8060005b8115611d6a57600101600a82049150611d56565b6060816001600160401b0381118015611d8257600080fd5b506040519080825280601f01601f191660200182016040528015611dad576020820181803683370190505b50905060001982015b8415611dfb57600a850660300160f81b82828060019003935081518110611dd957fe5b60200101906001600160f81b031916908160001a905350600a85049450611db6565b5095945050505050565b60008082600101848481518110611e1857fe5b016020015190925060f81c90509250929050565b600090565b60008082845110158015611e49575060208385510310155b611e86576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301611e9a858563ffffffff612dfa16565b915091509250929050565b611ead613fab565b6040805160c0810182528381528151606081018352600080825260208083018290528451828152808201865293949085019390830191611f03565b611ef0613fab565b815260200190600190039081611ee85790505b50905281526020016000604051908082528060200260200182016040528015611f4657816020015b611f33613fab565b815260200190600190039081611f2b5790505b5081526000602082018190526040820152600160609091015292915050565b600190565b6000611f74613fab565b82600080611f80613fab565b6000611f8c8986611e05565b9095509350611f9b8986611e05565b9095509250600160ff85161415611fbc57611fb689866113c4565b90955091505b611fc68986612e53565b9095509050600160ff85161415611ff15784611fe38483856116f3565b96509650505050505061157f565b84611ffc848361168f565b9650965050505050509250929050565b600c90565b612019613fab565b6040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b038111801561206057600080fd5b5060405190808252806020026020018201604052801561209a57816020015b612087613fab565b81526020019060019003908161207f5790505b509052815260200160006040519080825280602002602001820160405280156120dd57816020015b6120ca613fab565b8152602001906001900390816120c25790505b50815260208101849052600c604082015260016060909101529050919050565b600290565b600061210c613fab565b82845110158015612121575060408385510310155b61215e576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60008061216b8686612e53565b909450915061217a8685611e31565b90945090508361218a8383612e6a565b9350935050509250929050565b600390565b600d90565b60006060828160ff87166001600160401b03811180156121c057600080fd5b506040519080825280602002602001820160405280156121fa57816020015b6121e7613fab565b8152602001906001900390816121df5790505b50905060005b8760ff168160ff16101561223c5761221887846113c4565b838360ff168151811061222757fe5b60209081029190910101529250600101612200565b5090969095509350505050565b612251613fab565b61225b8251612f29565b6122ac576040805162461bcd60e51b815260206004820152601a60248201527f5475706c65206d75737420686176652076616c69642073697a65000000000000604482015290519081900360640190fd5b600160005b83518110156122e3578381815181106122c657fe5b602002602001015160a001518201915080806001019150506122b1565b506040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b038111801561232b57600080fd5b5060405190808252806020026020018201604052801561236557816020015b612352613fab565b81526020019060019003908161234a5790505b5090528152602081019490945260006040850152600360608501526080909301525090565b612392613fab565b6040518060c001604052806000815260200183815260200160006001600160401b03811180156123c157600080fd5b506040519080825280602002602001820160405280156123fb57816020015b6123e8613fab565b8152602001906001900390816123e05790505b5081526000602082015260016040820181905260609091015292915050565b60408051602080820193909352815180820384018152908201909152805191012090565b600060028260400151511061244f57fe5b6040820151516124b457612461611f65565b8251602080850151604080516001600160f81b031960f896871b8116828601529490951b9093166021850152602280850191909152825180850390910181526042909301909152815191012090506110b6565b6124bc611f65565b82600001516124e284604001516000815181106124d557fe5b6020026020010151611779565b8460200151604051602001808560ff1660ff1660f81b81526001018460ff1660ff1660f81b8152600101838152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b6000612545612197565b8383604051602001808460ff1660ff1660f81b8152600101838152602001828152602001935050505060405160208183030381529060405280519060200120905092915050565b612594613fab565b6008825111156125e2576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e8eae0d8ca40d8cadccee8d60631b604482015290519081900360640190fd5b606082516001600160401b03811180156125fb57600080fd5b50604051908082528060200260200182016040528015612625578160200160208202803683370190505b508051909150600160005b82811015612688576126478682815181106124d557fe5b84828151811061265357fe5b60200260200101818152505085818151811061266b57fe5b602002602001015160a00151820191508080600101915050612630565b506000835184604051602001808360ff1660ff1660f81b8152600101828051906020019060200280838360005b838110156126cd5781810151838201526020016126b5565b50505050905001925050506040516020818303038152906040528051906020012090506126fa8183612e6a565b9695505050505050565b606490565b612711613fab565b6040805160028082526060828101909352816020015b61272f613fab565b815260200190600190039081612727579050509050828160008151811061275257fe5b6020026020010181905250838160018151811061276b57fe5b602002602001018190525061277f8161258c565b949350505050565b61278f613fab565b61279d826101000151612f30565b90506127a7613fab565b6127b5836101000151612f30565b90506127c082612f72565b15806127d257506127d081612f90565b155b156127e7576127e083612f9d565b505061283b565b8151600160401b116127fc576127e083612f9d565b600061281e82606001518460000151612819876101c00151610fc3565b612fa6565b905061283784610100015161283283611ea5565b612fc8565b5050505b50565b612846613fab565b612854826101000151612f30565b905061285e613fab565b61286c836101000151612f30565b905061287782612f72565b1580612889575061288781612f90565b155b15612897576127e083612f9d565b815167fffffffffffffff9116128b0576127e083612f9d565b600061281e826060015184600001516128cd876101c00151610fc3565b612ff2565b6128da613fab565b6128e8826101000151612f30565b90506128f2613fab565b612900836101000151612f30565b905061290b82612f72565b158061291d575061291b81612f90565b155b1561292b576127e083612f9d565b815167ffffffffffffffe111612944576127e083612f9d565b600061281e82606001518460000151612961876101c00151610fc3565b613152565b61296e613fab565b61297c826101000151612f30565b9050612986613fab565b612994836101000151612f30565b905061299e613fab565b6129ac846101000151612f30565b90506129b783612f72565b15806129c957506129c782613286565b155b806129da57506129d881612f90565b155b156129f0576129e884612f9d565b50505061283b565b8251600160401b111580612a075750815161010011155b15612a15576129e884612f9d565b6000612a3c826060015185600001518560000151612a37896101c00151610fc3565b613291565b9050612a5085610100015161283283612011565b5050505050565b612a5f613fab565b612a6d826101000151612f30565b9050612a77613fab565b612a85836101000151612f30565b9050612a8f613fab565b612a9d846101000151612f30565b9050612aa883612f72565b1580612aba5750612ab882613286565b155b80612acb5750612ac981612f90565b155b15612ad9576129e884612f9d565b825167fffffffffffffff9111580612af657508151600160401b11155b15612b04576129e884612f9d565b6000612a3c826060015185600001518560000151612b26896101c00151610fc3565b6132da565b612b33613fab565b612b41826101000151612f30565b9050612b4b613fab565b612b59836101000151612f30565b9050612b63613fab565b612b71846101000151612f30565b9050612b7c83612f72565b1580612b8e5750612b8c82613286565b155b80612b9f5750612b9d81612f90565b155b15612bad576129e884612f9d565b825167ffffffffffffffe111612bc6576129e884612f9d565b6000612a3c826060015185600001518560000151612be8896101c00151610fc3565b613423565b612bf5613fab565b612c03826101000151612f30565b9050612c0d613fab565b612c1b836101000151612f30565b9050612c2682612f72565b1580612c385750612c3681612f90565b155b15612c46576127e083612f9d565b81516127101080612c5657508151155b15612c64576127e083612f9d565b82610180015151836101a001511415612cdf57612c9781606001518360000151612c92866101c00151610fc3565b6134f5565b15612cd6576040805162461bcd60e51b815260206004820152600a602482015269084aa8cbe988a9c8ea8960b31b604482015290519081900360640190fd5b6127e083612f9d565b6101a083015182516101808501516000612cfa828585613549565b905080612d0686611779565b14612d45576040805162461bcd60e51b815260206004820152600a60248201526915d493d391d7d4d1539160b21b604482015290519081900360640190fd5b5090910160209081019190912060a0850180516040805180860192909252818101939093528251808203840181526060909101909252815191909201209052505050565b600080805b6020811015612dc157600882901b91508481850181518110612dac57fe5b016020015160f81c9190911790600101612d8e565b509392505050565b6000600a60f883901c1015612de9578160f81c60300160f81b90506110b6565b8160f81c60570160f81b90506110b6565b60008160200183511015612e4a576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b60008060208301611e9a858563ffffffff612dfa16565b612e72613fab565b6040805160c0810182528481528151606081018352600080825260208083018290528451828152808201865293949085019390830191612ec8565b612eb5613fab565b815260200190600190039081612ead5790505b50905281526020016000604051908082528060200260200182016040528015612f0b57816020015b612ef8613fab565b815260200190600190039081612ef05790505b50815260006020820152600260408201526060019290925250919050565b6008101590565b612f38613fab565b612f40613fab565b8260200151600184600001510381518110612f5757fe5b60209081029190910101518351600019018452915050919050565b608081015160009060ff161580156116ed57505051600160401b1190565b6080015160ff16600c1490565b61283b81611ae6565b600061277f612fbe856020865b048560000151613572565b6020855b066136e0565b808260200151836000015181518110612fdd57fe5b60209081029190910101525080516001019052565b60408051600880825281830190925260009160609190602082018180368337019050509050600061302c866020875b048660000151613572565b905060208086066008011115613100576000613054876020885b046001018760400151613572565b905060005b6018601f8816600803018110156130a85761307a838260208a5b06016136e0565b60f81b84828151811061308957fe5b60200101906001600160f81b031916908160001a905350600101613059565b506018601f8716600803015b60088110156130f9576130cb826020898401612fc2565b60f81b8482815181106130da57fe5b60200101906001600160f81b031916908160001a9053506001016130b4565b5050613149565b60005b6008811015613147576131198282602089613073565b60f81b83828151811061312857fe5b60200101906001600160f81b031916908160001a905350600101613103565b505b6126fa826136ed565b60408051602080825281830190925260009160609190602082018180368337019050509050600061318586602087613021565b90506020808606602001111561323f5760006131a387602088613046565b905060005b601f87166020038110156131f1576131c3838260208a613073565b60f81b8482815181106131d257fe5b60200101906001600160f81b031916908160001a9053506001016131a8565b50601f86166020035b60208110156130f957613211826020898401612fc2565b60f81b84828151811061322057fe5b60200101906001600160f81b031916908160001a9053506001016131fa565b60005b6020811015613147576132588282602089613073565b60f81b83828151811061326757fe5b60200101906001600160f81b031916908160001a905350600101613242565b6080015160ff161590565b6000806132a086602087612fb3565b905060006132b2826020880687613723565b905060006132ce88602089048488600001518960200151613762565b98975050505050505050565b600060606132e784613802565b905060006132f787602088613021565b9050602080870660080111156133d95760005b6018601f881660080301811015613352576133488260208984010685846018018151811061333457fe5b01602001516001600160f81b03191661386c565b915060010161330a565b5061336c876020885b048387600001518860200151613762565b9650600061337c88602089613046565b90506018601f8816600803015b60088110156133b5576133ab8260208a84010686846018018151811061333457fe5b9150600101613389565b506133d188602089046001018388604001518960600151613762565b975050613418565b60005b6008811015613408576133fe828260208a060185846018018151811061333457fe5b91506001016133dc565b506134158760208861335b565b96505b509495945050505050565b6000606061343084613802565b9050600061344087602088613021565b9050602080870660200111156134d25760005b601f871660200381101561348257613478828260208a5b060185848151811061333457fe5b9150600101613453565b5061348f8760208861335b565b9650600061349f88602089613046565b9050601f87166020035b60208110156133b5576134c88260208a84010686848151811061333457fe5b91506001016134a9565b60005b6020811015613408576134eb828260208a61346a565b91506001016134d5565b60008061350485602086612fb3565b9050601f84165b60208110156135365761351e82826136e0565b1561352e57600092505050611772565b60010161350b565b5061176e85602086048560000151613888565b600080613564858486018661355d87613a04565b6001613a2f565b50905061176e607b82613b07565b60008151600014156135db57613588600061241a565b84146135d3576040805162461bcd60e51b815260206004820152601560248201527432bc3832b1ba32b21032b6b83a3c90313ab33332b960591b604482015290519081900360640190fd5b506000611772565b60006135fa836000815181106135ed57fe5b602002602001015161241a565b905060015b83518110156136645784600116600114156136385761363184828151811061362357fe5b602002602001015183613b07565b9150613658565b6136558285838151811061364857fe5b6020026020010151613b07565b91505b600194851c94016135ff565b508481146136b1576040805162461bcd60e51b8152602060048201526015602482015274195e1c1958dd19590818dbdc9c9958dd081c9bdbdd605a1b604482015290519081900360640190fd5b83156136c1575060009050611772565b826000815181106136ce57fe5b60200260200101519150509392505050565b601f036008021c60ff1690565b600080805b8351811015611d2457600882901b915083818151811061370e57fe5b016020015160f81c91909117906001016136f2565b6000606061373085613802565b90508260f81b81858151811061374257fe5b60200101906001600160f81b031916908160001a90535061176e816136ed565b600081516003146137b4576040805162461bcd60e51b81526020600482015260176024820152762120a22fa727a926a0a624ad20aa24a7a72fa82927a7a360491b604482015290519081900360640190fd5b6126fa86868686866000815181106137c857fe5b602002602001015160001c876001815181106137e057fe5b6020026020010151886002815181106137f557fe5b6020026020010151613b33565b6040805160208082528183019092526060918391839160208201818036833701905050905060005b6020811015612dc1578260f81b8282601f038151811061384657fe5b60200101906001600160f81b031916908160001a90535060089290921c9160010161382a565b6000606061387985613802565b90508281858151811061374257fe5b60008151600014156138f15761389e600061241a565b84146138e9576040805162461bcd60e51b815260206004820152601560248201527432bc3832b1ba32b21032b6b83a3c90313ab33332b960591b604482015290519081900360640190fd5b506001611772565b6000613903836000815181106135ed57fe5b905060016060613911613dad565b905060015b85518110156139a557866001166001141561394f5761394886828151811061393a57fe5b602002602001015185613b07565b9350613999565b61395f8487838151811061364857fe5b9350828015613996575081600182038151811061397857fe5b602002602001015186828151811061398c57fe5b6020026020010151145b92505b600196871c9601613916565b508683146139f2576040805162461bcd60e51b8152602060048201526015602482015274195e1c1958dd19590818dbdc9c9958dd081c9bdbdd605a1b604482015290519081900360640190fd5b8515611dfb5760019350505050611772565b600060018211613a16575060016110b6565b613a2560026001840104613a04565b60020290506110b6565b60008060208411613a8357858510613a5657613a4b600061241a565b600191509150613afd565b6000613a6b613a6689888a613e4e565b61241a565b905080613a78600061241a565b909350149050613afd565b600080613a9d8989600289048a0160028a5b046000613a2f565b91509150808015613aab5750845b15613acb57613ac089898960028a0489613a2f565b935093505050613afd565b600080613adc8b8b8b60028c613a95565b91509150613aea8285613b07565b818015613af45750835b95509550505050505b9550959350505050565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600080613b3f8761241a565b9050613b4c898988613572565b506060613b57613dad565b905060018751036001901b8910613c1b5787613b77578992505050613da2565b6000613b828a613ead565b88519091505b60018203811015613bb057613ba68c84600184038151811061364857fe5b9b50600101613b88565b5060015b60018203811015613c06578a60011660011415613be457613bdd83600183038151811061393a57fe5b9350613bfa565b613bf78484600184038151811061364857fe5b93505b60019a8b1c9a01613bb4565b50613c118b84613b07565b9350505050613da2565b60015b8751811015613c9b5760008a600116600114613c3a5783613c4f565b888281518110613c4657fe5b60200260200101515b905060008b600116600114613c7757898381518110613c6a57fe5b6020026020010151613c79565b845b9050613c858282613b07565b60019c8d1c9c909550929092019150613c1e9050565b508715613caa57509050613da2565b600086613cb8575084613d2d565b818781518110613cc457fe5b6020026020010151851415613d20576040805162461bcd60e51b815260206004820152601c60248201527f726967687420737562747265652063616e6e6f74206265207a65726f00000000604482015290519081900360640190fd5b613d2a8686613b07565b90505b80875b60018a5103811015613d5657613d4c8285838151811061364857fe5b9150600101613d30565b50838114613d9c576040805162461bcd60e51b815260206004820152600e60248201526d0caf0e0cac6e8cac840dac2e8c6d60931b604482015290519081900360640190fd5b50925050505b979650505050505050565b60408051818152610820810182526060918291906020820161080080368337019050509050613ddc600061241a565b81600081518110613de957fe5b602090810291909101015260015b6040811015613e4857613e29826001830381518110613e1257fe5b602002602001015183600184038151811061364857fe5b828281518110613e3557fe5b6020908102919091010152600101613df7565b50905090565b600080805b6020811015613ea457600882901b915060008186018511613e75576000613e93565b8682870181518110613e8357fe5b01602001516001600160f81b0319165b60f81c929092179150600101613e53565b50949350505050565b600081613ebc575060016110b6565b613ec9600183901c613ead565b60010190506110b6565b60405180608001604052806004906020820280368337509192915050565b604080516102008101825260008082526020820152908101613f11613fe8565b8152602001613f1e613fe8565b81526000602082018190526040820181905260608201819052608082015260a001613f47614048565b8152602001613f54614048565b81526000602082018190526040820181905260608083018190526080830182905260a083015260c09091015290565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b6040518060c0016040528060008152602001613fc5614062565b815260606020820181905260006040830181905290820181905260809091015290565b6040805161010081019091526000815260208101614004613fab565b8152602001614011613fab565b815260200161401e613fab565b815260200161402b613fab565b81526000602082018190526040820181905260609091015290565bfe5b604051806040016040528060008152602001606081525090565b604080516060808201835260008083526020830152918101919091529056fe75736520616e6f7468657220636f6e747261637420746f2068616e646c65206f74686572206f70636f646573a26469706673582212209cae75092a20071be5064676ceda41244f8f9d32289a962dd79ae39725665c1b64736f6c634300060b0033", } // OneStepProof2ABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgetestcontracts/OneStepProofHash.go b/packages/arb-util/ethbridgetestcontracts/OneStepProofHash.go index 5a1ab5bbf8..5dc1b5fbcc 100755 --- a/packages/arb-util/ethbridgetestcontracts/OneStepProofHash.go +++ b/packages/arb-util/ethbridgetestcontracts/OneStepProofHash.go @@ -31,7 +31,7 @@ var ( // OneStepProofHashMetaData contains all meta data concerning the OneStepProofHash contract. var OneStepProofHashMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address[2]\",\"name\":\"bridges\",\"type\":\"address[2]\"},{\"internalType\":\"uint256\",\"name\":\"initialMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[2]\",\"name\":\"accs\",\"type\":\"bytes32[2]\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"bproof\",\"type\":\"bytes\"}],\"name\":\"executeStep\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"gas\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"afterMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[4]\",\"name\":\"fields\",\"type\":\"bytes32[4]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[2]\",\"name\":\"bridges\",\"type\":\"address[2]\"},{\"internalType\":\"uint256\",\"name\":\"initialMessagesRead\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[2]\",\"name\":\"accs\",\"type\":\"bytes32[2]\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"bproof\",\"type\":\"bytes\"}],\"name\":\"executeStepDebug\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"startMachine\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"afterMachine\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50613f33806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806347dda1d61461003b578063eba67f6e14610157575b600080fd5b610107600480360360e081101561005157600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561007957600080fd5b82018360208201111561008b57600080fd5b803590602001918460018302840111600160201b831117156100ac57600080fd5b919390929091602081019035600160201b8111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111600160201b831117156100fc57600080fd5b509092509050610301565b604080516001600160401b03851681526020810184905290810182608080838360005b8381101561014257818101518382015260200161012a565b50505050905001935050505060405180910390f35b610223600480360360e081101561016d57600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561019557600080fd5b8201836020820111156101a757600080fd5b803590602001918460018302840111600160201b831117156101c857600080fd5b919390929091602081019035600160201b8111156101e557600080fd5b8201836020820111156101f757600080fd5b803590602001918460018302840111600160201b8311171561021857600080fd5b5090925090506103c0565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561026457818101518382015260200161024c565b50505050905090810190601f1680156102915780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156102c45781810151838201526020016102ac565b50505050905090810190601f1680156102f15780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b60008061030c613cb1565b610314613ccf565b6103988a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600081840152601f19601f820116905080830192505050505050508f610485565b90506103a38161093c565b6103ac81610d52565b935093509350509750975097945050505050565b6060806103cb613ccf565b61044f898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a9081908401838280828437600081840152601f19601f820116905080830192505050505050508e610485565b905061045a8161093c565b6104678160400151610db5565b92506104768160600151610db5565b91505097509795505050505050565b61048d613ccf565b60008460008151811061049c57fe5b602001015160f81c60f81b60f81c90506000856001815181106104bb57fe5b602001015160f81c60f81b60f81c90506000866002815181106104da57fe5b016020015160f81c9050600360606004840160ff166001600160401b038111801561050457600080fd5b5060405190808252806020026020018201604052801561053e57816020015b61052b613d61565b8152602001906001900390816105235790505b50905060608360040160ff166001600160401b038111801561055f57600080fd5b5060405190808252806020026020018201604052801561059957816020015b610586613d61565b81526020019060019003908161057e5790505b50905060005b8560ff168110156105d5576105b48b856110c1565b8483815181106105c057fe5b6020908102919091010152935060010161059f565b5060005b8460ff1681101561060f576105ee8b856110c1565b8383815181106105fa57fe5b602090810291909101015293506001016105d9565b50610618613d9e565b6106228b85611283565b809250819550505060008b858151811061063857fe5b01602001516001959095019460f81c9050610651613ccf565b6001600160a01b038b35811682526020808d0135909116908201526040810183905261067c83611323565b6060820152608081018f90528d3560a08201526020808f013560c0830152600060e0830181905260408051808201825260ff8c811682528185018a905261010086019190915281518083019092528a8116825292810187905261012084015283821660018114610140850152918b1661016084015261018083018f90526101c083018e90526101e08301526101a08201879052158061071e57508160ff166001145b6040518060400160405280600b81526020016a04241445f494d4d5f5459560ac1b815250906107cb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610790578181015183820152602001610778565b50505050905090810190601f1680156107bd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506107d4613d61565b60ff83166107f5576107ee8a83604001516000015161138c565b9050610895565b6000865111604051806040016040528060068152602001654e4f5f494d4d60d01b815250906108655760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b506108928a8360400151600001518860018d0360ff168151811061088557fe5b60200260200101516113f0565b90505b61089e81611474565b60408301515260005b838a0360ff168110156108e6576108de8782815181106108c357fe5b602002602001015184604001516115e190919063ffffffff16565b6001016108a7565b5060005b8860ff168110156109275761091f86828151811061090457fe5b602002602001015184604001516115fb90919063ffffffff16565b6001016108ea565b50909f9e505050505050505050505050505050565b6000806000613dfc61095585610160015160ff16611615565b9350935093509350600084118061096f5750846101400151155b80156109815750610100850151518410155b806109a957508461014001518015610997575083155b80156109a95750610100850151516001145b6040518060400160405280600a815260200169535441434b5f4d414e5960b01b81525090610a185760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b50610120850151516040805180820190915260088152674155585f4d414e5960c01b602082015290841015610a8e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b5061010085015151841115610b4c57610aad610aa86116f1565b611474565b610abe866060015160200151611474565b146040518060400160405280600d81526020016c535441434b5f4d495353494e4760981b81525090610b315760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b50610b3d856005611738565b50610b47856117ad565b610c0c565b61012085015151831115610be757610b65610aa86116f1565b610b76866060015160400151611474565b146040518060400160405280600b81526020016a4155585f4d495353494e4760a81b81525090610b315760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b610bf18583611738565b15610bff57610b47856117ad565b610c0c858263ffffffff16565b846101e0015115610cb15760408051600160f81b6020808301919091526000602183018190526022808401919091528351808403909101815260429092019092528051910120606086015160c001511415610c7357610c6e85606001516117b8565b610cb1565b60006101e0860152606085015160c081015190526101408501518015610c97575083155b610ca657610100850151600090525b610120850151600090525b60005b61010086015151811015610cfd57610cf5866101000151602001518281518110610cda57fe5b602002602001015187606001516115e190919063ffffffff16565b600101610cb4565b5060005b61012086015151811015610d4a57610d42866101200151602001518281518110610d2757fe5b602002602001015187606001516115fb90919063ffffffff16565b600101610d01565b505050505050565b600080610d5d613cb1565b8360e0015184608001516040518060800160405280610d7f88604001516117c2565b8152602001610d9188606001516117c2565b81526020018760a0015181526020018760c001518152509250925092509193909250565b6060610dc48260000151611886565b610dd9610dd48460200151611474565b611886565b610de9610dd48560400151611474565b610df9610dd48660600151611474565b610e09610dd48760800151611474565b610e168760a00151611955565b610e238860c00151611886565b60405160200180806709ac2c6d0d2dcca560c31b81525060080188805190602001908083835b60208310610e685780518252601f199092019160209182019101610e49565b51815160209384036101000a60001901801990921691161790526216100560e91b9190930190815289516003909101928a0191508083835b60208310610ebf5780518252601f199092019160209182019101610ea0565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528851600390910192890191508083835b60208310610f165780518252601f199092019160209182019101610ef7565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528751600390910192880191508083835b60208310610f6d5780518252601f199092019160209182019101610f4e565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528651600390910192870191508083835b60208310610fc45780518252601f199092019160209182019101610fa5565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528551600390910192860191508083835b6020831061101b5780518252601f199092019160209182019101610ffc565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528451600390910192850191508083835b602083106110725780518252601f199092019160209182019101611053565b6001836020036101000a0380198251168184511680821785525050505050509050018061148560f11b81525060020197505050505050505060405160208183030381529060405290505b919050565b60006110cb613d61565b83518310611111576040805162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a59081bd9999cd95d60921b604482015290519081900360640190fd5b60008061111e8686611a2f565b9150915061112a611a56565b60ff168160ff16141561115e5760006111438784611a5b565b90935090508261115282611acf565b9450945050505061127c565b611166611b8f565b60ff168160ff1614156111885761117d8683611b94565b93509350505061127c565b611190611c36565b60ff168160ff1614156111b85760006111a98784611a5b565b90935090508261115282611c3b565b6111c0611d27565b60ff168160ff1614156111d75761117d8683611d2c565b6111df611dc1565b60ff168160ff161015801561120057506111f7611dc6565b60ff168160ff16105b1561123c57600061120f611dc1565b820390506060611220828986611dcb565b90945090508361122f82611e73565b955095505050505061127c565b6040805162461bcd60e51b815260206004820152601060248201526f696e76616c69642074797065636f646560801b604482015290519081900360640190fd5b9250929050565b600061128d613d9e565b611295613d9e565b600060e08201819052806112a98787611a5b565b90965091506112b88787611d2c565b602085015295506112c98787611d2c565b604085015295506112da87876110c1565b606085015295506112eb87876110c1565b608085015295506112fc8787611a5b565b60a0850152955061130d8787611a5b565b92845260c0840192909252509590945092505050565b61132b613d9e565b60405180610100016040528083600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020018360a0015181526020018360c0015181526020018360e001518152509050919050565b611394613d61565b6040805160608101825260ff8516815260208082018590528251600080825291810184526113e7938301916113df565b6113cc613d61565b8152602001906001900390816113c45790505b509052611fb4565b90505b92915050565b6113f8613d61565b604080516001808252818301909252606091816020015b611417613d61565b81526020019060019003908161140f579050509050828160008151811061143a57fe5b602002602001018190525061146b60405180606001604052808760ff16815260200186815260200183815250611fb4565b95945050505050565b600061147e611a56565b60ff16826080015160ff1614156114a157815161149a90612044565b90506110bc565b6114a9611b8f565b60ff16826080015160ff1614156114c75761149a8260200151612068565b6114cf611d27565b60ff16826080015160ff1614156114f157815160a083015161149a9190612165565b6114f9611dc1565b60ff16826080015160ff16141561153257611512613d61565b61151f83604001516121b6565b905061152a81611474565b9150506110bc565b61153a61232e565b60ff16826080015160ff161415611553575080516110bc565b61155b611c36565b60ff16826080015160ff1614156115a0575060608082015160408051607b602080830191909152818301939093528151808203830181529301905281519101206110bc565b6040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207479706520636f646560781b604482015290519081900360640190fd5b6115ef826020015182612333565b82602001819052505050565b611609826040015182612333565b82604001819052505050565b60008080613dfc602085141561163a57506001925060009150600790506123b16116ea565b602185141561165857506001925060009150600390506123ec6116ea565b602285141561167657506002925060009150600890506124166116ea565b60238514156116955750600192506000915061025890506124b86116ea565b60248514156116b35750600392506000915060fa90506126a46116ea565b60405162461bcd60e51b815260040180806020018281038252602c815260200180613ed2602c913960400191505060405180910390fd5b9193509193565b6116f9613d61565b604080516000808252602082019092526117339161172d565b61171a613d61565b8152602001906001900390816117125790505b50611e73565b905090565b6000816001600160401b0316836060015160a00151101561177d575060e0820180516005016001600160401b03169052606082015160001960a09091015260016113ea565b5060e0820180516001600160401b039083018116909152606083015160a0018051918316909103905260006113ea565b60016101e090910152565b600160e090910152565b600060028260e0015114156117d9575060006110bc565b60018260e0015114156117ee575060016110bc565b815160208301516117fe90611474565b61180b8460400151611474565b6118188560600151611474565b6118258660800151611474565b8660a001518760c00151604051602001808881526020018781526020018681526020018581526020018481526020018381526020018281526020019750505050505050506040516020818303038152906040528051906020012090506110bc565b60408051818152606081810183529182919060208201818036833701905050905060005b602081101561194e5760008482602081106118c157fe5b1a60f881811b9250601080830480831b9360ff9091169091029003901b6118e782612762565b8585600202815181106118f657fe5b60200101906001600160f81b031916908160001a90535061191681612762565b85856002026001018151811061192857fe5b60200101906001600160f81b031916908160001a90535050600190920191506118aa9050565b5092915050565b6060818061197c5750506040805180820190915260018152600360fc1b60208201526110bc565b8060005b811561199457600101600a82049150611980565b6060816001600160401b03811180156119ac57600080fd5b506040519080825280601f01601f1916602001820160405280156119d7576020820181803683370190505b50905060001982015b8415611a2557600a850660300160f81b82828060019003935081518110611a0357fe5b60200101906001600160f81b031916908160001a905350600a850494506119e0565b5095945050505050565b60008082600101848481518110611a4257fe5b016020015190925060f81c90509250929050565b600090565b60008082845110158015611a73575060208385510310155b611ab0576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301611ac4858563ffffffff61279316565b915091509250929050565b611ad7613d61565b6040805160c0810182528381528151606081018352600080825260208083018290528451828152808201865293949085019390830191611b2d565b611b1a613d61565b815260200190600190039081611b125790505b50905281526020016000604051908082528060200260200182016040528015611b7057816020015b611b5d613d61565b815260200190600190039081611b555790505b5081526000602082018190526040820152600160609091015292915050565b600190565b6000611b9e613d61565b82600080611baa613d61565b6000611bb68986611a2f565b9095509350611bc58986611a2f565b9095509250600160ff85161415611be657611be089866110c1565b90955091505b611bf089866127ec565b9095509050600160ff85161415611c1b5784611c0d8483856113f0565b96509650505050505061127c565b84611c26848361138c565b9650965050505050509250929050565b600c90565b611c43613d61565b6040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b0381118015611c8a57600080fd5b50604051908082528060200260200182016040528015611cc457816020015b611cb1613d61565b815260200190600190039081611ca95790505b50905281526020016000604051908082528060200260200182016040528015611d0757816020015b611cf4613d61565b815260200190600190039081611cec5790505b50815260208101849052600c604082015260016060909101529050919050565b600290565b6000611d36613d61565b82845110158015611d4b575060408385510310155b611d88576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b600080611d9586866127ec565b9094509150611da48685611a5b565b909450905083611db48383612803565b9350935050509250929050565b600390565b600d90565b60006060828160ff87166001600160401b0381118015611dea57600080fd5b50604051908082528060200260200182016040528015611e2457816020015b611e11613d61565b815260200190600190039081611e095790505b50905060005b8760ff168160ff161015611e6657611e4287846110c1565b838360ff1681518110611e5157fe5b60209081029190910101529250600101611e2a565b5090969095509350505050565b611e7b613d61565b611e8582516128c2565b611ed6576040805162461bcd60e51b815260206004820152601a60248201527f5475706c65206d75737420686176652076616c69642073697a65000000000000604482015290519081900360640190fd5b600160005b8351811015611f0d57838181518110611ef057fe5b602002602001015160a00151820191508080600101915050611edb565b506040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b0381118015611f5557600080fd5b50604051908082528060200260200182016040528015611f8f57816020015b611f7c613d61565b815260200190600190039081611f745790505b5090528152602081019490945260006040850152600360608501526080909301525090565b611fbc613d61565b6040518060c001604052806000815260200183815260200160006001600160401b0381118015611feb57600080fd5b5060405190808252806020026020018201604052801561202557816020015b612012613d61565b81526020019060019003908161200a5790505b5081526000602082015260016040820181905260609091015292915050565b60408051602080820193909352815180820384018152908201909152805191012090565b600060028260400151511061207957fe5b6040820151516120de5761208b611b8f565b8251602080850151604080516001600160f81b031960f896871b8116828601529490951b9093166021850152602280850191909152825180850390910181526042909301909152815191012090506110bc565b6120e6611b8f565b826000015161210c84604001516000815181106120ff57fe5b6020026020010151611474565b8460200151604051602001808560ff1660ff1660f81b81526001018460ff1660ff1660f81b8152600101838152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b600061216f611dc1565b8383604051602001808460ff1660ff1660f81b8152600101838152602001828152602001935050505060405160208183030381529060405280519060200120905092915050565b6121be613d61565b60088251111561220c576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e8eae0d8ca40d8cadccee8d60631b604482015290519081900360640190fd5b606082516001600160401b038111801561222557600080fd5b5060405190808252806020026020018201604052801561224f578160200160208202803683370190505b508051909150600160005b828110156122b2576122718682815181106120ff57fe5b84828151811061227d57fe5b60200260200101818152505085818151811061229557fe5b602002602001015160a0015182019150808060010191505061225a565b506000835184604051602001808360ff1660ff1660f81b8152600101828051906020019060200280838360005b838110156122f75781810151838201526020016122df565b50505050905001925050506040516020818303038152906040528051906020012090506123248183612803565b9695505050505050565b606490565b61233b613d61565b6040805160028082526060828101909352816020015b612359613d61565b815260200190600190039081612351579050509050828160008151811061237c57fe5b6020026020010181905250838160018151811061239557fe5b60200260200101819052506123a9816121b6565b949350505050565b6123b9613d61565b6123c78261010001516128c9565b90506123e88261010001516123e36123de84611474565b611acf565b61290b565b5050565b6123f4613d61565b6124028261010001516128c9565b90506123e88261010001516123e383612935565b61241e613d61565b61242c8261010001516128c9565b9050612436613d61565b6124448361010001516128c9565b905061244f82612967565b1580612461575061245f81612967565b155b156124765761246f83612972565b50506124b5565b8151815160408051602080820185905281830184905282518083038401815260609092019092528051910120610100860151610d4a906123e383611acf565b50565b6124c0613d61565b6124ce8261010001516128c9565b90506124d98161297b565b15806124eb5750806040015151600714155b156124ff576124f982612972565b506124b5565b604081015160005b60078110156125495761252c82828151811061251f57fe5b6020026020010151612967565b6125415761253984612972565b5050506124b5565b600101612507565b50612552613dfe565b60005b60198110156125b6576040600382160283600483048151811061257457fe5b602002602001015160000151901c6001600160401b0316826005838161259657fe5b046005840660050201601981106125a957fe5b6020020152600101612555565b506125c081612988565b604080516007808252610100820190925291925060609190816020015b6125e5613d61565b8152602001906001900390816125dd57905050905060005b600781101561262f576126106000611acf565b82828151811061261c57fe5b60209081029190910101526001016125fd565b5060005b601981101561268a5760406003821602836005830460058406600502016019811061265a57fe5b6020020151901b82600483048151811061267057fe5b602090810291909101015180519091179052600101612633565b5061269d8561010001516123e383611e73565b5050505050565b6126ac613d61565b6126ba8261010001516128c9565b90506126c4613d61565b6126d28361010001516128c9565b90506126dc613d61565b6126ea8461010001516128c9565b90506126f583612967565b1580612707575061270582612967565b155b80612718575061271681612967565b155b156127265761253984612972565b825182518251610100870151604080518082019091528381526020810183905261275991906123e3906123de908761356d565b50505050505050565b6000600a60f883901c1015612782578160f81c60300160f81b90506110bc565b8160f81c60570160f81b90506110bc565b600081602001835110156127e3576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b60008060208301611ac4858563ffffffff61279316565b61280b613d61565b6040805160c0810182528481528151606081018352600080825260208083018290528451828152808201865293949085019390830191612861565b61284e613d61565b8152602001906001900390816128465790505b509052815260200160006040519080825280602002602001820160405280156128a457816020015b612891613d61565b8152602001906001900390816128895790505b50815260006020820152600260408201526060019290925250919050565b6008101590565b6128d1613d61565b6128d9613d61565b82602001516001846000015103815181106128f057fe5b60209081029190910101518351600019018452915050919050565b80826020015183600001518151811061292057fe5b60209081029190910101525080516001019052565b61293d613d61565b816080015160ff16600214156129575761149a6003611acf565b6113ea826080015160ff16611acf565b6080015160ff161590565b6124b5816117ad565b6080015160ff1660031490565b612990613dfe565b612998613e1d565b6129a0613e1d565b6129a8613dfe565b6129b0613e3b565b60405180610300016040528060018152602001618082815260200167800000000000808a8152602001678000000080008000815260200161808b81526020016380000001815260200167800000008000808181526020016780000000000080098152602001608a81526020016088815260200163800080098152602001638000000a8152602001638000808b815260200167800000000000008b8152602001678000000000008089815260200167800000000000800381526020016780000000000080028152602001678000000000000080815260200161800a815260200167800000008000000a81526020016780000000800080818152602001678000000000008080815260200163800000018152602001678000000080008008815250905060008090505b6018811015613562576080878101516060808a01516040808c01516020808e01518e511890911890921890931889526101208b01516101008c015160e08d015160c08e015160a08f0151181818189089018190526101c08b01516101a08c01516101808d01516101608e01516101408f0151181818189289019283526102608b01516102408c01516102208d01516102008e01516101e08f015118181818918901919091526103008a01516102e08b01516102c08c01516102a08d01516102808e0151181818189288018390526001600160401b0360028202166001603f1b91829004179092188652510485600260200201516002026001600160401b03161785600060200201511884600160200201526001603f1b856003602002015181612bfc57fe5b0485600360200201516002026001600160401b03161785600160200201511884600260200201526001603f1b856004602002015181612c3757fe5b0485600460200201516002026001600160401b03161785600260058110612c5a57fe5b602002015118606085015284516001603f1b9086516060808901519390920460029091026001600160401b031617909118608086810191825286518a5118808b5287516020808d018051909218825289516040808f0180519092189091528a518e8801805190911890528a51948e0180519095189094528901805160a08e0180519091189052805160c08e0180519091189052805160e08e018051909118905280516101008e0180519091189052516101208d018051909118905291880180516101408d018051909118905280516101608d018051909118905280516101808d018051909118905280516101a08d0180519091189052516101c08c018051909118905292870180516101e08c018051909118905280516102008c018051909118905280516102208c018051909118905280516102408c0180519091189052516102608b018051909118905281516102808b018051909118905281516102a08b018051909118905281516102c08b018051909118905281516102e08b018051909118905290516103008a01805190911890529084525163100000009060208901516001600160401b03641000000000909102169190041761010084015260408701516001603d1b9060408901516001600160401b03600890910216919004176101608401526060870151628000009060608901516001600160401b036502000000000090910216919004176102608401526080870151654000000000009060808901516001600160401b036204000090910216919004176102c084015260a08701516001603f1b900487600560200201516002026001600160401b03161783600260198110612ec457fe5b602002015260c08701516210000081046001602c1b9091026001600160401b039081169190911760a085015260e0880151664000000000000081046104009091028216176101a08501526101008801516208000081046520000000000090910282161761020085015261012088015160048082029092166001603e1b909104176103008501526101408801516101408901516001600160401b036001603e1b909102169190041760808401526101608701516001603a1b906101608901516001600160401b036040909102169190041760e084015261018087015162200000906101808901516001600160401b036001602b1b90910216919004176101408401526101a08701516602000000000000906101a08901516001600160401b0361800090910216919004176102408401526101c08701516008906101c08901516001600160401b036001603d1b90910216919004176102a08401526101e0870151641000000000906101e08901516001600160401b03631000000090910216919004176020840152610200808801516102008901516001600160401b0366800000000000009091021691900417610120840152610220870151648000000000906102208901516001600160401b03630200000090910216919004176101808401526102408701516001602b1b906102408901516001600160401b036220000090910216919004176101e0840152610260870151610100906102608901516001600160401b03600160381b90910216919004176102e0840152610280870151642000000000906102808901516001600160401b036308000000909102169190041760608401526102a08701516001602c1b906102a08901516001600160401b0362100000909102169190041760c08401526102c08701516302000000906102c08901516001600160401b0364800000000090910216919004176101c08401526102e0870151600160381b906102e08901516001600160401b036101009091021691900417610220840152610300870151660400000000000090048760186020020151614000026001600160401b031617836014602002015282600a602002015183600560200201511916836000602002015118876000602002015282600b602002015183600660200201511916836001602002015118876001602002015282600c602002015183600760200201511916836002602002015118876002602002015282600d602002015183600860200201511916836003602002015118876003602002015282600e602002015183600960200201511916836004602002015118876004602002015282600f602002015183600a602002015119168360056020020151188760056020020152826010602002015183600b602002015119168360066020020151188760066020020152826011602002015183600c602002015119168360076020020151188760076020020152826012602002015183600d602002015119168360086020020151188760086020020152826013602002015183600e602002015119168360096020020151188760096020020152826014602002015183600f6020020151191683600a60200201511887600a602002015282601560200201518360106020020151191683600b60200201511887600b602002015282601660200201518360116020020151191683600c60200201511887600c602002015282601760200201518360126020020151191683600d60200201511887600d602002015282601860200201518360136020020151191683600e60200201511887600e602002015282600060200201518360146020020151191683600f60200201511887600f602002015282600160200201518360156020020151191683601060200201511887601060200201528260026020020151836016602002015119168360116020020151188760116020020152826003602002015183601760200201511916836012602002015118876012602002015282600460200201518360186020020151191683601360200201511887601360200201528260056020020151836000602002015119168360146020020151188760146020020152826006602002015183600160200201511916836015602002015118876015602002015282600760200201518360026020020151191683601660200201511887601660200201528260086020020151836003602002015119168360176020020151188760176020020152826009602002015183600460200201511916836018602002015118876018602002015281816018811061355057fe5b60200201518751188752600101612ad7565b509495945050505050565b6000613577613e5a565b50604080516108008101825263428a2f9881526371374491602082015263b5c0fbcf9181019190915263e9b5dba56060820152633956c25b60808201526359f111f160a082015263923f82a460c082015263ab1c5ed560e082015263d807aa986101008201526312835b0161012082015263243185be61014082015263550c7dc36101608201526372be5d746101808201526380deb1fe6101a0820152639bdc06a76101c082015263c19bf1746101e082015263e49b69c161020082015263efbe4786610220820152630fc19dc661024082015263240ca1cc610260820152632de92c6f610280820152634a7484aa6102a0820152635cb0a9dc6102c08201526376f988da6102e082015263983e515261030082015263a831c66d61032082015263b00327c861034082015263bf597fc761036082015263c6e00bf361038082015263d5a791476103a08201526306ca63516103c082015263142929676103e08201526327b70a85610400820152632e1b2138610420820152634d2c6dfc6104408201526353380d1361046082015263650a735461048082015263766a0abb6104a08201526381c2c92e6104c08201526392722c856104e082015263a2bfe8a161050082015263a81a664b61052082015263c24b8b7061054082015263c76c51a361056082015263d192e81961058082015263d69906246105a082015263f40e35856105c082015263106aa0706105e08201526319a4c116610600820152631e376c08610620820152632748774c6106408201526334b0bcb561066082015263391c0cb3610680820152634ed8aa4a6106a0820152635b9cca4f6106c082015263682e6ff36106e082015263748f82ee6107008201526378a5636f6107208201526384c87814610740820152638cc702086107608201526390befffa61078082015263a4506ceb6107a082015263bef9a3f76107c082015263c67178f26107e0820152613842613e5a565b60005b60088163ffffffff1610156138cf5763ffffffff6020820260e003168660006020020151901c828263ffffffff166040811061387d57fe5b63ffffffff92831660209182029290920191909152820260e003168660016020020151901c828260080163ffffffff16604081106138b757fe5b63ffffffff9092166020929092020152600101613845565b5060106000805b60408363ffffffff161015613a2b57600384600f850363ffffffff16604081106138fc57fe5b602002015163ffffffff16901c61392d85600f860363ffffffff166040811061392157fe5b60200201516012613c8a565b61395186600f870363ffffffff166040811061394557fe5b60200201516007613c8a565b18189150600a846002850363ffffffff166040811061396c57fe5b602002015163ffffffff16901c61399d856002860363ffffffff166040811061399157fe5b60200201516013613c8a565b6139c1866002870363ffffffff16604081106139b557fe5b60200201516011613c8a565b1818905080846007850363ffffffff16604081106139db57fe5b602002015183866010870363ffffffff16604081106139f657fe5b6020020151010101848463ffffffff1660408110613a1057fe5b63ffffffff90921660209290920201526001909201916138d6565b613a33613e79565b600093505b60088463ffffffff161015613a84578360200260e00363ffffffff1688901c818563ffffffff1660088110613a6957fe5b63ffffffff9092166020929092020152600190930192613a38565b60008060008096505b60408763ffffffff161015613bd9576080840151613aac906019613c8a565b6080850151613abc90600b613c8a565b6080860151613acc906006613c8a565b18189450878763ffffffff1660408110613ae257fe5b6020020151898863ffffffff1660408110613af957fe5b6020020151608086015160a087015160c0880151613b18929190613ca8565b878760076020020151010101019250613b3984600060200201516016613c8a565b8451613b4690600d613c8a565b8551613b53906002613c8a565b6040870180516020890180518a5160c08c01805163ffffffff90811660e08f015260a08e018051821690925260808e018051821690925260608e0180518e01821690925280861690915280831690955284811690925280831891909116911618929091189290921881810186810190931687526001999099019897509092509050613a8d565b600096505b60088763ffffffff161015613c2d578660200260e00363ffffffff168b901c848863ffffffff1660088110613c0f57fe5b60200201805163ffffffff9201919091169052600190960195613bde565b60008097505b60088863ffffffff161015613c7a578760200260e00363ffffffff16858963ffffffff1660088110613c6157fe5b602002015160019099019863ffffffff16901b17613c33565b9c9b505050505050505050505050565b63ffffffff9182166020829003831681901b919092169190911c1790565b82191691161890565b60405180608001604052806004906020820280368337509192915050565b604080516102008101825260008082526020820152908101613cef613d9e565b8152602001613cfc613d9e565b81526000602082018190526040820181905260608201819052608082015260a001613d25613e98565b8152602001613d32613e98565b81526000602082018190526040820181905260608083018190526080830182905260a083015260c09091015290565b6040518060c0016040528060008152602001613d7b613eb2565b815260606020820181905260006040830181905290820181905260809091015290565b6040805161010081019091526000815260208101613dba613d61565b8152602001613dc7613d61565b8152602001613dd4613d61565b8152602001613de1613d61565b81526000602082018190526040820181905260609091015290565bfe5b6040518061032001604052806019906020820280368337509192915050565b6040518060a001604052806005906020820280368337509192915050565b6040518061030001604052806018906020820280368337509192915050565b6040518061080001604052806040906020820280368337509192915050565b6040518061010001604052806008906020820280368337509192915050565b604051806040016040528060008152602001606081525090565b604080516060808201835260008083526020830152918101919091529056fe75736520616e6f7468657220636f6e747261637420746f2068616e646c65206f74686572206f70636f646573a2646970667358221220fdd9b03af497ff0d0574082be690ded38011d4380b40f259f124c2e0de48904b64736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b50613f33806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806347dda1d61461003b578063eba67f6e14610157575b600080fd5b610107600480360360e081101561005157600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561007957600080fd5b82018360208201111561008b57600080fd5b803590602001918460018302840111600160201b831117156100ac57600080fd5b919390929091602081019035600160201b8111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111600160201b831117156100fc57600080fd5b509092509050610301565b604080516001600160401b03851681526020810184905290810182608080838360005b8381101561014257818101518382015260200161012a565b50505050905001935050505060405180910390f35b610223600480360360e081101561016d57600080fd5b604082013590606083019083018360c0810160a0820135600160201b81111561019557600080fd5b8201836020820111156101a757600080fd5b803590602001918460018302840111600160201b831117156101c857600080fd5b919390929091602081019035600160201b8111156101e557600080fd5b8201836020820111156101f757600080fd5b803590602001918460018302840111600160201b8311171561021857600080fd5b5090925090506103c0565b604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561026457818101518382015260200161024c565b50505050905090810190601f1680156102915780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156102c45781810151838201526020016102ac565b50505050905090810190601f1680156102f15780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b60008061030c613cb1565b610314613ccf565b6103988a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b9081908401838280828437600081840152601f19601f820116905080830192505050505050508f610485565b90506103a38161093c565b6103ac81610d52565b935093509350509750975097945050505050565b6060806103cb613ccf565b61044f898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b815292508b91508a9081908401838280828437600081840152601f19601f820116905080830192505050505050508e610485565b905061045a8161093c565b6104678160400151610db5565b92506104768160600151610db5565b91505097509795505050505050565b61048d613ccf565b60008460008151811061049c57fe5b602001015160f81c60f81b60f81c90506000856001815181106104bb57fe5b602001015160f81c60f81b60f81c90506000866002815181106104da57fe5b016020015160f81c9050600360606004840160ff166001600160401b038111801561050457600080fd5b5060405190808252806020026020018201604052801561053e57816020015b61052b613d61565b8152602001906001900390816105235790505b50905060608360040160ff166001600160401b038111801561055f57600080fd5b5060405190808252806020026020018201604052801561059957816020015b610586613d61565b81526020019060019003908161057e5790505b50905060005b8560ff168110156105d5576105b48b856110c1565b8483815181106105c057fe5b6020908102919091010152935060010161059f565b5060005b8460ff1681101561060f576105ee8b856110c1565b8383815181106105fa57fe5b602090810291909101015293506001016105d9565b50610618613d9e565b6106228b85611283565b809250819550505060008b858151811061063857fe5b01602001516001959095019460f81c9050610651613ccf565b6001600160a01b038b35811682526020808d0135909116908201526040810183905261067c83611323565b6060820152608081018f90528d3560a08201526020808f013560c0830152600060e0830181905260408051808201825260ff8c811682528185018a905261010086019190915281518083019092528a8116825292810187905261012084015283821660018114610140850152918b1661016084015261018083018f90526101c083018e90526101e08301526101a08201879052158061071e57508160ff166001145b6040518060400160405280600b81526020016a04241445f494d4d5f5459560ac1b815250906107cb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610790578181015183820152602001610778565b50505050905090810190601f1680156107bd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506107d4613d61565b60ff83166107f5576107ee8a83604001516000015161138c565b9050610895565b6000865111604051806040016040528060068152602001654e4f5f494d4d60d01b815250906108655760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b506108928a8360400151600001518860018d0360ff168151811061088557fe5b60200260200101516113f0565b90505b61089e81611474565b60408301515260005b838a0360ff168110156108e6576108de8782815181106108c357fe5b602002602001015184604001516115e190919063ffffffff16565b6001016108a7565b5060005b8860ff168110156109275761091f86828151811061090457fe5b602002602001015184604001516115fb90919063ffffffff16565b6001016108ea565b50909f9e505050505050505050505050505050565b6000806000613dfc61095585610160015160ff16611615565b9350935093509350600084118061096f5750846101400151155b80156109815750610100850151518410155b806109a957508461014001518015610997575083155b80156109a95750610100850151516001145b6040518060400160405280600a815260200169535441434b5f4d414e5960b01b81525090610a185760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b50610120850151516040805180820190915260088152674155585f4d414e5960c01b602082015290841015610a8e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b5061010085015151841115610b4c57610aad610aa86116f1565b611474565b610abe866060015160200151611474565b146040518060400160405280600d81526020016c535441434b5f4d495353494e4760981b81525090610b315760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b50610b3d856005611738565b50610b47856117ad565b610c0c565b61012085015151831115610be757610b65610aa86116f1565b610b76866060015160400151611474565b146040518060400160405280600b81526020016a4155585f4d495353494e4760a81b81525090610b315760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610790578181015183820152602001610778565b610bf18583611738565b15610bff57610b47856117ad565b610c0c858263ffffffff16565b846101e0015115610cb15760408051600160f81b6020808301919091526000602183018190526022808401919091528351808403909101815260429092019092528051910120606086015160c001511415610c7357610c6e85606001516117b8565b610cb1565b60006101e0860152606085015160c081015190526101408501518015610c97575083155b610ca657610100850151600090525b610120850151600090525b60005b61010086015151811015610cfd57610cf5866101000151602001518281518110610cda57fe5b602002602001015187606001516115e190919063ffffffff16565b600101610cb4565b5060005b61012086015151811015610d4a57610d42866101200151602001518281518110610d2757fe5b602002602001015187606001516115fb90919063ffffffff16565b600101610d01565b505050505050565b600080610d5d613cb1565b8360e0015184608001516040518060800160405280610d7f88604001516117c2565b8152602001610d9188606001516117c2565b81526020018760a0015181526020018760c001518152509250925092509193909250565b6060610dc48260000151611886565b610dd9610dd48460200151611474565b611886565b610de9610dd48560400151611474565b610df9610dd48660600151611474565b610e09610dd48760800151611474565b610e168760a00151611955565b610e238860c00151611886565b60405160200180806709ac2c6d0d2dcca560c31b81525060080188805190602001908083835b60208310610e685780518252601f199092019160209182019101610e49565b51815160209384036101000a60001901801990921691161790526216100560e91b9190930190815289516003909101928a0191508083835b60208310610ebf5780518252601f199092019160209182019101610ea0565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528851600390910192890191508083835b60208310610f165780518252601f199092019160209182019101610ef7565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528751600390910192880191508083835b60208310610f6d5780518252601f199092019160209182019101610f4e565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528651600390910192870191508083835b60208310610fc45780518252601f199092019160209182019101610fa5565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528551600390910192860191508083835b6020831061101b5780518252601f199092019160209182019101610ffc565b51815160209384036101000a60001901801990921691161790526216100560e91b919093019081528451600390910192850191508083835b602083106110725780518252601f199092019160209182019101611053565b6001836020036101000a0380198251168184511680821785525050505050509050018061148560f11b81525060020197505050505050505060405160208183030381529060405290505b919050565b60006110cb613d61565b83518310611111576040805162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a59081bd9999cd95d60921b604482015290519081900360640190fd5b60008061111e8686611a2f565b9150915061112a611a56565b60ff168160ff16141561115e5760006111438784611a5b565b90935090508261115282611acf565b9450945050505061127c565b611166611b8f565b60ff168160ff1614156111885761117d8683611b94565b93509350505061127c565b611190611c36565b60ff168160ff1614156111b85760006111a98784611a5b565b90935090508261115282611c3b565b6111c0611d27565b60ff168160ff1614156111d75761117d8683611d2c565b6111df611dc1565b60ff168160ff161015801561120057506111f7611dc6565b60ff168160ff16105b1561123c57600061120f611dc1565b820390506060611220828986611dcb565b90945090508361122f82611e73565b955095505050505061127c565b6040805162461bcd60e51b815260206004820152601060248201526f696e76616c69642074797065636f646560801b604482015290519081900360640190fd5b9250929050565b600061128d613d9e565b611295613d9e565b600060e08201819052806112a98787611a5b565b90965091506112b88787611d2c565b602085015295506112c98787611d2c565b604085015295506112da87876110c1565b606085015295506112eb87876110c1565b608085015295506112fc8787611a5b565b60a0850152955061130d8787611a5b565b92845260c0840192909252509590945092505050565b61132b613d9e565b60405180610100016040528083600001518152602001836020015181526020018360400151815260200183606001518152602001836080015181526020018360a0015181526020018360c0015181526020018360e001518152509050919050565b611394613d61565b6040805160608101825260ff8516815260208082018590528251600080825291810184526113e7938301916113df565b6113cc613d61565b8152602001906001900390816113c45790505b509052611fb4565b90505b92915050565b6113f8613d61565b604080516001808252818301909252606091816020015b611417613d61565b81526020019060019003908161140f579050509050828160008151811061143a57fe5b602002602001018190525061146b60405180606001604052808760ff16815260200186815260200183815250611fb4565b95945050505050565b600061147e611a56565b60ff16826080015160ff1614156114a157815161149a90612044565b90506110bc565b6114a9611b8f565b60ff16826080015160ff1614156114c75761149a8260200151612068565b6114cf611d27565b60ff16826080015160ff1614156114f157815160a083015161149a9190612165565b6114f9611dc1565b60ff16826080015160ff16141561153257611512613d61565b61151f83604001516121b6565b905061152a81611474565b9150506110bc565b61153a61232e565b60ff16826080015160ff161415611553575080516110bc565b61155b611c36565b60ff16826080015160ff1614156115a0575060608082015160408051607b602080830191909152818301939093528151808203830181529301905281519101206110bc565b6040805162461bcd60e51b8152602060048201526011602482015270496e76616c6964207479706520636f646560781b604482015290519081900360640190fd5b6115ef826020015182612333565b82602001819052505050565b611609826040015182612333565b82604001819052505050565b60008080613dfc602085141561163a57506001925060009150600790506123b16116ea565b602185141561165857506001925060009150600390506123ec6116ea565b602285141561167657506002925060009150600890506124166116ea565b60238514156116955750600192506000915061025890506124b86116ea565b60248514156116b35750600392506000915060fa90506126a46116ea565b60405162461bcd60e51b815260040180806020018281038252602c815260200180613ed2602c913960400191505060405180910390fd5b9193509193565b6116f9613d61565b604080516000808252602082019092526117339161172d565b61171a613d61565b8152602001906001900390816117125790505b50611e73565b905090565b6000816001600160401b0316836060015160a00151101561177d575060e0820180516005016001600160401b03169052606082015160001960a09091015260016113ea565b5060e0820180516001600160401b039083018116909152606083015160a0018051918316909103905260006113ea565b60016101e090910152565b600160e090910152565b600060028260e0015114156117d9575060006110bc565b60018260e0015114156117ee575060016110bc565b815160208301516117fe90611474565b61180b8460400151611474565b6118188560600151611474565b6118258660800151611474565b8660a001518760c00151604051602001808881526020018781526020018681526020018581526020018481526020018381526020018281526020019750505050505050506040516020818303038152906040528051906020012090506110bc565b60408051818152606081810183529182919060208201818036833701905050905060005b602081101561194e5760008482602081106118c157fe5b1a60f881811b9250601080830480831b9360ff9091169091029003901b6118e782612762565b8585600202815181106118f657fe5b60200101906001600160f81b031916908160001a90535061191681612762565b85856002026001018151811061192857fe5b60200101906001600160f81b031916908160001a90535050600190920191506118aa9050565b5092915050565b6060818061197c5750506040805180820190915260018152600360fc1b60208201526110bc565b8060005b811561199457600101600a82049150611980565b6060816001600160401b03811180156119ac57600080fd5b506040519080825280601f01601f1916602001820160405280156119d7576020820181803683370190505b50905060001982015b8415611a2557600a850660300160f81b82828060019003935081518110611a0357fe5b60200101906001600160f81b031916908160001a905350600a850494506119e0565b5095945050505050565b60008082600101848481518110611a4257fe5b016020015190925060f81c90509250929050565b600090565b60008082845110158015611a73575060208385510310155b611ab0576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301611ac4858563ffffffff61279316565b915091509250929050565b611ad7613d61565b6040805160c0810182528381528151606081018352600080825260208083018290528451828152808201865293949085019390830191611b2d565b611b1a613d61565b815260200190600190039081611b125790505b50905281526020016000604051908082528060200260200182016040528015611b7057816020015b611b5d613d61565b815260200190600190039081611b555790505b5081526000602082018190526040820152600160609091015292915050565b600190565b6000611b9e613d61565b82600080611baa613d61565b6000611bb68986611a2f565b9095509350611bc58986611a2f565b9095509250600160ff85161415611be657611be089866110c1565b90955091505b611bf089866127ec565b9095509050600160ff85161415611c1b5784611c0d8483856113f0565b96509650505050505061127c565b84611c26848361138c565b9650965050505050509250929050565b600c90565b611c43613d61565b6040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b0381118015611c8a57600080fd5b50604051908082528060200260200182016040528015611cc457816020015b611cb1613d61565b815260200190600190039081611ca95790505b50905281526020016000604051908082528060200260200182016040528015611d0757816020015b611cf4613d61565b815260200190600190039081611cec5790505b50815260208101849052600c604082015260016060909101529050919050565b600290565b6000611d36613d61565b82845110158015611d4b575060408385510310155b611d88576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b600080611d9586866127ec565b9094509150611da48685611a5b565b909450905083611db48383612803565b9350935050509250929050565b600390565b600d90565b60006060828160ff87166001600160401b0381118015611dea57600080fd5b50604051908082528060200260200182016040528015611e2457816020015b611e11613d61565b815260200190600190039081611e095790505b50905060005b8760ff168160ff161015611e6657611e4287846110c1565b838360ff1681518110611e5157fe5b60209081029190910101529250600101611e2a565b5090969095509350505050565b611e7b613d61565b611e8582516128c2565b611ed6576040805162461bcd60e51b815260206004820152601a60248201527f5475706c65206d75737420686176652076616c69642073697a65000000000000604482015290519081900360640190fd5b600160005b8351811015611f0d57838181518110611ef057fe5b602002602001015160a00151820191508080600101915050611edb565b506040518060c00160405280600081526020016040518060600160405280600060ff1681526020016000801b815260200160006001600160401b0381118015611f5557600080fd5b50604051908082528060200260200182016040528015611f8f57816020015b611f7c613d61565b815260200190600190039081611f745790505b5090528152602081019490945260006040850152600360608501526080909301525090565b611fbc613d61565b6040518060c001604052806000815260200183815260200160006001600160401b0381118015611feb57600080fd5b5060405190808252806020026020018201604052801561202557816020015b612012613d61565b81526020019060019003908161200a5790505b5081526000602082015260016040820181905260609091015292915050565b60408051602080820193909352815180820384018152908201909152805191012090565b600060028260400151511061207957fe5b6040820151516120de5761208b611b8f565b8251602080850151604080516001600160f81b031960f896871b8116828601529490951b9093166021850152602280850191909152825180850390910181526042909301909152815191012090506110bc565b6120e6611b8f565b826000015161210c84604001516000815181106120ff57fe5b6020026020010151611474565b8460200151604051602001808560ff1660ff1660f81b81526001018460ff1660ff1660f81b8152600101838152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b600061216f611dc1565b8383604051602001808460ff1660ff1660f81b8152600101838152602001828152602001935050505060405160208183030381529060405280519060200120905092915050565b6121be613d61565b60088251111561220c576040805162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e8eae0d8ca40d8cadccee8d60631b604482015290519081900360640190fd5b606082516001600160401b038111801561222557600080fd5b5060405190808252806020026020018201604052801561224f578160200160208202803683370190505b508051909150600160005b828110156122b2576122718682815181106120ff57fe5b84828151811061227d57fe5b60200260200101818152505085818151811061229557fe5b602002602001015160a0015182019150808060010191505061225a565b506000835184604051602001808360ff1660ff1660f81b8152600101828051906020019060200280838360005b838110156122f75781810151838201526020016122df565b50505050905001925050506040516020818303038152906040528051906020012090506123248183612803565b9695505050505050565b606490565b61233b613d61565b6040805160028082526060828101909352816020015b612359613d61565b815260200190600190039081612351579050509050828160008151811061237c57fe5b6020026020010181905250838160018151811061239557fe5b60200260200101819052506123a9816121b6565b949350505050565b6123b9613d61565b6123c78261010001516128c9565b90506123e88261010001516123e36123de84611474565b611acf565b61290b565b5050565b6123f4613d61565b6124028261010001516128c9565b90506123e88261010001516123e383612935565b61241e613d61565b61242c8261010001516128c9565b9050612436613d61565b6124448361010001516128c9565b905061244f82612967565b1580612461575061245f81612967565b155b156124765761246f83612972565b50506124b5565b8151815160408051602080820185905281830184905282518083038401815260609092019092528051910120610100860151610d4a906123e383611acf565b50565b6124c0613d61565b6124ce8261010001516128c9565b90506124d98161297b565b15806124eb5750806040015151600714155b156124ff576124f982612972565b506124b5565b604081015160005b60078110156125495761252c82828151811061251f57fe5b6020026020010151612967565b6125415761253984612972565b5050506124b5565b600101612507565b50612552613dfe565b60005b60198110156125b6576040600382160283600483048151811061257457fe5b602002602001015160000151901c6001600160401b0316826005838161259657fe5b046005840660050201601981106125a957fe5b6020020152600101612555565b506125c081612988565b604080516007808252610100820190925291925060609190816020015b6125e5613d61565b8152602001906001900390816125dd57905050905060005b600781101561262f576126106000611acf565b82828151811061261c57fe5b60209081029190910101526001016125fd565b5060005b601981101561268a5760406003821602836005830460058406600502016019811061265a57fe5b6020020151901b82600483048151811061267057fe5b602090810291909101015180519091179052600101612633565b5061269d8561010001516123e383611e73565b5050505050565b6126ac613d61565b6126ba8261010001516128c9565b90506126c4613d61565b6126d28361010001516128c9565b90506126dc613d61565b6126ea8461010001516128c9565b90506126f583612967565b1580612707575061270582612967565b155b80612718575061271681612967565b155b156127265761253984612972565b825182518251610100870151604080518082019091528381526020810183905261275991906123e3906123de908761356d565b50505050505050565b6000600a60f883901c1015612782578160f81c60300160f81b90506110bc565b8160f81c60570160f81b90506110bc565b600081602001835110156127e3576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b60008060208301611ac4858563ffffffff61279316565b61280b613d61565b6040805160c0810182528481528151606081018352600080825260208083018290528451828152808201865293949085019390830191612861565b61284e613d61565b8152602001906001900390816128465790505b509052815260200160006040519080825280602002602001820160405280156128a457816020015b612891613d61565b8152602001906001900390816128895790505b50815260006020820152600260408201526060019290925250919050565b6008101590565b6128d1613d61565b6128d9613d61565b82602001516001846000015103815181106128f057fe5b60209081029190910101518351600019018452915050919050565b80826020015183600001518151811061292057fe5b60209081029190910101525080516001019052565b61293d613d61565b816080015160ff16600214156129575761149a6003611acf565b6113ea826080015160ff16611acf565b6080015160ff161590565b6124b5816117ad565b6080015160ff1660031490565b612990613dfe565b612998613e1d565b6129a0613e1d565b6129a8613dfe565b6129b0613e3b565b60405180610300016040528060018152602001618082815260200167800000000000808a8152602001678000000080008000815260200161808b81526020016380000001815260200167800000008000808181526020016780000000000080098152602001608a81526020016088815260200163800080098152602001638000000a8152602001638000808b815260200167800000000000008b8152602001678000000000008089815260200167800000000000800381526020016780000000000080028152602001678000000000000080815260200161800a815260200167800000008000000a81526020016780000000800080818152602001678000000000008080815260200163800000018152602001678000000080008008815250905060008090505b6018811015613562576080878101516060808a01516040808c01516020808e01518e511890911890921890931889526101208b01516101008c015160e08d015160c08e015160a08f0151181818189089018190526101c08b01516101a08c01516101808d01516101608e01516101408f0151181818189289019283526102608b01516102408c01516102208d01516102008e01516101e08f015118181818918901919091526103008a01516102e08b01516102c08c01516102a08d01516102808e0151181818189288018390526001600160401b0360028202166001603f1b91829004179092188652510485600260200201516002026001600160401b03161785600060200201511884600160200201526001603f1b856003602002015181612bfc57fe5b0485600360200201516002026001600160401b03161785600160200201511884600260200201526001603f1b856004602002015181612c3757fe5b0485600460200201516002026001600160401b03161785600260058110612c5a57fe5b602002015118606085015284516001603f1b9086516060808901519390920460029091026001600160401b031617909118608086810191825286518a5118808b5287516020808d018051909218825289516040808f0180519092189091528a518e8801805190911890528a51948e0180519095189094528901805160a08e0180519091189052805160c08e0180519091189052805160e08e018051909118905280516101008e0180519091189052516101208d018051909118905291880180516101408d018051909118905280516101608d018051909118905280516101808d018051909118905280516101a08d0180519091189052516101c08c018051909118905292870180516101e08c018051909118905280516102008c018051909118905280516102208c018051909118905280516102408c0180519091189052516102608b018051909118905281516102808b018051909118905281516102a08b018051909118905281516102c08b018051909118905281516102e08b018051909118905290516103008a01805190911890529084525163100000009060208901516001600160401b03641000000000909102169190041761010084015260408701516001603d1b9060408901516001600160401b03600890910216919004176101608401526060870151628000009060608901516001600160401b036502000000000090910216919004176102608401526080870151654000000000009060808901516001600160401b036204000090910216919004176102c084015260a08701516001603f1b900487600560200201516002026001600160401b03161783600260198110612ec457fe5b602002015260c08701516210000081046001602c1b9091026001600160401b039081169190911760a085015260e0880151664000000000000081046104009091028216176101a08501526101008801516208000081046520000000000090910282161761020085015261012088015160048082029092166001603e1b909104176103008501526101408801516101408901516001600160401b036001603e1b909102169190041760808401526101608701516001603a1b906101608901516001600160401b036040909102169190041760e084015261018087015162200000906101808901516001600160401b036001602b1b90910216919004176101408401526101a08701516602000000000000906101a08901516001600160401b0361800090910216919004176102408401526101c08701516008906101c08901516001600160401b036001603d1b90910216919004176102a08401526101e0870151641000000000906101e08901516001600160401b03631000000090910216919004176020840152610200808801516102008901516001600160401b0366800000000000009091021691900417610120840152610220870151648000000000906102208901516001600160401b03630200000090910216919004176101808401526102408701516001602b1b906102408901516001600160401b036220000090910216919004176101e0840152610260870151610100906102608901516001600160401b03600160381b90910216919004176102e0840152610280870151642000000000906102808901516001600160401b036308000000909102169190041760608401526102a08701516001602c1b906102a08901516001600160401b0362100000909102169190041760c08401526102c08701516302000000906102c08901516001600160401b0364800000000090910216919004176101c08401526102e0870151600160381b906102e08901516001600160401b036101009091021691900417610220840152610300870151660400000000000090048760186020020151614000026001600160401b031617836014602002015282600a602002015183600560200201511916836000602002015118876000602002015282600b602002015183600660200201511916836001602002015118876001602002015282600c602002015183600760200201511916836002602002015118876002602002015282600d602002015183600860200201511916836003602002015118876003602002015282600e602002015183600960200201511916836004602002015118876004602002015282600f602002015183600a602002015119168360056020020151188760056020020152826010602002015183600b602002015119168360066020020151188760066020020152826011602002015183600c602002015119168360076020020151188760076020020152826012602002015183600d602002015119168360086020020151188760086020020152826013602002015183600e602002015119168360096020020151188760096020020152826014602002015183600f6020020151191683600a60200201511887600a602002015282601560200201518360106020020151191683600b60200201511887600b602002015282601660200201518360116020020151191683600c60200201511887600c602002015282601760200201518360126020020151191683600d60200201511887600d602002015282601860200201518360136020020151191683600e60200201511887600e602002015282600060200201518360146020020151191683600f60200201511887600f602002015282600160200201518360156020020151191683601060200201511887601060200201528260026020020151836016602002015119168360116020020151188760116020020152826003602002015183601760200201511916836012602002015118876012602002015282600460200201518360186020020151191683601360200201511887601360200201528260056020020151836000602002015119168360146020020151188760146020020152826006602002015183600160200201511916836015602002015118876015602002015282600760200201518360026020020151191683601660200201511887601660200201528260086020020151836003602002015119168360176020020151188760176020020152826009602002015183600460200201511916836018602002015118876018602002015281816018811061355057fe5b60200201518751188752600101612ad7565b509495945050505050565b6000613577613e5a565b50604080516108008101825263428a2f9881526371374491602082015263b5c0fbcf9181019190915263e9b5dba56060820152633956c25b60808201526359f111f160a082015263923f82a460c082015263ab1c5ed560e082015263d807aa986101008201526312835b0161012082015263243185be61014082015263550c7dc36101608201526372be5d746101808201526380deb1fe6101a0820152639bdc06a76101c082015263c19bf1746101e082015263e49b69c161020082015263efbe4786610220820152630fc19dc661024082015263240ca1cc610260820152632de92c6f610280820152634a7484aa6102a0820152635cb0a9dc6102c08201526376f988da6102e082015263983e515261030082015263a831c66d61032082015263b00327c861034082015263bf597fc761036082015263c6e00bf361038082015263d5a791476103a08201526306ca63516103c082015263142929676103e08201526327b70a85610400820152632e1b2138610420820152634d2c6dfc6104408201526353380d1361046082015263650a735461048082015263766a0abb6104a08201526381c2c92e6104c08201526392722c856104e082015263a2bfe8a161050082015263a81a664b61052082015263c24b8b7061054082015263c76c51a361056082015263d192e81961058082015263d69906246105a082015263f40e35856105c082015263106aa0706105e08201526319a4c116610600820152631e376c08610620820152632748774c6106408201526334b0bcb561066082015263391c0cb3610680820152634ed8aa4a6106a0820152635b9cca4f6106c082015263682e6ff36106e082015263748f82ee6107008201526378a5636f6107208201526384c87814610740820152638cc702086107608201526390befffa61078082015263a4506ceb6107a082015263bef9a3f76107c082015263c67178f26107e0820152613842613e5a565b60005b60088163ffffffff1610156138cf5763ffffffff6020820260e003168660006020020151901c828263ffffffff166040811061387d57fe5b63ffffffff92831660209182029290920191909152820260e003168660016020020151901c828260080163ffffffff16604081106138b757fe5b63ffffffff9092166020929092020152600101613845565b5060106000805b60408363ffffffff161015613a2b57600384600f850363ffffffff16604081106138fc57fe5b602002015163ffffffff16901c61392d85600f860363ffffffff166040811061392157fe5b60200201516012613c8a565b61395186600f870363ffffffff166040811061394557fe5b60200201516007613c8a565b18189150600a846002850363ffffffff166040811061396c57fe5b602002015163ffffffff16901c61399d856002860363ffffffff166040811061399157fe5b60200201516013613c8a565b6139c1866002870363ffffffff16604081106139b557fe5b60200201516011613c8a565b1818905080846007850363ffffffff16604081106139db57fe5b602002015183866010870363ffffffff16604081106139f657fe5b6020020151010101848463ffffffff1660408110613a1057fe5b63ffffffff90921660209290920201526001909201916138d6565b613a33613e79565b600093505b60088463ffffffff161015613a84578360200260e00363ffffffff1688901c818563ffffffff1660088110613a6957fe5b63ffffffff9092166020929092020152600190930192613a38565b60008060008096505b60408763ffffffff161015613bd9576080840151613aac906019613c8a565b6080850151613abc90600b613c8a565b6080860151613acc906006613c8a565b18189450878763ffffffff1660408110613ae257fe5b6020020151898863ffffffff1660408110613af957fe5b6020020151608086015160a087015160c0880151613b18929190613ca8565b878760076020020151010101019250613b3984600060200201516016613c8a565b8451613b4690600d613c8a565b8551613b53906002613c8a565b6040870180516020890180518a5160c08c01805163ffffffff90811660e08f015260a08e018051821690925260808e018051821690925260608e0180518e01821690925280861690915280831690955284811690925280831891909116911618929091189290921881810186810190931687526001999099019897509092509050613a8d565b600096505b60088763ffffffff161015613c2d578660200260e00363ffffffff168b901c848863ffffffff1660088110613c0f57fe5b60200201805163ffffffff9201919091169052600190960195613bde565b60008097505b60088863ffffffff161015613c7a578760200260e00363ffffffff16858963ffffffff1660088110613c6157fe5b602002015160019099019863ffffffff16901b17613c33565b9c9b505050505050505050505050565b63ffffffff9182166020829003831681901b919092169190911c1790565b82191691161890565b60405180608001604052806004906020820280368337509192915050565b604080516102008101825260008082526020820152908101613cef613d9e565b8152602001613cfc613d9e565b81526000602082018190526040820181905260608201819052608082015260a001613d25613e98565b8152602001613d32613e98565b81526000602082018190526040820181905260608083018190526080830182905260a083015260c09091015290565b6040518060c0016040528060008152602001613d7b613eb2565b815260606020820181905260006040830181905290820181905260809091015290565b6040805161010081019091526000815260208101613dba613d61565b8152602001613dc7613d61565b8152602001613dd4613d61565b8152602001613de1613d61565b81526000602082018190526040820181905260609091015290565bfe5b6040518061032001604052806019906020820280368337509192915050565b6040518060a001604052806005906020820280368337509192915050565b6040518061030001604052806018906020820280368337509192915050565b6040518061080001604052806040906020820280368337509192915050565b6040518061010001604052806008906020820280368337509192915050565b604051806040016040528060008152602001606081525090565b604080516060808201835260008083526020830152918101919091529056fe75736520616e6f7468657220636f6e747261637420746f2068616e646c65206f74686572206f70636f646573a264697066735822122074e0f936aab15684e64b22b37d86a736c114afc88c234f64388750417cad1bc364736f6c634300060b0033", } // OneStepProofHashABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgetestcontracts/RollupCreatorNoProxy.go b/packages/arb-util/ethbridgetestcontracts/RollupCreatorNoProxy.go index 07d15a2021..2b82fc0008 100755 --- a/packages/arb-util/ethbridgetestcontracts/RollupCreatorNoProxy.go +++ b/packages/arb-util/ethbridgetestcontracts/RollupCreatorNoProxy.go @@ -31,7 +31,7 @@ var ( // RollupCreatorNoProxyMetaData contains all meta data concerning the RollupCreatorNoProxy contract. var RollupCreatorNoProxyMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_challengeFactory\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_machineHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_confirmPeriodBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_extraChallengeTimeBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_avmGasSpeedLimitPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_baseStake\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_stakeToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sequencer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelaySeconds\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_extraConfig\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rollupAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contractInbox\",\"name\":\"inbox\",\"type\":\"address\"}],\"name\":\"RollupCreated\",\"type\":\"event\"}]", - Bin: "0x608060405234801561001057600080fd5b50604051620134da380380620134da833981810160405261018081101561003657600080fd5b815160208301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e0180519a519c9e9b9d999c989b979a9699959894979396929591949391820192846401000000008211156100a557600080fd5b9083019060208201858111156100ba57600080fd5b82516401000000008111828201881017156100d457600080fd5b82525081516020918201929091019080838360005b838110156101015781810151838201526020016100e9565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b5060405250505061013d610a9c565b6040518061016001604052808d81526020018c81526020018b81526020018a8152602001898152602001886001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b031681526020018581526020018481526020018381525090506101b6818e6101ba60201b60201c565b5033ff5b60006101c4610b14565b6040516101d090610b49565b604051809103906000f0801580156101ec573d6000803e3d6000fd5b506001600160a01b031660a0820181905260e085015161021591906001600160e01b0361063b16565b8560000186602001876040018860600189608001856001600160a01b03166001600160a01b0316815250856001600160a01b03166001600160a01b0316815250856001600160a01b03166001600160a01b0316815250856001600160a01b03166001600160a01b0316815250856001600160a01b03166001600160a01b031681525050505050508060a001516001600160a01b0316637b6abd9c8560000151604051806080016040528088602001518152602001886040015181526020018860600151815260200188608001518152508760a001518860c001518961014001516040518060c0016040528089600001516001600160a01b03166001600160a01b0316815260200189602001516001600160a01b03166001600160a01b0316815260200189608001516001600160a01b03166001600160a01b0316815260200189606001516001600160a01b03166001600160a01b031681526020018b6001600160a01b03166001600160a01b0316815260200160405161039490610b57565b604051809103906000f0801580156103b0573d6000803e3d6000fd5b506001600160a01b03166001600160a01b031681525060405180604001604052806040516103dd90610b65565b604051809103906000f0801580156103f9573d6000803e3d6000fd5b506001600160a01b03166001600160a01b0316815260200160405161041d90610b73565b604051809103906000f080158015610439573d6000803e3d6000fd5b506001600160a01b031690526040805180820182526101008f015181526101208f0151602082015290516001600160e01b031960e08b901b168152600481018981529060240188608080838360005b838110156104a0578181015183820152602001610488565b5050506001600160a01b03808c169490920193845250881660208301525060408101906060018560c080838360005b838110156104e75781810151838201526020016104cf565b5050505090500184600260200280838360005b838110156105125781810151838201526020016104fa565b5050505090500183600260200280838360005b8381101561053d578181015183820152602001610525565b50505050905001828103825286818151815260200191508051906020019080838360005b83811015610579578181015183820152602001610561565b50505050905090810190601f1680156105a65780820380516001836020036101000a031916815260200191505b509950505050505050505050600060405180830381600087803b1580156105cc57600080fd5b505af11580156105e0573d6000803e3d6000fd5b50505060a082015160408084015181516001600160a01b0393841681529216602083015280517ff2890eb99858b9475308ad4861846ebb89a8f2297267ac42c6efcb12f40f559f9350918290030190a160a001519392505050565b600080600080600061064b610b14565b60405161065790610b81565b604051809103906000f080158015610673573d6000803e3d6000fd5b506001600160a01b0316815260405161068b90610b8f565b604051809103906000f0801580156106a7573d6000803e3d6000fd5b506001600160a01b031660208201526040516106c290610b9d565b604051809103906000f0801580156106de573d6000803e3d6000fd5b506001600160a01b0316604080830191909152516106fb90610bab565b604051809103906000f080158015610717573d6000803e3d6000fd5b506001600160a01b0316606082015260405161073290610bb9565b604051809103906000f08015801561074e573d6000803e3d6000fd5b5081608001906001600160a01b031690816001600160a01b03168152505080600001516001600160a01b0316638129fc1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107ab57600080fd5b505af11580156107bf573d6000803e3d6000fd5b50505050602081015181516040805163c0c53b8b60e01b81526001600160a01b0392831660048201528a831660248201528b831660448201529051919092169163c0c53b8b91606480830192600092919082900301818387803b15801561082557600080fd5b505af1158015610839573d6000803e3d6000fd5b505050506040818101518251825163485cc95560e01b81526001600160a01b0391821660048201526000602482018190529351919092169263485cc955926044808201939182900301818387803b15801561089357600080fd5b505af11580156108a7573d6000803e3d6000fd5b50505050606081015181516040805163485cc95560e01b81526001600160a01b0392831660048201528b831660248201529051919092169163485cc95591604480830192600092919082900301818387803b15801561090557600080fd5b505af1158015610919573d6000803e3d6000fd5b50505050608081015181516040805163485cc95560e01b81526001600160a01b038c8116600483015292831660248201529051919092169163485cc95591604480830192600092919082900301818387803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b50508251604080850151815163722dbe7360e11b81526001600160a01b0391821660048201526001602482015291519216935063e45b7ce6925060448082019260009290919082900301818387803b1580156109e657600080fd5b505af11580156109fa573d6000803e3d6000fd5b5050505080600001516001600160a01b031663f2fde38b896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b158015610a5a57600080fd5b505af1158015610a6e573d6000803e3d6000fd5b50508251602084015160408501516060860151608090960151929d919c509a50939850965091945050505050565b604051806101600160405280600080191681526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001606081525090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b6116a78062000bc883390190565b6119f1806200226f83390190565b61381b8062003c6083390190565b615469806200747b83390190565b6112fe806200c8e483390190565b611e4d806200dbe283390190565b611eb5806200fa2f83390190565b6108b480620118e483390190565b61134280620121988339019056fe608060405234801561001057600080fd5b5060008054600160ff199182168117909255600b80549091169055600c8190556100386100f7565b610089576040805162461bcd60e51b815260206004820152601460248201527f434f4e5354525543544f525f4e4f545f494e4954000000000000000000000000604482015290519081900360640190fd5b506000600c556100a06001600160e01b036100f716565b156100f2576040805162461bcd60e51b815260206004820152601360248201527f494e56414c49445f434f4e5354525543544f5200000000000000000000000000604482015290519081900360640190fd5b6100ff565b600c54151590565b6115998061010e6000396000f3fe6080604052600436106102555760003560e01c80637ba9534a11610139578063d735e21d116100b6578063e4781e101161007a578063e4781e1014610733578063e8bd492214610748578063ef40a670146107b1578063f33e1fac146107e4578063f51de41b1461080e578063f8d1f1941461082357610264565b8063d735e21d146106ca578063d7445bc8146106df578063d93fe9c4146106f4578063dc72a33b14610709578063dff697871461071e57610264565b806395fcea78116100fd57806395fcea781461064c5780639e8a713f14610661578063ce11e6ab14610676578063d01e66021461068b578063d4f43293146106b557610264565b80637ba9534a146105c55780637f4320ce146105da5780638640ce5f146105ef5780638da5cb5b1461060457806391c657e81461061957610264565b80636177fd18116101d257806369fd251c1161019657806369fd251c146104935780636f791d29146104c6578063715ea22b146104db57806376e7e23b146104f0578063771b2f97146105055780637b6abd9c1461051a57610264565b80636177fd18146103d157806362a82d7d1461040457806363721d6b1461042e57806365f7f80d14610443578063662ea47d1461045857610264565b80634f0f4aa9116102195780634f0f4aa91461033f57806351ed6a30146103695780635c975abb1461037e5780635dbaf68b146103a75780635e8ef106146103bc57610264565b80632e7acfa61461026c5780632f30cabd146102935780633e55c0c7146102c65780633e96576e146102f757806345e38b641461032a57610264565b366102645761026261084d565b005b61026261084d565b34801561027857600080fd5b50610281610867565b60408051918252519081900360200190f35b34801561029f57600080fd5b50610281600480360360208110156102b657600080fd5b50356001600160a01b031661086d565b3480156102d257600080fd5b506102db61088c565b604080516001600160a01b039092168252519081900360200190f35b34801561030357600080fd5b506102816004803603602081101561031a57600080fd5b50356001600160a01b031661089b565b34801561033657600080fd5b506102816108b9565b34801561034b57600080fd5b506102db6004803603602081101561036257600080fd5b50356108bf565b34801561037557600080fd5b506102db6108da565b34801561038a57600080fd5b506103936108e9565b604080519115158252519081900360200190f35b3480156103b357600080fd5b506102db6108f3565b3480156103c857600080fd5b50610281610902565b3480156103dd57600080fd5b50610393600480360360208110156103f457600080fd5b50356001600160a01b0316610908565b34801561041057600080fd5b506102db6004803603602081101561042757600080fd5b5035610930565b34801561043a57600080fd5b5061028161095a565b34801561044f57600080fd5b50610281610960565b34801561046457600080fd5b5061046d610966565b604080516001600160a01b03938416815291909216602082015281519081900390910190f35b34801561049f57600080fd5b506102db600480360360208110156104b657600080fd5b50356001600160a01b0316610981565b3480156104d257600080fd5b506103936109a2565b3480156104e757600080fd5b506102db6109ab565b3480156104fc57600080fd5b506102816109d5565b34801561051157600080fd5b506102816109db565b34801561052657600080fd5b50610262600480360361024081101561053e57600080fd5b81359160208101916001600160a01b0360a083013581169260c081013590911691810190610100810160e082013564010000000081111561057e57600080fd5b82018360208201111561059057600080fd5b803590602001918460018302840111640100000000831117156105b257600080fd5b919350915060c0810161010082016109e1565b3480156105d157600080fd5b50610281610fb6565b3480156105e657600080fd5b50610281610fbc565b3480156105fb57600080fd5b50610281610fc2565b34801561061057600080fd5b506102db610fc8565b34801561062557600080fd5b506103936004803603602081101561063c57600080fd5b50356001600160a01b0316610fd7565b34801561065857600080fd5b50610262611031565b34801561066d57600080fd5b506102db611098565b34801561068257600080fd5b506102db6110a7565b34801561069757600080fd5b506102db600480360360208110156106ae57600080fd5b50356110b6565b3480156106c157600080fd5b506102db6110e5565b3480156106d657600080fd5b506102816110f5565b3480156106eb57600080fd5b506102816110fb565b34801561070057600080fd5b506102db611101565b34801561071557600080fd5b50610281611110565b34801561072a57600080fd5b50610281611116565b34801561073f57600080fd5b5061028161111c565b34801561075457600080fd5b5061077b6004803603602081101561076b57600080fd5b50356001600160a01b0316611122565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b3480156107bd57600080fd5b50610281600480360360208110156107d457600080fd5b50356001600160a01b031661115e565b3480156107f057600080fd5b506102816004803603602081101561080757600080fd5b503561117c565b34801561081a57600080fd5b506102db6111a4565b34801561082f57600080fd5b506102816004803603602081101561084657600080fd5b50356111b3565b610855610865565b6108656108606111c5565b6112aa565b565b600c5481565b6001600160a01b0381166000908152600a60205260409020545b919050565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b60185481565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b600b5460ff165b90565b6014546001600160a01b031681565b600e5490565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b60006007828154811061093f57fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b6000806109716110e5565b6109796109ab565b915091509091565b6001600160a01b039081166000908152600860205260409020600301541690565b60005460ff1690565b6000601c6001815481106109bb57fe5b6000918252602090912001546001600160a01b0316905090565b600f5481565b600d5481565b6109e96112ce565b15610a2a576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b610a4d8260005b60200201356001600160a01b03166001600160a01b03166112d6565b610a95576040805162461bcd60e51b8152602060048201526014602482015273119050d15517cc17d393d517d0d3d395149050d560621b604482015290519081900360640190fd5b610aa0826001610a31565b610ae8576040805162461bcd60e51b8152602060048201526014602482015273119050d15517cc57d393d517d0d3d395149050d560621b604482015290519081900360640190fd5b604080516001600160a01b038981166024808401919091528351808403909101815260449092018352602080830180516001600160e01b031663189acdbd60e31b17815293518351600095928801359093169392909182918083835b60208310610b635780518252601f199092019160209182019101610b44565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610bc3576040519150601f19603f3d011682016040523d82523d6000602084013e610bc8565b606091505b5050905080610c10576040805162461bcd60e51b815260206004820152600f60248201526e1190525317d253925517d19050d155608a1b604482015290519081900360640190fd5b6010805485356001600160a01b039081166001600160a01b03199283161792839055601180546020890135831690841617905560128054909216604080890135831691821790935582516319dc7ae560e31b8152600481019190915260016024820152915192169163cee3d7289160448082019260009290919082900301818387803b158015610c9f57600080fd5b505af1158015610cb3573d6000803e3d6000fd5b5050505083600360068110610cc457fe5b601380546001600160a01b0319166001600160a01b0360209390930293909301358216929092179091556010546040805163722dbe7360e11b8152606088013584166004820152600160248201529051919092169163e45b7ce691604480830192600092919082900301818387803b158015610d3f57600080fd5b505af1158015610d53573d6000803e3d6000fd5b50506013546040805163bc49accb60e01b81528d3560048201818152928f0135602483018190526001600160a01b038e81166044850152608060648501908152608485018e90529516965063bc49accb9550909390928d928d928d929160a401848480828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b158015610df257600080fd5b505af1158015610e06573d6000803e3d6000fd5b5050505083600460068110610e1757fe5b601480546001600160a01b03199081166001600160a01b03602094909402949094013583169390931790556015805490921660a08701359091161790556000610e5f8b6112dc565b9050610e6a816113d3565b8935600c556020808b0135600d556040808c0135600e5560608c0135600f55601680546001600160a01b0319166001600160a01b038c811691909117909155604b601855610190601b5560115482516326a407d560e11b8152873560048201529387013560248501529151911691634d480faa91604480830192600092919082900301818387803b158015610efe57600080fd5b505af1158015610f12573d6000803e3d6000fd5b50610f269250601c915086905060026114dc565b50604080518c815290517f4ac0014773275a3dfb58c58539631006301de41998cce7c4f8698d297c88bb2d9181900360200190a1610f626112ce565b610fa9576040805162461bcd60e51b81526020600482015260136024820152721253925512505312569157d393d517d2539255606a1b604482015290519081900360640190fd5b5050505050505050505050565b60035490565b601a5481565b60045490565b6016546001600160a01b031681565b6000805b6009548110156110285760098181548110610ff257fe5b60009182526020909120600290910201546001600160a01b0384811691161415611020576001915050610887565b600101610fdb565b50600092915050565b600061103b611422565b9050336001600160a01b0382161461108b576040805162461bcd60e51b815260206004820152600e60248201526d2727aa2fa32927a6afa0a226a4a760911b604482015290519081900360640190fd5b5060006019819055601a55565b6013546001600160a01b031681565b6012546001600160a01b031681565b6000600982815481106110c557fe5b60009182526020909120600290910201546001600160a01b031692915050565b6000601c6000815481106109bb57fe5b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b6001600160a01b031660009081526008602052604090206002015490565b60006009828154811061118b57fe5b9060005260206000209060020201600101549050919050565b6010546001600160a01b031681565b60009081526006602052604090205490565b6000600436101561120b576040805162461bcd60e51b815260206004820152600b60248201526a4e4f5f46554e435f53494760a81b604482015290519081900360640190fd5b6016546001600160a01b03166000811580159061123057506001600160a01b03821633145b6112415761123c6109ab565b611249565b6112496110e5565b905061125d816001600160a01b03166112d6565b6112a4576040805162461bcd60e51b815260206004820152601360248201527215105491d15517d393d517d0d3d395149050d5606a1b604482015290519081900360640190fd5b91505090565b3660008037600080366000845af43d6000803e8080156112c9573d6000f35b3d6000fd5b600c54151590565b3b151590565b600080611332604051806101200160405280600081526020018581526020016000815260200160008152602001600081526020016000801b81526020016000801b81526020014381526020016001815250611447565b6015546040805163d45ab2b560e01b815260048101849052600060248201819052604482018190526064820181905243608483015291519394506001600160a01b039092169263d45ab2b59260a4808201936020939283900390910190829087803b1580156113a057600080fd5b505af11580156113b4573d6000803e3d6000fd5b505050506040513d60208110156113ca57600080fd5b50519392505050565b6000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc80546001600160a01b0319166001600160a01b03929092169190911790556001600255565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b82805482825590600052602060002090810192821561152f579160200282015b8281111561152f5781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906114fc565b5061153b92915061153f565b5090565b6108f091905b8082111561153b5780546001600160a01b031916815560010161154556fea2646970667358221220a4fb08cdaedf3ae1e8f2f2c5d4f850323faca588c6a5d307b96abc6288d580b264736f6c634300060b0033608060405234801561001057600080fd5b50600060405161001f906100f2565b604051809103906000f08015801561003b573d6000803e3d6000fd5b5090508060405161004b906100ff565b6001600160a01b03909116815260405190819003602001906000f080158015610078573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b03928316178082556040805163f2fde38b60e01b81523360048201529051919093169263f2fde38b92602480830193919282900301818387803b1580156100d457600080fd5b505af11580156100e8573d6000803e3d6000fd5b505050505061010c565b61087b80610ba583390190565b6105d18061142083390190565b610a8a8061011b6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806359659e901461003b578063d45ab2b51461005f575b600080fd5b610043610094565b604080516001600160a01b039092168252519081900360200190f35b610043600480360360a081101561007557600080fd5b50803590602081013590604081013590606081013590608001356100a3565b6000546001600160a01b031681565b6000805460405182916001600160a01b0316906100bf9061018d565b6001600160a01b03909116815260406020820181905260008183018190529051918290036080019190f0801580156100fb573d6000803e3d6000fd5b5060408051632901acdd60e21b8152336004820152602481018a905260448101899052606481018890526084810187905260a4810186905290519192506001600160a01b0383169163a406b3749160c48082019260009290919082900301818387803b15801561016a57600080fd5b505af115801561017e573d6000803e3d6000fd5b50929998505050505050505050565b6108ba8061019b8339019056fe60806040526040516108ba3803806108ba8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e626561636f6e0000000000000000000000008252519081900360140190206000805160206107fa83398151915260001990910114925061012a91505057fe5b61013d82826001600160e01b0361014416565b50506104f3565b610157826102a260201b6100311760201c565b6101925760405162461bcd60e51b815260040180806020018281038252602581526020018061083b6025913960400191505060405180910390fd5b61020a826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ce57600080fd5b505afa1580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b50516102a2602090811b61003117901c565b6102455760405162461bcd60e51b81526004018080602001828103825260348152602001806108866034913960400191505060405180910390fd5b6000805160206107fa83398151915282815581511561029d5761029b6102726001600160e01b036102a816565b8360405180606001604052806021815260200161081a6021913961032460201b6100371760201c565b505b505050565b3b151590565b60006102bb6001600160e01b0361043c16565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d602081101561031d57600080fd5b5051905090565b6060610338846001600160e01b036102a216565b6103735760405162461bcd60e51b81526004018080602001828103825260268152602001806108606026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106103b15780518252601f199092019160209182019101610392565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b5090925090506104308282866001600160e01b0361044f16565b925050505b9392505050565b6000805160206107fa8339815191525490565b6060831561045e575081610435565b82511561046e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b85781810151838201526020016104a0565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f8806105026000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013c565b6101af565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029d6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106100bb5780518252601f19909201916020918201910161009c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101308282866101d3565b925050505b9392505050565b6000610146610277565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101ce573d6000f35b3d6000fd5b606083156101e2575081610135565b8251156101f25782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023c578181015183820152602001610224565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a264697066735822122053dcbd8c0863f6517a5117ac7b858fc300ba6a67685a286f909e85f8150b82c764736f6c634300060b0033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a26469706673582212201c7808e51890d65964007cea1cd560c6393b50bef68af6b3deb91da38a4eeb8364736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff1916600117905561084e8061002d6000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806388d221c6116100ad578063a406b37411610071578063a406b37414610255578063cb23bcb514610299578063d7ff5e35146102bd578063dff69787146102c5578063f0dd77ff146102cd5761012c565b806388d221c6146101f15780639168ae72146101f957806396a9fdc01461021f57806397bdc51014610245578063a0369c141461024d5761012c565b80635b8b2280116100f45780635b8b2280146101a05780636971dfe5146101a85780636f791d29146101c5578063701da98e146101e157806383197ef0146101e95761012c565b80631bc09d0a146101315780632466696e146101505780632edfb42a146101885780633aa1927414610190578063479c925414610198575b600080fd5b61014e6004803603602081101561014757600080fd5b50356102d5565b005b6101766004803603602081101561016657600080fd5b50356001600160a01b0316610333565b60408051918252519081900360200190f35b610176610416565b61014e61041c565b610176610468565b61017661046e565b61014e600480360360208110156101be57600080fd5b5035610474565b6101cd6104c6565b604080519115158252519081900360200190f35b6101766104cf565b61014e6104d5565b61014e61052b565b6101cd6004803603602081101561020f57600080fd5b50356001600160a01b0316610574565b61014e6004803603602081101561023557600080fd5b50356001600160a01b0316610589565b61017661065b565b610176610661565b61014e600480360360c081101561026b57600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a00135610667565b6102a161073a565b604080516001600160a01b039092168252519081900360200190f35b610176610749565b61017661074f565b610176610755565b6009546001600160a01b03163314610322576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b600a5461032e5743600a555b600b55565b6009546000906001600160a01b03163314610383576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604090205460ff16156103e2576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b604482015290519081900360640190fd5b506001600160a01b03166000908152600860205260409020805460ff19166001908117909155600780549091019081905590565b60055481565b600654431015610466576040805162461bcd60e51b815260206004820152601060248201526f10d212531117d513d3d7d49150d1539560821b604482015290519081900360640190fd5b565b60045481565b60025481565b6009546001600160a01b031633146104c1576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b600655565b60005460ff1690565b60015481565b6009546001600160a01b03163314610522576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6104663361075b565b600554431015610466576040805162461bcd60e51b815260206004820152600f60248201526e4245464f52455f444541444c494e4560881b604482015290519081900360640190fd5b60086020526000908152604090205460ff1681565b6009546001600160a01b031633146105d6576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6001600160a01b03811660009081526008602052604090205460ff16610630576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b6001600160a01b03166000908152600860205260409020805460ff1916905560078054600019019055565b60035481565b60065481565b6001600160a01b0386166106b0576040805162461bcd60e51b815260206004820152600b60248201526a2927a6262aa82fa0a2222960a91b604482015290519081900360640190fd5b6009546001600160a01b0316156106fd576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0397909716969096179095556001939093556002919091556003556004556005819055600655565b6009546001600160a01b031681565b600a5481565b60075481565b600b5481565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff161561080b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107d05781810151838201526020016107b8565b50505050905090810190601f1680156107fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50806001600160a01b0316fffea26469706673582212203a8c6cd0754ce30fac0a025ae9bf8214862eb7455a8d97511f7a4245f8e3a11f64736f6c634300060b0033608060405234801561001057600080fd5b506040516105d13803806105d18339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100aa16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100a4816001600160e01b036100ae16565b50610124565b3390565b6100c18161011e60201b61034c1760201c565b6100fc5760405162461bcd60e51b815260040180806020018281038252603381526020018061059e6033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b61046b806101336000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610084578063715018a6146100a85780638da5cb5b146100b0578063f2fde38b146100b8575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b03166100de565b005b61008c610180565b604080516001600160a01b039092168252519081900360200190f35b61008261018f565b61008c61023b565b610082600480360360208110156100ce57600080fd5b50356001600160a01b031661024a565b6100e6610352565b6001600160a01b03166100f761023b565b6001600160a01b031614610140576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b61014981610356565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001546001600160a01b031690565b610197610352565b6001600160a01b03166101a861023b565b6001600160a01b0316146101f1576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610252610352565b6001600160a01b031661026361023b565b6001600160a01b0316146102ac576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b6001600160a01b0381166102f15760405162461bcd60e51b81526004018080602001828103825260268152602001806103bd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b3390565b61035f8161034c565b61039a5760405162461bcd60e51b81526004018080602001828103825260338152602001806103e36033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e082b44760d7484daad017396b93ce8fb7ce2f11f19db0d8429a61aaedbc6f4564736f6c634300060b00335570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374608060405234801561001057600080fd5b506000805460ff19908116600117909155600b805490911690556137e2806100396000396000f3fe608060405234801561001057600080fd5b506004361061032f5760003560e01c80637c75c298116101b4578063d01e6602116100fa578063e8bd49221161009d578063e8bd492214610b97578063ef40a67014610bf3578063f33e1fac14610c19578063f38c937914610c36578063f51de41b14610d59578063f53f5afa14610d61578063f8d1f19414610e37578063ff204f3b14610e545761032f565b8063d01e660214610b1c578063d735e21d14610b39578063d7445bc814610b41578063d93fe9c414610b49578063dc72a33b14610b51578063dff6978714610b59578063e45b7ce614610b61578063e4781e1014610b8f5761032f565b806391c657e81161016257806391c657e8146107c8578063948d6588146107ee5780639e8a713f1461080b5780639ea28e6514610813578063a3ffb772146108a1578063a5cc82f8146109c4578063ce11e6ab146109e1578063cf47bb84146109e95761032f565b80637c75c298146106bc5780637f4320ce1461075d5780638456cb5914610765578063848bf9181461076d5780638640ce5f1461079b5780638da5cb5b146107a35780639161d535146107ab5761032f565b8063567ca41b1161027957806365f7f80d1161022757806365f7f80d14610597578063661d27221461059f57806369fd251c146106595780636aef131a1461067f5780636f791d291461069c57806376e7e23b146106a4578063771b2f97146106ac5780637ba9534a146106b45761032f565b8063567ca41b146104fa5780635c975abb146105205780635dbaf68b1461053c5780635e8ef106146105445780636177fd181461054c57806362a82d7d1461057257806363721d6b1461058f5761032f565b80632f30cabd116102e15780632f30cabd1461041d5780633e55c0c7146104435780633e96576e146104675780633ea410981461048d57806340b570f4146104aa57806345e38b64146104cd5780634f0f4aa9146104d557806351ed6a30146104f25761032f565b80630397d45814610334578063046f7da21461035c57806306ae58511461036457806313af4035146103815780631f956632146103a757806327035859146103d55780632e7acfa614610403575b600080fd5b61035a6004803603602081101561034a57600080fd5b50356001600160a01b0316610e7a565b005b61035a610eb2565b61035a6004803603602081101561037a57600080fd5b5035610ed6565b61035a6004803603602081101561039757600080fd5b50356001600160a01b0316610ef8565b61035a600480360360408110156103bd57600080fd5b506001600160a01b0381351690602001351515610f30565b61035a600480360360408110156103eb57600080fd5b506001600160a01b0381358116916020013516610fbc565b61040b61104c565b60408051918252519081900360200190f35b61040b6004803603602081101561043357600080fd5b50356001600160a01b0316611052565b61044b611071565b604080516001600160a01b039092168252519081900360200190f35b61040b6004803603602081101561047d57600080fd5b50356001600160a01b0316611080565b61035a600480360360208110156104a357600080fd5b503561109e565b61035a600480360360408110156104c057600080fd5b50803590602001356110c0565b61040b61114a565b61044b600480360360208110156104eb57600080fd5b5035611150565b61044b61116b565b61035a6004803603602081101561051057600080fd5b50356001600160a01b031661117a565b610528611252565b604080519115158252519081900360200190f35b61044b61125b565b61040b61126a565b6105286004803603602081101561056257600080fd5b50356001600160a01b0316611270565b61044b6004803603602081101561058857600080fd5b5035611298565b61040b6112c2565b61040b6112c8565b61035a600480360360608110156105b557600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156105e857600080fd5b8201836020820111156105fa57600080fd5b803590602001918460208302840111600160201b8311171561061b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506112ce945050505050565b61044b6004803603602081101561066f57600080fd5b50356001600160a01b0316611394565b61035a6004803603602081101561069557600080fd5b50356113b5565b6105286113d7565b61040b6113e0565b61040b6113e6565b61040b6113ec565b61035a600480360360208110156106d257600080fd5b810190602081018135600160201b8111156106ec57600080fd5b8201836020820111156106fe57600080fd5b803590602001918460208302840111600160201b8311171561071f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506113f2945050505050565b61040b6114af565b61035a6114b5565b61035a6004803603604081101561078357600080fd5b506001600160a01b03813581169160200135166114d9565b61040b611567565b61044b61156d565b61035a600480360360208110156107c157600080fd5b503561157c565b610528600480360360208110156107de57600080fd5b50356001600160a01b031661159e565b61035a6004803603602081101561080457600080fd5b50356115f8565b61044b61161a565b61035a600480360361026081101561082a57600080fd5b813591602081019160e08201919081019061020081016101e0820135600160201b81111561085757600080fd5b82018360208201111561086957600080fd5b803590602001918460018302840111600160201b8311171561088a57600080fd5b919350915080359060208101359060400135611629565b61035a600480360360408110156108b757600080fd5b810190602081018135600160201b8111156108d157600080fd5b8201836020820111156108e357600080fd5b803590602001918460208302840111600160201b8311171561090457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561095357600080fd5b82018360208201111561096557600080fd5b803590602001918460208302840111600160201b8311171561098657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611889945050505050565b61035a600480360360208110156109da57600080fd5b5035611957565b61044b611979565b61035a600480360360608110156109ff57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610a2957600080fd5b820183602082011115610a3b57600080fd5b803590602001918460208302840111600160201b83111715610a5c57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610aab57600080fd5b820183602082011115610abd57600080fd5b803590602001918460208302840111600160201b83111715610ade57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611988945050505050565b61044b60048036036020811015610b3257600080fd5b5035611acf565b61040b611afe565b61040b611b04565b61044b611b0a565b61040b611b19565b61040b611b1f565b61035a60048036036040811015610b7757600080fd5b506001600160a01b0381351690602001351515611b25565b61040b611bb1565b610bbd60048036036020811015610bad57600080fd5b50356001600160a01b0316611bb7565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b61040b60048036036020811015610c0957600080fd5b50356001600160a01b0316611bf3565b61040b60048036036020811015610c2f57600080fd5b5035611c11565b61035a60048036036040811015610c4c57600080fd5b810190602081018135600160201b811115610c6657600080fd5b820183602082011115610c7857600080fd5b803590602001918460208302840111600160201b83111715610c9957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ce857600080fd5b820183602082011115610cfa57600080fd5b803590602001918460208302840111600160201b83111715610d1b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611c39945050505050565b61044b611e01565b61035a600480360360e0811015610d7757600080fd5b813591602081013591810190606081016040820135600160201b811115610d9d57600080fd5b820183602082011115610daf57600080fd5b803590602001918460018302840111600160201b83111715610dd057600080fd5b919390929091602081019035600160201b811115610ded57600080fd5b820183602082011115610dff57600080fd5b803590602001918460208302840111600160201b83111715610e2057600080fd5b919350915080359060208101359060400135611e10565b61040b60048036036020811015610e4d57600080fd5b5035611eb3565b61035a60048036036020811015610e6a57600080fd5b50356001600160a01b0316611ec5565b601780546001600160a01b0319166001600160a01b038316179055604051600d9060008051602061378d83398151915290600090a250565b610eba611f63565b60405160049060008051602061378d83398151915290600090a2565b600f819055604051600c9060008051602061378d83398151915290600090a250565b601680546001600160a01b0319166001600160a01b03831617905560405160079060008051602061378d83398151915290600090a250565b60115460408051630fcab31960e11b81526001600160a01b038581166004830152841515602483015291519190921691631f95663291604480830192600092919082900301818387803b158015610f8657600080fd5b505af1158015610f9a573d6000803e3d6000fd5b50506040516013925060008051602061378d8339815191529150600090a25050565b81601c600081548110610fcb57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080601c60018154811061100857fe5b6000918252602082200180546001600160a01b0319166001600160a01b03939093169290921790915560405160059160008051602061378d83398151915291a25050565b600c5481565b6001600160a01b0381166000908152600a60205260409020545b919050565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b600c81905560405160099060008051602061378d83398151915290600090a250565b601154604080516326a407d560e11b8152600481018590526024810184905290516001600160a01b0390921691634d480faa9160448082019260009290919082900301818387803b15801561111457600080fd5b505af1158015611128573d6000803e3d6000fd5b5050604051600e925060008051602061378d8339815191529150600090a25050565b60185481565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b6012546001600160a01b03828116911614156111ca576040805162461bcd60e51b815260206004820152600a602482015269086aaa4be9eaaa8849eb60b31b604482015290519081900360640190fd5b601054604080516319dc7ae560e31b81526001600160a01b038481166004830152600060248301819052925193169263cee3d7289260448084019391929182900301818387803b15801561121d57600080fd5b505af1158015611231573d6000803e3d6000fd5b50506040516001925060008051602061378d8339815191529150600090a250565b600b5460ff1690565b6014546001600160a01b031681565b600e5490565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b6000600782815481106112a757fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b604080516337ca261760e01b81526001600160a01b038481166004830190815260248301938452845160448401528451918716936337ca261793879387939291606401906020808601910280838360005b8381101561133757818101518382015260200161131f565b505050509050019350505050600060405180830381600087803b15801561135d57600080fd5b505af1158015611371573d6000803e3d6000fd5b50506040516011925060008051602061378d8339815191529150600090a2505050565b6001600160a01b039081166000908152600860205260409020600301541690565b601b81905560405160109060008051602061378d83398151915290600090a250565b60005460ff1690565b600f5481565b600d5481565b60035490565b6113fa611252565b611442576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60005b81518110156114915761146c82828151811061145d57fe5b60200260200101516000612003565b5061148982828151811061147c57fe5b60200260200101516120d9565b600101611445565b5060405160169060008051602061378d83398151915290600090a250565b601a5481565b6114bd61218d565b60405160039060008051602061378d83398151915290600090a2565b816001600160a01b0316633659cfe6826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561153157600080fd5b505af1158015611545573d6000803e3d6000fd5b50506040516014925060008051602061378d8339815191529150600090a25050565b60045490565b6016546001600160a01b031681565b600d819055604051600a9060008051602061378d83398151915290600090a250565b6000805b6009548110156115ef57600981815481106115b957fe5b60009182526020909120600290910201546001600160a01b03848116911614156115e757600191505061106c565b6001016115a2565b50600092915050565b601881905560405160089060008051602061378d83398151915290600090a250565b6013546001600160a01b031681565b611631611252565b611679576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6116816112c8565b81146116cc576040805162461bcd60e51b815260206004820152601560248201527413d3931657d310551154d517d0d3d3919254935151605a1b604482015290519081900360640190fd5b6116d46136be565b60408051808201909152611807908960026000835b8282101561172a57604080516060818101909252908084028601906003908390839080828437600092019190915250505081526001909101906020016116e9565b50506040805180820190915291508a905060026000835b828210156117825760408051608081810190925290808402860190600490839083908082843760009201919091525050508152600190910190602001611741565b505050508686601160009054906101000a90046001600160a01b03166001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b1580156117d657600080fd5b505afa1580156117ea573d6000803e3d6000fd5b505050506040513d602081101561180057600080fd5b5051612210565b6040805160c081018252848152600c546020820152600e54918101919091526011546001600160a01b039081166060830152601354811660808301526015541660a08201529091506118639082908a908a908a908a908f61225e565b5060405160179060008051602061378d83398151915290600090a2505050505050505050565b80518251146118ce576040805162461bcd60e51b815260206004820152600c60248201526b0aea49e9c8ebe988a9c8ea8960a31b604482015290519081900360640190fd5b60005b8251811015611938578181815181106118e657fe5b6020026020010151601d60008584815181106118fe57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016118d1565b5060405160069060008051602061378d83398151915290600090a25050565b600e819055604051600b9060008051602061378d83398151915290600090a250565b6012546001600160a01b031681565b80518251146119ce576040805162461bcd60e51b815260206004820152600d60248201526c1253959053125117d253941555609a1b604482015290519081900360640190fd5b60408051633b99adf760e01b8152600481019182528351604482015283516001600160a01b03861692633b99adf792869286929182916024820191606401906020808801910280838360005b83811015611a32578181015183820152602001611a1a565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015611a71578181015183820152602001611a59565b50505050905001945050505050600060405180830381600087803b158015611a9857600080fd5b505af1158015611aac573d6000803e3d6000fd5b50506040516012925060008051602061378d8339815191529150600090a2505050565b600060098281548110611ade57fe5b60009182526020909120600290910201546001600160a01b031692915050565b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b6010546040805163722dbe7360e11b81526001600160a01b03858116600483015284151560248301529151919092169163e45b7ce691604480830192600092919082900301818387803b158015611b7b57600080fd5b505af1158015611b8f573d6000803e3d6000fd5b50506040516002925060008051602061378d8339815191529150600090a25050565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b6001600160a01b031660009081526008602052604090206002015490565b600060098281548110611c2057fe5b9060005260206000209060020201600101549050919050565b611c41611252565b611c89576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b8051825114611cce576040805162461bcd60e51b815260206004820152600c60248201526b0aea49e9c8ebe988a9c8ea8960a31b604482015290519081900360640190fd5b60005b8251811015611de2576000611d0c848381518110611ceb57fe5b6020026020010151848481518110611cff57fe5b6020026020010151612918565b90506001600160a01b038116611d58576040805162461bcd60e51b815260206004820152600c60248201526b1393d517d25397d0d210531360a21b604482015290519081900360640190fd5b611d74848381518110611d6757fe5b60200260200101516129de565b611d83838381518110611d6757fe5b806001600160a01b03166214ebe76040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611dbd57600080fd5b505af1158015611dd1573d6000803e3d6000fd5b505060019093019250611cd1915050565b5060405160159060008051602061378d83398151915290600090a25050565b6010546001600160a01b031681565b611e18611252565b611e60576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b601254601354611e8e918b918b918b918b918b918b918b918b918b916001600160a01b039182169116612a08565b60405160189060008051602061378d83398151915290600090a2505050505050505050565b60009081526006602052604090205490565b601280546001600160a01b0319166001600160a01b03838116918217909255601054604080516319dc7ae560e31b81526004810193909352600160248401525192169163cee3d7289160448082019260009290919082900301818387803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b50506040516000925060008051602061378d83398151915291508290a250565b611f6b611252565b611fb3576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611fe6612cd9565b604080516001600160a01b039092168252519081900360200190a1565b6001600160a01b0382166000908152600860205260408120600281015480841115612068576040805162461bcd60e51b815260206004820152601060248201526f544f4f5f4c4954544c455f5354414b4560801b604482015290519081900360640190fd5b600061207a828663ffffffff612cdd16565b60028401869055905061208d8682612d3a565b604080518381526020810187905281516001600160a01b038916927febd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6928290030190a295945050505050565b6001600160a01b0381811660008181526008602090815260408083208151808301909252938152600180850154928201928352600980549182018155909352517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af600290930292830180546001600160a01b031916919095161790935591517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b09092019190915561218982612dc5565b5050565b612195611252565b156121da576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611fe6612cd9565b6122186136be565b60408051808201909152865186518291612233918888612eeb565b8152602001612252886001602002015188600160200201514387612eeb565b90529695505050505050565b60006122686136e3565b61227189612f89565b60e0820152835161228190611150565b81606001906001600160a01b031690816001600160a01b03168152505083606001516001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b1580156122db57600080fd5b505afa1580156122ef573d6000803e3d6000fd5b505050506040513d602081101561230557600080fd5b5051815260608101516040805163380ed4c760e11b815290516001600160a01b039092169163701da98e91600480820192602092909190829003018186803b15801561235057600080fd5b505afa158015612364573d6000803e3d6000fd5b505050506040513d602081101561237a57600080fd5b5051895161238790612fab565b146123cb576040805162461bcd60e51b815260206004820152600f60248201526e0a0a48aacbea6a882a88abe9082a69608b1b604482015290519081900360640190fd5b805160208a015160400151111561241a576040805162461bcd60e51b815260206004820152600e60248201526d12539093d617d41054d517d1539160921b604482015290519081900360640190fd5b83606001516001600160a01b031663dc1b7b1f87878c60200151604001516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604080518083038186803b15801561249d57600080fd5b505afa1580156124b1573d6000803e3d6000fd5b505050506040513d60408110156124c757600080fd5b5080516020909101516101208301526101008201526124e589613040565b81604001818152505061250a84604001518260e0015186602001518460600151613071565b8160c0018181525050600081606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255257600080fd5b505afa158015612566573d6000803e3d6000fd5b505050506040513d602081101561257c57600080fd5b50511160a0820181905215612606576125fc81606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125cb57600080fd5b505afa1580156125df573d6000803e3d6000fd5b505050506040513d60208110156125f557600080fd5b5051611eb3565b6080820152612617565b835161261190611eb3565b60808201525b8360a001516001600160a01b031663d45ab2b56126378b60200151612fab565b6126468c8560400151436131f7565b61264f8d613214565b88600001518660c001516040518663ffffffff1660e01b81526004018086815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b1580156126ab57600080fd5b505af11580156126bf573d6000803e3d6000fd5b505050506040513d60208110156126d557600080fd5b50516001600160a01b0316602082015260006126ef6113ec565b600101905081606001516001600160a01b0316631bc09d0a826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561273e57600080fd5b505af1158015612752573d6000803e3d6000fd5b505050506127738260a0015183608001518460400151856101200151613244565b92508383146127c0576040805162461bcd60e51b81526020600482015260146024820152730aa9c8ab0a08a86a88a88be9c9e888abe9082a6960631b604482015290519081900360640190fd5b6127ce8260200151846132ab565b6080850151855160c084015160408051638b8ca19960e01b81526004810186905260248101939093526044830191909152336064830152516001600160a01b0390921691638b8ca1999160848082019260009290919082900301818387803b15801561283957600080fd5b505af115801561284d573d6000803e3d6000fd5b505050505061285f8460000151611eb3565b6128676113ec565b7f8016306209aff73e79f274cf38a41928996f746e2953111902e1f55be1713a5484846040015185600001518661010001518761012001518f8f6040518088815260200187815260200186815260200185815260200184815260200183600260600280828437600083820152601f01601f191690910190508261010080828437600083820152604051601f909101601f1916909201829003995090975050505050505050a350979650505050505050565b6001600160a01b03808316600090815260086020526040808220848416835290822060038201549293919290911680612982576040805162461bcd60e51b81526020600482015260076024820152661393d7d0d2105360ca1b604482015290519081900360640190fd5b60038201546001600160a01b038281169116146129d5576040805162461bcd60e51b815260206004820152600c60248201526b1112519197d25397d0d2105360a21b604482015290519081900360640190fd5b95945050505050565b6001600160a01b0316600090815260086020526040902060030180546001600160a01b0319169055565b6000612a898a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508d6132f5565b90506000612a968d611150565b9050612aa58c83888a896133f6565b816001600160a01b03166397bdc5106040518163ffffffff1660e01b815260040160206040518083038186803b158015612ade57600080fd5b505afa158015612af2573d6000803e3d6000fd5b505050506040513d6020811015612b0857600080fd5b505114612b4b576040805162461bcd60e51b815260206004820152600c60248201526b434f4e4649524d5f4441544160a01b604482015290519081900360640190fd5b836001600160a01b0316630c7268478c8c8c8c6040518563ffffffff1660e01b81526004018080602001806020018381038352878782818152602001925080828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b158015612bed57600080fd5b505af1158015612c01573d6000803e3d6000fd5b50505050612c1060015461343d565b60018d81558d01600255604080516316b9109b60e01b8152600481018f905290516001600160a01b038516916316b9109b91602480830192600092919082900301818387803b158015612c6257600080fd5b505af1158015612c76573d6000803e3d6000fd5b505050508c7f2400bd6e429cfcd98fe43a75bbbe4702c59c99d636100690130cc1ebb611c5a2838989896040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050505050505050565b3390565b600082821115612d34576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b0382166000908152600a602052604081205490612d64828463ffffffff6134bf16565b6001600160a01b0385166000818152600a60209081526040918290208490558151868152908101849052815193945091927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae29281900390910190a250505050565b6001600160a01b03811660009081526008602052604090208054600780546000198101908110612df157fe5b600091825260209091200154600780546001600160a01b039092169183908110612e1757fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806008600060078481548110612e5757fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556007805480612e8757fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03949094168152600890935250506040812081815560018101829055600281019190915560030180546001600160a81b0319169055565b612ef3613737565b604080516101208101825285518152865160208201529081018560016020020151815260200185600260048110612f2657fe5b6020020151815260200185600360048110612f3d57fe5b6020020151815260200186600160038110612f5457fe5b6020020151815260200186600260038110612f6b57fe5b60200201518152602001848152602001838152509050949350505050565b805151602082015151600091612fa5919063ffffffff612cdd16565b92915050565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b80518051602083015151600092612fa592918290039061305f90613520565b61306c8660200151613520565b613555565b6000806130a58661309961308c82600163ffffffff612cdd16565b889063ffffffff6134bf16565b9063ffffffff61359316565b9050613134816131286130be438863ffffffff6134bf16565b866001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130f757600080fd5b505afa15801561310b573d6000803e3d6000fd5b505050506040513d602081101561312157600080fd5b50516135fa565b9063ffffffff6134bf16565b91506000836001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561317157600080fd5b505afa158015613185573d6000803e3d6000fd5b505050506040513d602081101561319b57600080fd5b5051905080156131ed576131ea836131b283611150565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130f757600080fd5b92505b5050949350505050565b600061320c8383866020015160400151613610565b949350505050565b805160a09081015160208301519182015160c08301516060840151608090940151600094612fa5949392916133f6565b60008085613253576000613256565b60015b905080858585604051602001808560ff1660ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120915050949350505050565b60038054600101808255600090815260056020908152604080832080546001600160a01b0319166001600160a01b0397909716969096179095559154815260069091529190912055565b81518351600091829184835b838110156133a857600088828151811061331757fe5b60200260200101519050838187011115613367576040805162461bcd60e51b815260206004820152600c60248201526b2220aa20afa7ab22a9292aa760a11b604482015290519081900360640190fd5b6020868b0181018290206040805180840196909652858101919091528051808603820181526060909501905283519301929092209190940193600101613301565b508184146133eb576040805162461bcd60e51b815260206004820152600b60248201526a08882a882be988a9c8ea8960ab1b604482015290519081900360640190fd5b979650505050505050565b60408051602080820197909752808201959095526060850192909252608084019290925260a0808401929092528051808403909201825260c0909201909152805191012090565b60008181526005602052604080822054815163083197ef60e41b815291516001600160a01b03909116926383197ef0926004808201939182900301818387803b15801561348957600080fd5b505af115801561349d573d6000803e3d6000fd5b50505060009182525060056020526040902080546001600160a01b0319169055565b600082820183811015613519576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000612fa58260000151613550846040015185602001518660a0015187606001518860c001518960800151613647565b613692565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b60008082116135e9576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816135f257fe5b049392505050565b60008183116136095781613519565b5090919050565b6040805160208082019590955280820193909352606080840192909252805180840390920182526080909201909152805191012090565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60405180604001604052806136d1613737565b81526020016136de613737565b905290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101200160405280600081526020016000801916815260200160008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152509056feea8787f128d10b2cc0317b0c3960f9ad447f7f6c1ed189db1083ccffd20f456ea26469706673582212205140af610e014fe48ccf2243227e246896e7e89af6d3a7bc0356a4b7de18b84864736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff19908116600117909155600b80549091169055615430806100396000396000f3fe6080604052600436106102eb5760003560e01c80637427be5111610186578063d735e21d116100d7578063edfd03ed11610085578063edfd03ed14610a2b578063ef40a67014610a55578063f31d863f14610a88578063f33e1fac14610b66578063f51de41b14610b90578063f8d1f19414610ba5578063fa7803e614610bcf576102eb565b8063d735e21d14610944578063d7445bc814610959578063d93fe9c41461096e578063dc72a33b14610983578063dff6978714610998578063e4781e10146109ad578063e8bd4922146109c2576102eb565b80638640ce5f116101345780638640ce5f146108605780638da5cb5b1461087557806391c657e81461088a5780639e8a713f146108bd578063c4d66de8146108d2578063ce11e6ab14610905578063d01e66021461091a576102eb565b80637427be511461077657806376e7e23b146107a9578063771b2f97146107be5780637ba9534a146107d35780637e2d2155146107e85780637f4320ce1461081857806381fbc98a1461082d576102eb565b806351ed6a301161024057806363721d6b116101ee57806363721d6b1461068657806365f7f80d1461069b57806367425daf146106b057806369fd251c146106c55780636b94c33b146106f85780636f791d291461072b5780636f7d002614610740576102eb565b806351ed6a30146105b95780635c975abb146105ce5780635dbaf68b146105f75780635e8ef1061461060c5780635f576db6146106215780636177fd181461062957806362a82d7d1461065c576102eb565b80633fe386271161029d5780633fe3862714610437578063414f23fe146104d457806345c5b2c71461050457806345e38b641461052a578063488ed1a91461053f5780634d26732d1461057a5780634f0f4aa91461058f576102eb565b806304a28064146102f05780631e83d30f146103355780632b2af0ab146103615780632e7acfa61461038b5780632f30cabd146103a05780633e55c0c7146103d35780633e96576e14610404575b600080fd5b3480156102fc57600080fd5b506103236004803603602081101561031357600080fd5b50356001600160a01b0316610c0a565b60408051918252519081900360200190f35b34801561034157600080fd5b5061035f6004803603602081101561035857600080fd5b5035610ccb565b005b34801561036d57600080fd5b5061035f6004803603602081101561038457600080fd5b5035610d97565b34801561039757600080fd5b50610323610e33565b3480156103ac57600080fd5b50610323600480360360208110156103c357600080fd5b50356001600160a01b0316610e39565b3480156103df57600080fd5b506103e8610e54565b604080516001600160a01b039092168252519081900360200190f35b34801561041057600080fd5b506103236004803603602081101561042757600080fd5b50356001600160a01b0316610e63565b34801561044357600080fd5b5061035f600480360361024081101561045b57600080fd5b813591602081019160e08201916101e08101359161020082013591908101906102408101610220820135600160201b81111561049657600080fd5b8201836020820111156104a857600080fd5b803590602001918460018302840111600160201b831117156104c957600080fd5b509092509050610e81565b3480156104e057600080fd5b5061035f600480360360408110156104f757600080fd5b50803590602001356112f5565b61035f6004803603602081101561051a57600080fd5b50356001600160a01b0316611554565b34801561053657600080fd5b506103236115fa565b34801561054b57600080fd5b5061035f600480360361014081101561056357600080fd5b50604081016080820160c083016101008401611600565b34801561058657600080fd5b50610323611f29565b34801561059b57600080fd5b506103e8600480360360208110156105b257600080fd5b5035611f4e565b3480156105c557600080fd5b506103e8611f69565b3480156105da57600080fd5b506105e3611f78565b604080519115158252519081900360200190f35b34801561060357600080fd5b506103e8611f81565b34801561061857600080fd5b50610323611f90565b61035f611f96565b34801561063557600080fd5b506105e36004803603602081101561064c57600080fd5b50356001600160a01b031661203d565b34801561066857600080fd5b506103e86004803603602081101561067f57600080fd5b5035612065565b34801561069257600080fd5b5061032361208f565b3480156106a757600080fd5b50610323612095565b3480156106bc57600080fd5b5061035f61209b565b3480156106d157600080fd5b506103e8600480360360208110156106e857600080fd5b50356001600160a01b0316612105565b34801561070457600080fd5b5061035f6004803603602081101561071b57600080fd5b50356001600160a01b0316612126565b34801561073757600080fd5b506105e361257a565b34801561074c57600080fd5b506103236004803603606081101561076357600080fd5b5080359060208101359060400135612583565b34801561078257600080fd5b5061035f6004803603602081101561079957600080fd5b50356001600160a01b031661259a565b3480156107b557600080fd5b50610323612699565b3480156107ca57600080fd5b5061032361269f565b3480156107df57600080fd5b506103236126a5565b3480156107f457600080fd5b5061035f6004803603604081101561080b57600080fd5b50803590602001356126ab565b34801561082457600080fd5b506103236128e8565b34801561083957600080fd5b506103236004803603602081101561085057600080fd5b50356001600160a01b03166128ee565b34801561086c57600080fd5b506103236129d5565b34801561088157600080fd5b506103e86129db565b34801561089657600080fd5b506105e3600480360360208110156108ad57600080fd5b50356001600160a01b03166129ea565b3480156108c957600080fd5b506103e8612a44565b3480156108de57600080fd5b5061035f600480360360208110156108f557600080fd5b50356001600160a01b0316612a53565b34801561091157600080fd5b506103e8612aa2565b34801561092657600080fd5b506103e86004803603602081101561093d57600080fd5b5035612ab1565b34801561095057600080fd5b50610323612ae0565b34801561096557600080fd5b50610323612ae6565b34801561097a57600080fd5b506103e8612aec565b34801561098f57600080fd5b50610323612afb565b3480156109a457600080fd5b50610323612b01565b3480156109b957600080fd5b50610323612b07565b3480156109ce57600080fd5b506109f5600480360360208110156109e557600080fd5b50356001600160a01b0316612b0d565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b348015610a3757600080fd5b5061035f60048036036020811015610a4e57600080fd5b5035612b49565b348015610a6157600080fd5b5061032360048036036020811015610a7857600080fd5b50356001600160a01b0316612c4a565b348015610a9457600080fd5b5061035f600480360360c0811015610aab57600080fd5b81359190810190604081016020820135600160201b811115610acc57600080fd5b820183602082011115610ade57600080fd5b803590602001918460018302840111600160201b83111715610aff57600080fd5b919390929091602081019035600160201b811115610b1c57600080fd5b820183602082011115610b2e57600080fd5b803590602001918460208302840111600160201b83111715610b4f57600080fd5b919350915080359060208101359060400135612c68565b348015610b7257600080fd5b5061032360048036036020811015610b8957600080fd5b5035612fc0565b348015610b9c57600080fd5b506103e8612fe8565b348015610bb157600080fd5b5061032360048036036020811015610bc857600080fd5b5035612ff7565b348015610bdb57600080fd5b5061035f60048036036040811015610bf257600080fd5b506001600160a01b0381358116916020013516613009565b600080610c1561208f565b90506000805b82811015610cc157846001600160a01b0316639168ae72610c3b83612ab1565b6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610c8157600080fd5b505afa158015610c95573d6000803e3d6000fd5b505050506040513d6020811015610cab57600080fd5b505115610cb9576001909101905b600101610c1b565b509150505b919050565b336000908152601d602052604090205460ff16610d1f576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b610d27611f78565b15610d67576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b610d70336130bd565b6000610d7a611f29565b905080821015610d88578091505b610d923383613154565b505050565b610d9f612ae0565b811015610de5576040805162461bcd60e51b815260206004820152600f60248201526e1053149150511657d11150d2511151608a1b604482015290519081900360640190fd5b610ded6126a5565b811115610e30576040805162461bcd60e51b815260206004820152600c60248201526b1113d154d39517d1561254d560a21b604482015290519081900360640190fd5b50565b600c5481565b6001600160a01b03166000908152600a602052604090205490565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b336000908152601d602052604090205460ff16610ed5576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b610edd611f78565b15610f1d576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b610f263361203d565b610f64576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b610f6c6152ac565b6040805180820190915261109f908860026000835b82821015610fc25760408051606081810190925290808402860190600390839083908082843760009201919091525050508152600190910190602001610f81565b505060408051808201909152915089905060026000835b8282101561101a5760408051608081810190925290808402860190600490839083908082843760009201919091525050508152600190910190602001610fd9565b505050508787601160009054906101000a90046001600160a01b03166001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b15801561106e57600080fd5b505afa158015611082573d6000803e3d6000fd5b505050506040513d602081101561109857600080fd5b505161321a565b805160e001519091506000906110bc90439063ffffffff61326816565b9050601854811015611102576040805162461bcd60e51b815260206004820152600a60248201526954494d455f44454c544160b01b604482015290519081900360640190fd5b600061110d836132c5565b9050826000015161010001518360200151604001511015806111425750600e5461113e90839063ffffffff6132e116565b8110155b8061116e5750825160609081015160208501519091015160649161116c919063ffffffff61326816565b145b6111ab576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d350531360ba1b604482015290519081900360640190fd5b82516060908101516020850151909101516064916111cf919063ffffffff61326816565b1115611213576040805162461bcd60e51b815260206004820152600e60248201526d544f4f5f4d414e595f53454e445360901b604482015290519081900360640190fd5b611239600461122d600e54856132e190919063ffffffff16565b9063ffffffff6132e116565b811115611279576040805162461bcd60e51b8152602060048201526009602482015268544f4f5f4c4152474560b81b604482015290519081900360640190fd5b50506112d681888886866040518060c0016040528061129733610e63565b8152600c546020820152600e5460408201526011546001600160a01b039081166060830152601354811660808301526015541660a0909101528e61333a565b506112eb336112e36126a5565b600c546139f4565b5050505050505050565b336000908152601d602052604090205460ff16611349576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b611351611f78565b15611391576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61139a3361203d565b6113d8576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b806113e283612ff7565b14611421576040805162461bcd60e51b815260206004820152600a6024820152694e4f44455f52454f524760b01b604482015290519081900360640190fd5b611429612ae0565b821015801561143f575061143b6126a5565b8211155b611488576040805162461bcd60e51b81526020600482015260156024820152744e4f44455f4e554d5f4f55545f4f465f52414e474560581b604482015290519081900360640190fd5b600061149383611f4e565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ce57600080fd5b505afa1580156114e2573d6000803e3d6000fd5b505050506040513d60208110156114f857600080fd5b505161150333610e63565b14611547576040805162461bcd60e51b815260206004820152600f60248201526e2727aa2fa9aa20a5a2a22fa82922ab60891b604482015290519081900360640190fd5b610d923384600c546139f4565b336000908152601d602052604090205460ff166115a8576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6115b0611f78565b156115f0576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b610e308134613b8d565b60185481565b336000908152601d602052604090205460ff16611654576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61165c611f78565b1561169c576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b60208401358435106116e3576040805162461bcd60e51b815260206004820152600b60248201526a2ba927a723afa7a92222a960a91b604482015290519081900360640190fd5b6116eb6126a5565b60208501351115611732576040805162461bcd60e51b815260206004820152600c60248201526b1393d517d41493d413d4d15160a21b604482015290519081900360640190fd5b833561173c612095565b10611782576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d0d3d3919254935151607a1b604482015290519081900360640190fd5b600061179485825b6020020135611f4e565b905060006117a386600161178a565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156117de57600080fd5b505afa1580156117f2573d6000803e3d6000fd5b505050506040513d602081101561180857600080fd5b5051604080516311e7249560e21b815290516001600160a01b0385169163479c9254916004808301926020929190829003018186803b15801561184a57600080fd5b505afa15801561185e573d6000803e3d6000fd5b505050506040513d602081101561187457600080fd5b5051146118b4576040805162461bcd60e51b81526020600482015260096024820152682224a3232fa82922ab60b91b604482015290519081900360640190fd5b6118ce8760005b60200201356001600160a01b03166130bd565b6118d98760016118bb565b604080516348b4573960e11b81526001600160a01b03893581166004830152915191841691639168ae7291602480820192602092909190829003018186803b15801561192457600080fd5b505afa158015611938573d6000803e3d6000fd5b505050506040513d602081101561194e57600080fd5b5051611996576040805162461bcd60e51b815260206004820152601260248201527114d51052d1548c57d393d517d4d51052d15160721b604482015290519081900360640190fd5b604080516348b4573960e11b81526001600160a01b0360208a81013582166004840152925190841692639168ae729260248082019391829003018186803b1580156119e057600080fd5b505afa1580156119f4573d6000803e3d6000fd5b505050506040513d6020811015611a0a57600080fd5b5051611a52576040805162461bcd60e51b815260206004820152601260248201527114d51052d1548c97d393d517d4d51052d15160721b604482015290519081900360640190fd5b611a67853585358560005b6020020135613c3c565b826001600160a01b0316635b8b22806040518163ffffffff1660e01b815260040160206040518083038186803b158015611aa057600080fd5b505afa158015611ab4573d6000803e3d6000fd5b505050506040513d6020811015611aca57600080fd5b505114611b0b576040805162461bcd60e51b815260206004820152600a6024820152694348414c5f484153483160b01b604482015290519081900360640190fd5b611b2060208087013590860135856001611a5d565b816001600160a01b0316635b8b22806040518163ffffffff1660e01b815260040160206040518083038186803b158015611b5957600080fd5b505afa158015611b6d573d6000803e3d6000fd5b505050506040513d6020811015611b8357600080fd5b505114611bc4576040805162461bcd60e51b815260206004820152600a60248201526921a420a62fa420a9a41960b11b604482015290519081900360640190fd5b6000611d3e611c61600d54611c5588600060028110611bdf57fe5b6020020135876001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c1d57600080fd5b505afa158015611c31573d6000803e3d6000fd5b505050506040513d6020811015611c4757600080fd5b50519063ffffffff61326816565b9063ffffffff613c7316565b611cce856001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015611c9d57600080fd5b505afa158015611cb1573d6000803e3d6000fd5b505050506040513d6020811015611cc757600080fd5b5051611f4e565b6001600160a01b031663d7ff5e356040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0657600080fd5b505afa158015611d1a573d6000803e3d6000fd5b505050506040513d6020811015611d3057600080fd5b50519063ffffffff613c7316565b90506020850135811015611d7857611d706001600160a01b0389351689600160200201356001600160a01b0316613ccd565b505050611f22565b6014546000906001600160a01b0390811690638ecaab119030908a35908935908e35168e600160200201356001600160a01b0316611dd08d600060028110611dbc57fe5b60200201358a61326890919063ffffffff16565b611dea8e600160200201358b61326890919063ffffffff16565b601154601054604080516001600160e01b031960e08d901b1681526001600160a01b039a8b166004820152602481019990995260448901979097529488166064880152928716608487015260a486019190915260c4850152841660e484015290921661010482015290516101248083019260209291908290030181600087803b158015611e7657600080fd5b505af1158015611e8a573d6000803e3d6000fd5b505050506040513d6020811015611ea057600080fd5b50519050611ec96001600160a01b038a35168a600160200201356001600160a01b031683613d54565b604080516001600160a01b038b35811682526020808d01358216908301528a35828401529151918316917fa5256d19d4ddaf646f4b5c1861b8d4c08238e6356b8ae36dcc49ac67fda758799181900360600190a2505050505b5050505050565b600080611f34612ae0565b9050611f484382611f436126a5565b613d9e565b91505090565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b600b5460ff1690565b6014546001600160a01b031681565b600e5490565b336000908152601d602052604090205460ff16611fea576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b611ff2611f78565b15612032576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61203b34614055565b565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b60006007828154811061207457fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b60006120a5612ae0565b90506120af612095565b811180156120c457506120c06126a5565b8111155b610e30576040805162461bcd60e51b815260206004820152600d60248201526c1393d7d553949154d3d3159151609a1b604482015290519081900360640190fd5b6001600160a01b039081166000908152600860205260409020600301541690565b336000908152601d602052604090205460ff1661217a576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612182611f78565b156121c2576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b6121ca61209b565b60006121d4612095565b905060006121e0612ae0565b905060006121ed82611f4e565b905082816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561222957600080fd5b505afa15801561223d573d6000803e3d6000fd5b505050506040513d602081101561225357600080fd5b505114156124dc576122648461203d565b6122a2576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b6122b36122ae85610e63565b610d97565b806001600160a01b0316639168ae72856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561230957600080fd5b505afa15801561231d573d6000803e3d6000fd5b505050506040513d602081101561233357600080fd5b50511561237a576040805162461bcd60e51b815260206004820152601060248201526f14d51052d15117d3d397d5105491d15560821b604482015290519081900360640190fd5b806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b1580156123b357600080fd5b505afa1580156123c7573d6000803e3d6000fd5b505050506123d483611f4e565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b15801561240c57600080fd5b505afa158015612420573d6000803e3d6000fd5b5050505061242e6000612b49565b61243781610c0a565b816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b15801561247057600080fd5b505afa158015612484573d6000803e3d6000fd5b505050506040513d602081101561249a57600080fd5b5051146124dc576040805162461bcd60e51b815260206004820152600b60248201526a4841535f5354414b45525360a81b604482015290519081900360640190fd5b6124e4614261565b60135460408051630c2a09ad60e21b81526004810185905290516001600160a01b03909216916330a826b49160248082019260009290919082900301818387803b15801561253157600080fd5b505af1158015612545573d6000803e3d6000fd5b50506040518492507f9f7eee12f08e41a1d1a617e76576aa2d6a1e06dbdd72d817e62b6e8dfdebe2a39150600090a250505050565b60005460ff1690565b6000612590848484613d9e565b90505b9392505050565b336000908152601d602052604090205460ff166125ee576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6125f6611f78565b15612636576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61263e612095565b61264782610e63565b1115612687576040805162461bcd60e51b815260206004820152600a6024820152691513d3d7d49150d1539560b21b604482015290519081900360640190fd5b612690816130bd565b610e3081614277565b600f5481565b600d5481565b60035490565b336000908152601d602052604090205460ff166126ff576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612707611f78565b15612747576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61274f61208f565b821115612794576040805162461bcd60e51b815260206004820152600e60248201526d4e4f5f535543485f5a4f4d42494560901b604482015290519081900360640190fd5b600061279f83612ab1565b905060006127ac84612fc0565b90506000806127b9612ae0565b90505b8083101580156127cb57508482105b156128c05760006127db84611f4e565b9050806001600160a01b03166396a9fdc0866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561283557600080fd5b505af1158015612849573d6000803e3d6000fd5b50505050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561288657600080fd5b505afa15801561289a573d6000803e3d6000fd5b505050506040513d60208110156128b057600080fd5b50519350506001909101906127bc565b808310156128d6576128d1866142dd565b6128e0565b6128e08684614379565b505050505050565b601a5481565b336000908152601d602052604081205460ff16612942576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61294a611f78565b1561298a576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b6000612995336143a0565b6040519091506001600160a01b0384169082156108fc029083906000818181858888f193505050501580156129ce573d6000803e3d6000fd5b5092915050565b60045490565b6016546001600160a01b031681565b6000805b600954811015612a3b5760098181548110612a0557fe5b60009182526020909120600290910201546001600160a01b0384811691161415612a33576001915050610cc6565b6001016129ee565b50600092915050565b6013546001600160a01b031681565b6001600160a01b03811615610e30576040805162461bcd60e51b815260206004820152601060248201526f1393d7d513d2d15397d0531313d5d15160821b604482015290519081900360640190fd5b6012546001600160a01b031681565b600060098281548110612ac057fe5b60009182526020909120600290910201546001600160a01b031692915050565b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b336000908152601d602052604090205460ff16612b9d576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612ba5611f78565b15612be5576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b6000612bef61208f565b90506000612bfb612ae0565b9050825b82811015612c44575b81612c1282612fc0565b1015612c3c57612c21816142dd565b60001990920191828110612c3757505050610e30565b612c08565b600101612bff565b50505050565b6001600160a01b031660009081526008602052604090206002015490565b336000908152601d602052604090205460ff16612cbc576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612cc4611f78565b15612d04576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b612d0c61209b565b6000612d16612b01565b11612d55576040805162461bcd60e51b815260206004820152600a6024820152694e4f5f5354414b45525360b01b604482015290519081900360640190fd5b6000612d67612d62612ae0565b611f4e565b9050806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b158015612da257600080fd5b505afa158015612db6573d6000803e3d6000fd5b50505050612dc2612095565b816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015612dfb57600080fd5b505afa158015612e0f573d6000803e3d6000fd5b505050506040513d6020811015612e2557600080fd5b505114612e68576040805162461bcd60e51b815260206004820152600c60248201526b24a72b20a624a22fa82922ab60a11b604482015290519081900360640190fd5b612e73612d62612095565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b158015612eab57600080fd5b505afa158015612ebf573d6000803e3d6000fd5b50505050612ecd6000612b49565b612ee1612ed982610c0a565b611c55612b01565b816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b158015612f1a57600080fd5b505afa158015612f2e573d6000803e3d6000fd5b505050506040513d6020811015612f4457600080fd5b505114612f89576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d0531317d4d51052d15160921b604482015290519081900360640190fd5b601254601354612fb5918b918b918b918b918b918b918b918b916001600160a01b039081169116614403565b505050505050505050565b600060098281548110612fcf57fe5b9060005260206000209060020201600101549050919050565b6010546001600160a01b031681565b60009081526006602052604090205490565b613011611f78565b15613051576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b61305b8282614424565b6001600160a01b0316336001600160a01b0316146130af576040805162461bcd60e51b815260206004820152600c60248201526b2ba927a723afa9a2a72222a960a11b604482015290519081900360640190fd5b6130b98282613ccd565b5050565b6130c68161203d565b613104576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b600061310f82612105565b6001600160a01b031614610e30576040805162461bcd60e51b8152602060048201526007602482015266125397d0d2105360ca1b604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604081206002810154808411156131b9576040805162461bcd60e51b815260206004820152601060248201526f544f4f5f4c4954544c455f5354414b4560801b604482015290519081900360640190fd5b60006131cb828663ffffffff61326816565b6002840186905590506131de86826144ea565b604080518381526020810187905281516001600160a01b0389169260008051602061539a833981519152928290030190a2925050505b92915050565b6132226152ac565b6040805180820190915286518651829161323d918888614575565b815260200161325c886001602002015188600160200201514387614575565b90529695505050505050565b6000828211156132bf576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b805151602082015151600091613214919063ffffffff61326816565b6000826132f057506000613214565b828202828482816132fd57fe5b04146125935760405162461bcd60e51b81526004018080602001828103825260218152602001806153ba6021913960400191505060405180910390fd5b60006133446152d1565b61334d896132c5565b60e0820152835161335d90611f4e565b81606001906001600160a01b031690816001600160a01b03168152505083606001516001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b1580156133b757600080fd5b505afa1580156133cb573d6000803e3d6000fd5b505050506040513d60208110156133e157600080fd5b5051815260608101516040805163380ed4c760e11b815290516001600160a01b039092169163701da98e91600480820192602092909190829003018186803b15801561342c57600080fd5b505afa158015613440573d6000803e3d6000fd5b505050506040513d602081101561345657600080fd5b5051895161346390614613565b146134a7576040805162461bcd60e51b815260206004820152600f60248201526e0a0a48aacbea6a882a88abe9082a69608b1b604482015290519081900360640190fd5b805160208a01516040015111156134f6576040805162461bcd60e51b815260206004820152600e60248201526d12539093d617d41054d517d1539160921b604482015290519081900360640190fd5b83606001516001600160a01b031663dc1b7b1f87878c60200151604001516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604080518083038186803b15801561357957600080fd5b505afa15801561358d573d6000803e3d6000fd5b505050506040513d60408110156135a357600080fd5b5080516020909101516101208301526101008201526135c1896146a8565b8160400181815250506135e684604001518260e00151866020015184606001516146d9565b8160c0018181525050600081606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561362e57600080fd5b505afa158015613642573d6000803e3d6000fd5b505050506040513d602081101561365857600080fd5b50511160a08201819052156136e2576136d881606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136a757600080fd5b505afa1580156136bb573d6000803e3d6000fd5b505050506040513d60208110156136d157600080fd5b5051612ff7565b60808201526136f3565b83516136ed90612ff7565b60808201525b8360a001516001600160a01b031663d45ab2b56137138b60200151614613565b6137228c856040015143614847565b61372b8d61485c565b88600001518660c001516040518663ffffffff1660e01b81526004018086815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561378757600080fd5b505af115801561379b573d6000803e3d6000fd5b505050506040513d60208110156137b157600080fd5b50516001600160a01b0316602082015260006137cb6126a5565b600101905081606001516001600160a01b0316631bc09d0a826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561381a57600080fd5b505af115801561382e573d6000803e3d6000fd5b5050505061384f8260a001518360800151846040015185610120015161488c565b925083831461389c576040805162461bcd60e51b81526020600482015260146024820152730aa9c8ab0a08a86a88a88be9c9e888abe9082a6960631b604482015290519081900360640190fd5b6138aa8260200151846148f3565b6080850151855160c084015160408051638b8ca19960e01b81526004810186905260248101939093526044830191909152336064830152516001600160a01b0390921691638b8ca1999160848082019260009290919082900301818387803b15801561391557600080fd5b505af1158015613929573d6000803e3d6000fd5b505050505061393b8460000151612ff7565b6139436126a5565b7f8016306209aff73e79f274cf38a41928996f746e2953111902e1f55be1713a5484846040015185600001518661010001518761012001518f8f6040518088815260200187815260200186815260200185815260200184815260200183600260600280828437600083820152601f01601f191690910190508261010080828437600083820152604051601f909101601f1916909201829003995090975050505050505050a350979650505050505050565b6001600160a01b0380841660008181526008602090815260408083208784526005835281842054825163123334b760e11b815260048101969096529151909591909116938492632466696e9260248084019382900301818787803b158015613a5b57600080fd5b505af1158015613a6f573d6000803e3d6000fd5b505050506040513d6020811015613a8557600080fd5b505160018085018790559091508114156128e057600060056000846001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015613ad857600080fd5b505afa158015613aec573d6000803e3d6000fd5b505050506040513d6020811015613b0257600080fd5b505181526020810191909152604001600020546001600160a01b0316905080636971dfe5613b36438863ffffffff613c7316565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015613b6c57600080fd5b505af1158015613b80573d6000803e3d6000fd5b5050505050505050505050565b336000908152601d602052604090205460ff16613be1576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b613be9611f78565b15613c29576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b613c32826130bd565b6130b9828261493d565b6040805160208082019590955280820193909352606080840192909252805180840390920182526080909201909152805191012090565b600082820183811015612593576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000613cd882612c4a565b90506000613ce584612c4a565b905080821115613d0c57613d09613cfc8483613154565b839063ffffffff61326816565b91505b60028204613d1a858261493d565b613d2a838263ffffffff61326816565b9250613d35856149b1565b601654613d4b906001600160a01b0316846144ea565b611f22846149db565b6001600160a01b03928316600090815260086020526040808220600390810180549487166001600160a01b0319958616811790915594909516825290209092018054909216179055565b600081600184031415613db45750600f54612593565b6000613dbf84611f4e565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b158015613df757600080fd5b505afa158015613e0b573d6000803e3d6000fd5b505050506040513d6020811015613e2157600080fd5b5051905080851015613e37575050600f54612593565b613e3f615325565b506040805161014081018252600181526201e05b60208201526201f7d191810191909152620138916060820152620329e160808201526201be4360a08201526204cb8c60c08201526201fbc460e082015262036d3261010082015262027973610120820152613eac615325565b506040805161014081018252600181526201c03060208201526201b6999181019190915261fde26060820152620265c6608082015262013b8e60a0820152620329e160c08201526201389160e08201526201f7d1610100820152620153756101208201526000613f22888563ffffffff61326816565b90506000613f4c600c54613f40600a856132e190919063ffffffff16565b9063ffffffff614a8b16565b905060ff613f6182600a63ffffffff614a8b16565b10613f755760001995505050505050612593565b6000613f8882600a63ffffffff614a8b16565b60020a9050600085600a8406600a8110613f9e57fe5b602002015162ffffff168202905085600a8406600a8110613fbb57fe5b602002015162ffffff16828281613fce57fe5b0414613fe557600019975050505050505050612593565b600061401086600a8606600a8110613ff957fe5b6020020151839062ffffff1663ffffffff614a8b16565b90508061401b575060015b600f54808202908290828161402c57fe5b0414614045576000199950505050505050505050612593565b9c9b505050505050505050505050565b336000908152601d602052604090205460ff166140a9576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6140b1611f78565b156140f1576040805162461bcd60e51b815260206004820152601060248201526000805160206153db833981519152604482015290519081900360640190fd5b6140fa3361203d565b1561413d576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b604482015290519081900360640190fd5b614146336129ea565b1561418b576040805162461bcd60e51b815260206004820152601060248201526f5354414b45525f49535f5a4f4d42494560801b604482015290519081900360640190fd5b614193611f29565b8110156141da576040805162461bcd60e51b815260206004820152601060248201526f4e4f545f454e4f5547485f5354414b4560801b604482015290519081900360640190fd5b6141e43382614af2565b6013546001600160a01b031663f03c04a5336141fe612095565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561424d57600080fd5b505af1158015611f22573d6000803e3d6000fd5b61426c600254614beb565b600280546001019055565b6001600160a01b0381166000908152600860205260409020600281015461429e83826144ea565b6142a783614c6d565b604080518281526000602082015281516001600160a01b0386169260008051602061539a833981519152928290030190a2505050565b6009805460001981019081106142ef57fe5b90600052602060002090600202016009828154811061430a57fe5b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b03909216919091178155600191820154910155600980548061434d57fe5b60008281526020812060026000199093019283020180546001600160a01b031916815560010155905550565b806009838154811061438757fe5b9060005260206000209060020201600101819055505050565b6001600160a01b0381166000818152600a60209081526040808320805490849055815181815292830184905281519394909390927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae292908290030190a292915050565b6144186002548b8b8b8b8b8b8b8b8b8b614d93565b50505050505050505050565b6001600160a01b0380831660009081526008602052604080822084841683529082206003820154929391929091168061448e576040805162461bcd60e51b81526020600482015260076024820152661393d7d0d2105360ca1b604482015290519081900360640190fd5b60038201546001600160a01b038281169116146144e1576040805162461bcd60e51b815260206004820152600c60248201526b1112519197d25397d0d2105360a21b604482015290519081900360640190fd5b95945050505050565b6001600160a01b0382166000908152600a602052604081205490614514828463ffffffff613c7316565b6001600160a01b0385166000818152600a60209081526040918290208490558151868152908101849052815193945091927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae29281900390910190a250505050565b61457d615344565b6040805161012081018252855181528651602082015290810185600160200201518152602001856002600481106145b057fe5b60200201518152602001856003600481106145c757fe5b60200201518152602001866001600381106145de57fe5b60200201518152602001866002600381106145f557fe5b60200201518152602001848152602001838152509050949350505050565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b805180516020830151516000926132149291829003906146c790615064565b6146d48660200151615064565b615099565b60008061470186613f406146f482600163ffffffff61326816565b889063ffffffff613c7316565b905061478481611c5561471a438863ffffffff613c7316565b866001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561475357600080fd5b505afa158015614767573d6000803e3d6000fd5b505050506040513d602081101561477d57600080fd5b50516150d7565b91506000836001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156147c157600080fd5b505afa1580156147d5573d6000803e3d6000fd5b505050506040513d60208110156147eb57600080fd5b50519050801561483d5761483a8361480283611f4e565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561475357600080fd5b92505b5050949350505050565b60006125908383866020015160400151613c3c565b805160a09081015160208301519182015160c08301516060840151608090940151600094613214949392916150ed565b6000808561489b57600061489e565b60015b905080858585604051602001808560ff1660ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120915050949350505050565b60038054600101808255600090815260056020908152604080832080546001600160a01b0319166001600160a01b0397909716969096179095559154815260069091529190912055565b6001600160a01b03821660009081526008602052604081206002810154909161496c828563ffffffff613c7316565b60028401819055604080518481526020810183905281519293506001600160a01b0388169260008051602061539a833981519152929181900390910190a25050505050565b6001600160a01b0316600090815260086020526040902060030180546001600160a01b0319169055565b6001600160a01b0381811660008181526008602090815260408083208151808301909252938152600180850154928201928352600980549182018155909352517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af600290930292830180546001600160a01b031916919095161790935591517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b0909201919091556130b982614c6d565b6000808211614ae1576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381614aea57fe5b049392505050565b6007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688810180546001600160a01b038087166001600160a01b031992831681179093556040805160a081018252858152865460208281019182528284018a8152600060608501818152608086018c81528a8352600885528783209651875594519b86019b909b559051600285015598516003909301805492511515600160a01b0260ff60a01b199490961692909616919091179190911692909217909255436004558151948552840185905280519293919260008051602061539a8339815191529281900390910190a2505050565b60008181526005602052604080822054815163083197ef60e41b815291516001600160a01b03909116926383197ef0926004808201939182900301818387803b158015614c3757600080fd5b505af1158015614c4b573d6000803e3d6000fd5b50505060009182525060056020526040902080546001600160a01b0319169055565b6001600160a01b03811660009081526008602052604090208054600780546000198101908110614c9957fe5b600091825260209091200154600780546001600160a01b039092169183908110614cbf57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806008600060078481548110614cff57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556007805480614d2f57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03949094168152600890935250506040812081815560018101829055600281019190915560030180546001600160a81b0319169055565b6000614e148a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508d615134565b90506000614e218d611f4e565b9050614e308c83888a896150ed565b816001600160a01b03166397bdc5106040518163ffffffff1660e01b815260040160206040518083038186803b158015614e6957600080fd5b505afa158015614e7d573d6000803e3d6000fd5b505050506040513d6020811015614e9357600080fd5b505114614ed6576040805162461bcd60e51b815260206004820152600c60248201526b434f4e4649524d5f4441544160a01b604482015290519081900360640190fd5b836001600160a01b0316630c7268478c8c8c8c6040518563ffffffff1660e01b81526004018080602001806020018381038352878782818152602001925080828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b158015614f7857600080fd5b505af1158015614f8c573d6000803e3d6000fd5b50505050614f9b600154614beb565b60018d81558d01600255604080516316b9109b60e01b8152600481018f905290516001600160a01b038516916316b9109b91602480830192600092919082900301818387803b158015614fed57600080fd5b505af1158015615001573d6000803e3d6000fd5b505050508c7f2400bd6e429cfcd98fe43a75bbbe4702c59c99d636100690130cc1ebb611c5a2838989896040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050505050505050565b60006132148260000151615094846040015185602001518660a0015187606001518860c001518960800151615235565b615280565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b60008183116150e65781612593565b5090919050565b60408051602080820197909752808201959095526060850192909252608084019290925260a0808401929092528051808403909201825260c0909201909152805191012090565b81518351600091829184835b838110156151e757600088828151811061515657fe5b602002602001015190508381870111156151a6576040805162461bcd60e51b815260206004820152600c60248201526b2220aa20afa7ab22a9292aa760a11b604482015290519081900360640190fd5b6020868b0181018290206040805180840196909652858101919091528051808603820181526060909501905283519301929092209190940193600101615140565b5081841461522a576040805162461bcd60e51b815260206004820152600b60248201526a08882a882be988a9c8ea8960ab1b604482015290519081900360640190fd5b979650505050505050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60405180604001604052806152bf615344565b81526020016152cc615344565b905290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101400160405280600a906020820280368337509192915050565b604051806101200160405280600081526020016000801916815260200160008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152509056feebd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775061757361626c653a2070617573656400000000000000000000000000000000a2646970667358221220e1ae834cf4c2451e6f24dd6852c780bafb0ab21a2f7beb14610d7afe643bb8fe64736f6c634300060b0033608060405234801561001057600080fd5b506112de806100206000396000f3fe6080604052600436106100c85760003560e01c8063945e11471161007a578063945e1147146101f75780639e5d4c4914610221578063ab5d894314610336578063c29372de1461034b578063cee3d7281461037e578063d9dd67ab146103b9578063e45b7ce6146103e3578063f2fde38b1461041e576100c8565b806302bbfad1146100cd5780633dbcc8d114610114578063413b35bd14610129578063715018a6146101705780637ee94329146101875780638129fc1c146101cd5780638da5cb5b146101e2575b600080fd5b610102600480360360608110156100e357600080fd5b5060ff813516906001600160a01b036020820135169060400135610451565b60408051918252519081900360200190f35b34801561012057600080fd5b506101026104bf565b34801561013557600080fd5b5061015c6004803603602081101561014c57600080fd5b50356001600160a01b03166104c5565b604080519115158252519081900360200190f35b34801561017c57600080fd5b506101856104e6565b005b34801561019357600080fd5b506101b1600480360360208110156101aa57600080fd5b5035610580565b604080516001600160a01b039092168252519081900360200190f35b3480156101d957600080fd5b506101856105a7565b3480156101ee57600080fd5b506101b1610651565b34801561020357600080fd5b506101b16004803603602081101561021a57600080fd5b5035610660565b34801561022d57600080fd5b506102b36004803603606081101561024457600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561027457600080fd5b82018360208201111561028657600080fd5b803590602001918460018302840111640100000000831117156102a857600080fd5b50909250905061066d565b604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156102fa5781810151838201526020016102e2565b50505050905090810190601f1680156103275780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561034257600080fd5b506101b1610841565b34801561035757600080fd5b5061015c6004803603602081101561036e57600080fd5b50356001600160a01b0316610850565b34801561038a57600080fd5b50610185600480360360408110156103a157600080fd5b506001600160a01b0381351690602001351515610871565b3480156103c557600080fd5b50610102600480360360208110156103dc57600080fd5b5035610aea565b3480156103ef57600080fd5b506101856004803603604081101561040657600080fd5b506001600160a01b0381351690602001351515610b08565b34801561042a57600080fd5b506101856004803603602081101561044157600080fd5b50356001600160a01b0316610d7f565b3360009081526065602052604081206001015460ff166104a9576040805162461bcd60e51b815260206004820152600e60248201526d09c9ea8be8ca49e9abe929c849eb60931b604482015290519081900360640190fd5b6104b7848443423a87610e70565b949350505050565b606a5490565b6001600160a01b031660009081526066602052604090206001015460ff1690565b6104ee610f33565b6001600160a01b03166104ff610651565b6001600160a01b031614610548576040805162461bcd60e51b81526020600482018190526024820152600080516020611269833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b031690600080516020611289833981519152908390a3603380546001600160a01b0319169055565b6067818154811061058d57fe5b6000918252602090912001546001600160a01b0316905081565b600054610100900460ff16806105c057506105c0610f37565b806105ce575060005460ff16155b6106095760405162461bcd60e51b815260040180806020018281038252602e81526020018061123b602e913960400191505060405180910390fd5b600054610100900460ff16158015610634576000805460ff1961ff0019909116610100171660011790555b61063c610f48565b801561064e576000805461ff00191690555b50565b6033546001600160a01b031690565b6068818154811061058d57fe5b3360009081526066602052604081206001015460609060ff166106c9576040805162461bcd60e51b815260206004820152600f60248201526e09c9ea8be8ca49e9abe9eaaa8849eb608b1b604482015290519081900360640190fd5b8215610724576106e1866001600160a01b0316610fe5565b610724576040805162461bcd60e51b815260206004820152600f60248201526e1393d7d0d3d11157d05517d11154d5608a1b604482015290519081900360640190fd5b606980546001600160a01b0319811633179091556040516001600160a01b0391821691881690879087908790808383808284376040519201945060009350909150508083038185875af1925050503d806000811461079e576040519150601f19603f3d011682016040523d82523d6000602084013e6107a3565b606091505b50606980546001600160a01b0319166001600160a01b0385811691909117909155604080518a81526020810182815291810189905293965091945089169133917f2d9d115ef3e4a606d698913b1eae831a3cdfe20d9a83d48007b0526749c3d466918a918a918a9160608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a35094509492505050565b6069546001600160a01b031681565b6001600160a01b031660009081526065602052604090206001015460ff1690565b610879610f33565b6001600160a01b031661088a610651565b6001600160a01b0316146108d3576040805162461bcd60e51b81526020600482018190526024820152600080516020611269833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152606660209081526040918290206001810154835186151581529351919460ff9091169390927f49477e7356dbcb654ab85d7534b50126772d938130d1350e23e2540370c8dffa92918290030190a280801561093a5750825b8061094c57508015801561094c575082155b15610958575050610ae6565b82156109e757604080518082018252606880548252600160208084018281526001600160a01b038a16600081815260669093529582209451855551938201805460ff1916941515949094179093558154908101825591527fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977530180546001600160a01b0319169091179055610ae3565b6068805460001981019081106109f957fe5b6000918252602090912001548254606880546001600160a01b03909316929091908110610a2257fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160000154606660006068856000015481548110610a6a57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556068805480610a9a57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526066905260408120908155600101805460ff191690555b50505b5050565b606a8181548110610af757fe5b600091825260209091200154905081565b610b10610f33565b6001600160a01b0316610b21610651565b6001600160a01b031614610b6a576040805162461bcd60e51b81526020600482018190526024820152600080516020611269833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152606560209081526040918290206001810154835186151581529351919460ff9091169390927f6675ce8882cb71637de5903a193d218cc0544be9c0650cb83e0955f6aa2bf52192918290030190a2808015610bd15750825b80610be3575080158015610be3575082155b15610bef575050610ae6565b8215610c7e57604080518082018252606780548252600160208084018281526001600160a01b038a16600081815260659093529582209451855551938201805460ff1916941515949094179093558154908101825591527f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae0180546001600160a01b0319169091179055610ae3565b606780546000198101908110610c9057fe5b6000918252602090912001548254606780546001600160a01b03909316929091908110610cb957fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160000154606560006067856000015481548110610d0157fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556067805480610d3157fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526065905260408120908155600101805460ff1916905550505050565b610d87610f33565b6001600160a01b0316610d98610651565b6001600160a01b031614610de1576040805162461bcd60e51b81526020600482018190526024820152600080516020611269833981519152604482015290519081900360640190fd5b6001600160a01b038116610e265760405162461bcd60e51b81526004018080602001828103825260268152602001806112156026913960400191505060405180910390fd5b6033546040516001600160a01b0380841692169060008051602061128983398151915290600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b606a5460009081610e8689898989868a8a610feb565b905060008215610eae57606a6001840381548110610ea057fe5b906000526020600020015490505b606a610eba8284611061565b8154600181018355600092835260209283902001556040805133815260ff8d16928101929092526001600160a01b038b16828201526060820187905251829185917f23be8e12e420b5da9fb98d8102572f640fb3c11a0085060472dfc0ed194b3cf79181900360800190a3509098975050505050505050565b3390565b6000610f4230610fe5565b15905090565b600054610100900460ff1680610f615750610f61610f37565b80610f6f575060005460ff16155b610faa5760405162461bcd60e51b815260040180806020018281038252602e81526020018061123b602e913960400191505060405180910390fd5b600054610100900460ff16158015610fd5576000805460ff1961ff0019909116610100171660011790555b610fdd61108d565b61063c61112d565b3b151590565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6bffffffffffffffffffffffff19166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600054610100900460ff16806110a657506110a6610f37565b806110b4575060005460ff16155b6110ef5760405162461bcd60e51b815260040180806020018281038252602e81526020018061123b602e913960400191505060405180910390fd5b600054610100900460ff1615801561063c576000805460ff1961ff001990911661010017166001179055801561064e576000805461ff001916905550565b600054610100900460ff16806111465750611146610f37565b80611154575060005460ff16155b61118f5760405162461bcd60e51b815260040180806020018281038252602e81526020018061123b602e913960400191505060405180910390fd5b600054610100900460ff161580156111ba576000805460ff1961ff0019909116610100171660011790555b60006111c4610f33565b603380546001600160a01b0319166001600160a01b03831690811790915560405191925090600090600080516020611289833981519152908290a350801561064e576000805461ff00191690555056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220a38aa991fe7cf08f2acb1ab305d2972c008682f02b4d210d0832d8dc66d021ac64736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff19166001179055611e208061002d6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80636f791d29116100b8578063c0c53b8b1161007c578063c0c53b8b14610643578063cb23bcb51461067b578063d9b141ff14610683578063d9dd67ab1461068b578063dc1b7b1f1461013c578063e367a2c1146106a857610137565b80636f791d29146105065780637fa3a40e1461050e5780638a2df18d1461051657806395fcea7814610633578063b71939b11461063b57610137565b80633dbcc8d1116100ff5780633dbcc8d11461036f57806344c7cc30146103775780634d480faa146104855780635c1bba38146104a85780636d46e987146104cc57610137565b806306cc91b21461013c5780630c4a1e59146101c35780631a734229146102195780631f95663214610327578063342025fa14610355575b600080fd5b6101aa6004803603604081101561015257600080fd5b810190602081018135600160201b81111561016c57600080fd5b82018360208201111561017e57600080fd5b803590602001918460018302840111600160201b8311171561019f57600080fd5b9193509150356106b0565b6040805192835260208301919091528051918290030190f35b61021760048036036101208110156101da57600080fd5b5080359060ff60208201351690604081019060808101359060a0810135906001600160a01b0360c0820135169060e08101359061010001356106cb565b005b6102176004803603608081101561022f57600080fd5b810190602081018135600160201b81111561024957600080fd5b82018360208201111561025b57600080fd5b803590602001918460018302840111600160201b8311171561027c57600080fd5b919390929091602081019035600160201b81111561029957600080fd5b8201836020820111156102ab57600080fd5b803590602001918460208302840111600160201b831117156102cc57600080fd5b919390929091602081019035600160201b8111156102e957600080fd5b8201836020820111156102fb57600080fd5b803590602001918460208302840111600160201b8311171561031c57600080fd5b919350915035610a37565b6102176004803603604081101561033d57600080fd5b506001600160a01b0381351690602001351515610b90565b61035d610c41565b60408051918252519081900360200190f35b61035d610c47565b6102176004803603608081101561038d57600080fd5b810190602081018135600160201b8111156103a757600080fd5b8201836020820111156103b957600080fd5b803590602001918460018302840111600160201b831117156103da57600080fd5b919390929091602081019035600160201b8111156103f757600080fd5b82018360208201111561040957600080fd5b803590602001918460208302840111600160201b8311171561042a57600080fd5b919390929091602081019035600160201b81111561044757600080fd5b82018360208201111561045957600080fd5b803590602001918460208302840111600160201b8311171561047a57600080fd5b919350915035610c4d565b6102176004803603604081101561049b57600080fd5b5080359060200135610d3a565b6104b0610dd0565b604080516001600160a01b039092168252519081900360200190f35b6104f2600480360360208110156104e257600080fd5b50356001600160a01b0316610ddf565b604080519115158252519081900360200190f35b6104f2610df4565b61035d610dfd565b610217600480360360a081101561052c57600080fd5b810190602081018135600160201b81111561054657600080fd5b82018360208201111561055857600080fd5b803590602001918460018302840111600160201b8311171561057957600080fd5b919390929091602081019035600160201b81111561059657600080fd5b8201836020820111156105a857600080fd5b803590602001918460208302840111600160201b831117156105c957600080fd5b919390929091602081019035600160201b8111156105e657600080fd5b8201836020820111156105f857600080fd5b803590602001918460208302840111600160201b8311171561061957600080fd5b9193509150803590602001356001600160a01b0316610e03565b610217610f9d565b6104b0610ffa565b6102176004803603606081101561065957600080fd5b506001600160a01b038135811691602081013582169160409091013516611009565b6104b06110a0565b61035d6110af565b61035d600480360360208110156106a157600080fd5b50356110b5565b61035d6110d3565b6000806106be8585856110d9565b915091505b935093915050565b6003548811610715576040805162461bcd60e51b815260206004820152601160248201527044454c415945445f4241434b574152445360781b604482015290519081900360640190fd5b600061072b8885893560208b01358a8a89611226565b6008549091504388359091011061077c576040805162461bcd60e51b815260206004820152601060248201526f4d41585f44454c41595f424c4f434b5360801b604482015290519081900360640190fd5b600954426020890135909101106107cb576040805162461bcd60e51b815260206004820152600e60248201526d4d41585f44454c41595f54494d4560901b604482015290519081900360640190fd5b600060018a111561085557600480546040805163d9dd67ab60e01b81526001198e0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b15801561082657600080fd5b505afa15801561083a573d6000803e3d6000fd5b505050506040513d602081101561085057600080fd5b505190505b61085f818361129c565b600480546040805163d9dd67ab60e01b81526000198f0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b1580156108af57600080fd5b505afa1580156108c3573d6000803e3d6000fd5b505050506040513d60208110156108d957600080fd5b505114610923576040805162461bcd60e51b81526020600482015260136024820152722222a620aca2a22fa0a1a1aaa6aaa620aa27a960691b604482015290519081900360640190fd5b5050600254600154600090156109535760018054600019810190811061094557fe5b906000526020600020015490505b60008061096483858e43428a6112c8565b9150915060018290806001815401808255809150506001900390600052602060002001600090919091909150558060028190555082847f85b6a949bf20bfd6bc6e20f98fb490c7944ab61dcfa5a30b5dae543412c9a8a0838f60405180604001604052808881526020018b81525060018080549050036040518085815260200184815260200183600260200280838360005b83811015610a0e5781810151838201526020016109f6565b5050505090500182815260200194505050505060405180910390a3505050505050505050505050565b600060025490506000610a8689898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a9150899050888861152c565b905080827f3bf85aebd2a1dc6c510ffc4795a3785e786b5817ab30144f88501d4c6456c986600254868d8d8d8d8d8d600180805490500333604051808b81526020018a8152602001806020018060200180602001868152602001856001600160a01b03166001600160a01b0316815260200184810384528c8c82818152602001925080828437600083820152601f01601f191690910185810384528a8152602090810191508b908b0280828437600083820152601f01601f19169091018581038352888152602090810191508990890280828437600083820152604051601f909101601f19169092018290039f50909d5050505050505050505050505050a3505050505050505050565b6006546001600160a01b03163314610bdd576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517fce86e570206e55533301cb66529b33afbd75e991c575b85adeaca10146be8cb49281900390910190a15050565b60095481565b60025481565b333214610c8f576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b600060025490506000610cde89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a9150899050888861152c565b60025460015460408051928352602083018790526000199091018282015251919250829184917f10e0571aafaf282151fd5b0215b5495521c549509cb0de3a3f8310bd2e344682919081900360600190a3505050505050505050565b6006546001600160a01b03163314610d87576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60088290556009819055604080518381526020810183905281517f3bcd3c6d4304309e4b36d94f90517baf304582bb1ac828906808577e067e6b6e929181900390910190a15050565b6005546001600160a01b031690565b60076020526000908152604090205460ff1681565b60005460ff1690565b60035481565b333214610e45576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b60005a600254604080516020601f8d018190048102820181019092528b81529293503692600091610e9891908e908e90819084018382808284376000920191909152508e92508d91508c90508b8b61152c565b60025460015460408051928352602083018a90526000199091018282015251919250829184917f10e0571aafaf282151fd5b0215b5495521c549509cb0de3a3f8310bd2e344682919081900360600190a36001600160a01b03851615610f8f57846001600160a01b031663e3db8a49335a8703866040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b031681526020018381526020018281526020019350505050602060405180830381600087803b158015610f6257600080fd5b505af1158015610f76573d6000803e3d6000fd5b505050506040513d6020811015610f8c57600080fd5b50505b505050505050505050505050565b6000610fa7611aaa565b9050336001600160a01b03821614610ff7576040805162461bcd60e51b815260206004820152600e60248201526d2727aa2fa32927a6afa0a226a4a760911b604482015290519081900360640190fd5b50565b6004546001600160a01b031681565b6004546001600160a01b031615611056576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600480546001600160a01b039485166001600160a01b0319918216179091559183166000908152600760205260409020805460ff1916600117905560068054919093169116179055565b6006546001600160a01b031681565b60015490565b600181815481106110c257fe5b600091825260209091200154905081565b60085481565b600080826110ec575060009050806106c3565b60008061112e87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250611acf915050565b9092509050600081156111665761116088888560018087038154811061115057fe5b9060005260206000200154611b43565b90935090505b60006001838154811061117557fe5b9060005260206000200154905060006111908a8a8785611b43565b90955090508288116111d7576040805162461bcd60e51b815260206004820152600b60248201526a10905510d217d4d510549560aa1b604482015290519081900360640190fd5b80881115611218576040805162461bcd60e51b815260206004820152600960248201526810905510d217d1539160ba1b604482015290519081900360640190fd5b999098509650505050505050565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6bffffffffffffffffffffffff19166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6004805460408051633dbcc8d160e01b8152905160009384936001600160a01b031692633dbcc8d19281830192602092829003018186803b15801561130c57600080fd5b505afa158015611320573d6000803e3d6000fd5b505050506040513d602081101561133657600080fd5b505186111561137e576040805162461bcd60e51b815260206004820152600f60248201526e2222a620aca2a22faa27a7afa320a960891b604482015290519081900360640190fd5b600480546040805163d9dd67ab60e01b81526000198a0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b1580156113ce57600080fd5b505afa1580156113e2573d6000803e3d6000fd5b505050506040513d60208110156113f857600080fd5b5051831461143b576040805162461bcd60e51b815260206004820152600b60248201526a44454c415945445f41434360a81b604482015290519081900360640190fd5b50506003805460408051702232b630bcb2b21036b2b9b9b0b3b2b99d60791b602080830191909152603182019a909a5260518101899052607181018390526091810188905260b1808201959095528151808203909501855260d1810182528451948a0194909420600060f186015261010585019690965261012580850195909552805180850390950185526101458401815284519489019490942060605160802061016585019690965290860390960161018583018190526101a58301969096526101c580830194909452825180830390940184526101e59091019091528151919094012092559091600190910190565b3360009081526007602052604081205460ff16611581576040805162461bcd60e51b815260206004820152600e60248201526d27a7262cafa9a2a8aaa2a721a2a960911b604482015290519081900360640190fd5b600154156115a95760018054600019810190811061159b57fe5b906000526020600020015490505b60025481600060208a01815b6005810188106119435760008989836001018181106115d057fe5b9050602002013590504360085482011015611622576040805162461bcd60e51b815260206004820152600d60248201526c109313d0d2d7d513d3d7d3d311609a1b604482015290519081900360640190fd5b43811115611667576040805162461bcd60e51b815260206004820152600d60248201526c424c4f434b5f544f4f5f4e455760981b604482015290519081900360640190fd5b50600089898360020181811061167957fe5b90506020020135905042600954820110156116ca576040805162461bcd60e51b815260206004820152600c60248201526b1512535157d513d3d7d3d31160a21b604482015290519081900360640190fd5b4281111561170e576040805162461bcd60e51b815260206004820152600c60248201526b54494d455f544f4f5f4e455760a01b604482015290519081900360640190fd5b506000338a8a8460010181811061172157fe5b905060200201358b8b8560020181811061173757fe5b9050602002013560405160200180846001600160a01b03166001600160a01b031660601b8152601401838152602001828152602001935050505060405160208183030381529060405280519060200120905060008a8a8481811061179757fe5b9050602002013590506117b0848e8e8885878d8d611d03565b9098509096509401939250600090508989600384018181106117ce57fe5b905060200201359050600354811015611822576040805162461bcd60e51b815260206004820152601160248201527044454c415945445f4241434b574152445360781b604482015290519081900360640190fd5b600181101561186c576040805162461bcd60e51b8152602060048201526011602482015270135554d517d111531056515117d2539255607a1b604482015290519081900360640190fd5b6001600354101580611890575089898381811061188557fe5b905060200201356000145b6118db576040805162461bcd60e51b8152602060048201526017602482015276135554d517d111531056515117d253925517d4d5105495604a1b604482015290519081900360640190fd5b60035481111561193a576119358587838d8d876001018181106118fa57fe5b905060200201358e8e8860020181811061191057fe5b905060200201358f8f8960040181811061192657fe5b9050602002013560001b6112c8565b965094505b506005016115b5565b5060208b018082101561198f576040805162461bcd60e51b815260206004820152600f60248201526e4f46465345545f4f564552464c4f5760881b604482015290519081900360640190fd5b8b5181018211156119de576040805162461bcd60e51b81526020600482015260146024820152732a2920a729a0a1aa24a7a729afa7ab22a9292aa760611b604482015290519081900360640190fd5b6002548511611a22576040805162461bcd60e51b815260206004820152600b60248201526a08a9aa0a8b2be8482a886960ab1b604482015290519081900360640190fd5b6001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6018490556002859055868414611a9b576040805162461bcd60e51b815260206004820152600960248201526841465445525f41434360b81b604482015290519081900360640190fd5b50505050509695505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b60008082845110158015611ae7575060208385510310155b611b24576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301611b38858563ffffffff611d9116565b915091509250929050565b6000806000806000806000611b8f8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611acf915050565b809550819a505050611bd88b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611acf915050565b809450819a505050611c218b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611acf915050565b809350819a505050611c6a8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611acf915050565b604080516020808201989098528082018790526060810186905260808082018490528251808303909101815260a09091019091528051960195909520909950600184019550939050878414611cf2576040805162461bcd60e51b815260206004820152600960248201526842415443485f41434360b81b604482015290519081900360640190fd5b509699929850919650505050505050565b92840192808289875b87811015611d825760008b8b83818110611d2257fe5b60209081029290920135808620604080518086019a909a5289810189905260608a018d90526080808b01929092528051808b03909201825260a0909901909852875197909201969096209550600194850194930192919091019050611d0c565b50985098509895505050505050565b60008160200183511015611de1576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b5001602001519056fea26469706673582212201e3ad7c74a67aed9eb7b1284d754dbfbaf58515630d9d28ea9e94832533ffdbf64736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff60a01b1916600160a01b179055611e82806100336000396000f3fe60806040526004361061011f5760003560e01c80636f791d29116100a05780639fe12da5116100645780639fe12da514610681578063b4d9ec4414610696578063b75436bb146106ab578063e78cea9214610726578063fdebb9b31461073b5761011f565b80636f791d2914610561578063794cfd511461058a5780637ae8d8b31461059f5780638a631aa6146105b457806393e59dc1146106505761011f565b8063485cc955116100e7578063485cc955146102c15780635075788b146102fc5780635e9167581461039f578063679b6ded1461042957806367ef3ab8146104d25761011f565b80630f4d14e9146101245780631b871c8d146101535780631fe927cf146101fc5780632b40609a1461027757806347466f981461028e575b600080fd5b6101416004803603602081101561013a57600080fd5b5035610750565b60408051918252519081900360200190f35b610141600480360361010081101561016a57600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b8111156101be57600080fd5b8201836020820111156101d057600080fd5b803590602001918460018302840111600160201b831117156101f157600080fd5b50909250905061093d565b34801561020857600080fd5b506101416004803603602081101561021f57600080fd5b810190602081018135600160201b81111561023957600080fd5b82018360208201111561024b57600080fd5b803590602001918460018302840111600160201b8311171561026c57600080fd5b509092509050610b1d565b34801561028357600080fd5b5061028c610c8a565b005b34801561029a57600080fd5b5061028c600480360360208110156102b157600080fd5b50356001600160a01b0316610e52565b3480156102cd57600080fd5b5061028c600480360360408110156102e457600080fd5b506001600160a01b0381358116916020013516610ef5565b34801561030857600080fd5b50610141600480360360c081101561031f57600080fd5b8135916020810135916040820135916001600160a01b03606082013516916080820135919081019060c0810160a0820135600160201b81111561036157600080fd5b82018360208201111561037357600080fd5b803590602001918460018302840111600160201b8311171561039457600080fd5b509092509050610f70565b610141600480360360808110156103b557600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b8111156103eb57600080fd5b8201836020820111156103fd57600080fd5b803590602001918460018302840111600160201b8311171561041e57600080fd5b5090925090506110c5565b610141600480360361010081101561044057600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b81111561049457600080fd5b8201836020820111156104a657600080fd5b803590602001918460018302840111600160201b831117156104c757600080fd5b509092509050611210565b610141600480360360a08110156104e857600080fd5b8135916020810135916040820135916001600160a01b036060820135169181019060a081016080820135600160201b81111561052357600080fd5b82018360208201111561053557600080fd5b803590602001918460018302840111600160201b8311171561055657600080fd5b509092509050611349565b34801561056d57600080fd5b5061057661149d565b604080519115158252519081900360200190f35b34801561059657600080fd5b5061028c6114ad565b3480156105ab57600080fd5b5061028c61166f565b3480156105c057600080fd5b50610141600480360360a08110156105d757600080fd5b8135916020810135916001600160a01b036040830135169160608101359181019060a081016080820135600160201b81111561061257600080fd5b82018360208201111561062457600080fd5b803590602001918460018302840111600160201b8311171561064557600080fd5b50909250905061183a565b34801561065c57600080fd5b5061066561197b565b604080516001600160a01b039092168252519081900360200190f35b34801561068d57600080fd5b5061028c61198a565b3480156106a257600080fd5b50610576611b49565b3480156106b757600080fd5b50610141600480360360208110156106ce57600080fd5b810190602081018135600160201b8111156106e857600080fd5b8201836020820111156106fa57600080fd5b803590602001918460018302840111600160201b8311171561071b57600080fd5b509092509050611b59565b34801561073257600080fd5b50610665611cb9565b34801561074757600080fd5b50610576611cc8565b600080546001600160a01b03161561081c576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156107ad57600080fd5b505afa1580156107c1573d6000803e3d6000fd5b505050506040513d60208110156107d757600080fd5b505161081c576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a01b900460ff1615610876576040805162461bcd60e51b815260206004820152601860248201527710d49150551157d4915514965050931154d7d4105554d15160421b604482015290519081900360640190fd5b60015433908190600160a81b900460ff16156108c25761089582611cd8565b1580156108a157503233145b156108b6576108af82611cde565b91506108c2565b6108bf81611ced565b90505b604080516001600160a01b0383166020820181905260008284018190523460608401526080830188905260a0830182905260c083019190915260e0820181905261010082018190526101208083019190915282518083039091018152610140909101909152610935906009908490611cfb565b949350505050565b600080546001600160a01b031615610a09576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561099a57600080fd5b505afa1580156109ae573d6000803e3d6000fd5b505050506040513d60208110156109c457600080fd5b5051610a09576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a01b900460ff1615610a63576040805162461bcd60e51b815260206004820152601860248201527710d49150551157d4915514965050931154d7d4105554d15160421b604482015290519081900360640190fd5b610b0f6009338c60601b60601c6001600160a01b03168c348d8d60601b60601c6001600160a01b03168d60601b60601c6001600160a01b03168d8d8d8d90508e8e604051602001808c81526020018b81526020018a8152602001898152602001888152602001878152602001868152602001858152602001848152602001838380828437808301925050509b505050505050505050505050604051602081830303815290604052611cfb565b9a9950505050505050505050565b600080546001600160a01b031615610be9576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015610b7a57600080fd5b505afa158015610b8e573d6000803e3d6000fd5b505050506040513d6020811015610ba457600080fd5b5051610be9576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b333214610c2b576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b6000610c5560033386866040518083838082843760405192018290039091209350611db492505050565b60405190915081907fab532385be8f1005a4b6ba8fa20a2245facb346134ac739fe9a5198dc1580b9c90600090a29392505050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610ccf57600080fd5b505afa158015610ce3573d6000803e3d6000fd5b505050506040513d6020811015610cf957600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b158015610d4157600080fd5b505afa158015610d55573d6000803e3d6000fd5b505050506040513d6020811015610d6b57600080fd5b50519050336001600160a01b03821614610db9576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a01b900460ff1615610e09576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4105554d15160921b604482015290519081900360640190fd5b6001805460ff60a01b1916600160a01b17815560408051918252517f9077d36bc00859b5c3f320310707208543dd35092cb0a0fe117d0c6a558b148b9181900360200190a15050565b6000546001600160a01b03163314610ea1576040805162461bcd60e51b815260206004820152600d60248201526c1393d517d19493d357d31254d5609a1b604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f37389c47920d5cc3229678a0205d0455002c07541a4139ebdce91ac2274657779181900360200190a150565b6001546001600160a01b031615610f42576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600180546001600160a01b039384166001600160a01b03199182161790915560008054929093169116179055565b600080546001600160a01b03161561103c576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015610fcd57600080fd5b505afa158015610fe1573d6000803e3d6000fd5b505050506040513d6020811015610ff757600080fd5b505161103c576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6110b960033360008b8b8b8b60601b60601c6001600160a01b03168b8b8b604051602001808960ff1660ff1660f81b81526001018881526020018781526020018681526020018581526020018481526020018383808284378083019250505098505050505050505050604051602081830303815290604052611cfb565b98975050505050505050565b600080546001600160a01b031615611191576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561112257600080fd5b505afa158015611136573d6000803e3d6000fd5b505050506040513d602081101561114c57600080fd5b5051611191576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b611206600733600189898960601b60601c6001600160a01b0316348a8a604051602001808860ff1660ff1660f81b815260010187815260200186815260200185815260200184815260200183838082843780830192505050975050505050505050604051602081830303815290604052611cfb565b9695505050505050565b600080546001600160a01b0316156112dc576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561126d57600080fd5b505afa158015611281573d6000803e3d6000fd5b505050506040513d602081101561129757600080fd5b50516112dc576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a81b900460ff1680156112f957506112f987611cd8565b1561130a5761130787611ced565b96505b600154600160a81b900460ff168015611327575061132786611cd8565b156113385761133586611ced565b95505b610b0f8a8a8a8a8a8a8a8a8a61093d565b600080546001600160a01b031615611415576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156113a657600080fd5b505afa1580156113ba573d6000803e3d6000fd5b505050506040513d60208110156113d057600080fd5b5051611415576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b61149260073360008a8a8a8a60601b60601c6001600160a01b0316348b8b604051602001808960ff1660ff1660f81b81526001018881526020018781526020018681526020018581526020018481526020018383808284378083019250505098505050505050505050604051602081830303815290604052611cfb565b979650505050505050565b600054600160a01b900460ff1690565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156114f257600080fd5b505afa158015611506573d6000803e3d6000fd5b505050506040513d602081101561151c57600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b15801561156457600080fd5b505afa158015611578573d6000803e3d6000fd5b505050506040513d602081101561158e57600080fd5b50519050336001600160a01b038216146115dc576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a81b900460ff1661162a576040805162461bcd60e51b815260206004820152600d60248201526c4e4f545f524557524954494e4760981b604482015290519081900360640190fd5b6001805460ff60a81b19169055604080516000815290517fab1ea65fd25ce96d303e895d1bd43edddb89841544a3705d3e61fc947a5fc25b9181900360200190a15050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156116b457600080fd5b505afa1580156116c8573d6000803e3d6000fd5b505050506040513d60208110156116de57600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b15801561172657600080fd5b505afa15801561173a573d6000803e3d6000fd5b505050506040513d602081101561175057600080fd5b50519050336001600160a01b0382161461179e576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a81b900460ff16156117f1576040805162461bcd60e51b8152602060048201526011602482015270414c52454144595f524557524954494e4760781b604482015290519081900360640190fd5b6001805460ff60a81b1916600160a81b17815560408051918252517fab1ea65fd25ce96d303e895d1bd43edddb89841544a3705d3e61fc947a5fc25b9181900360200190a15050565b600080546001600160a01b031615611906576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561189757600080fd5b505afa1580156118ab573d6000803e3d6000fd5b505050506040513d60208110156118c157600080fd5b5051611906576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b61149260033360018a8a8a60601b60601c6001600160a01b03168a8a8a604051602001808860ff1660ff1660f81b815260010187815260200186815260200185815260200184815260200183838082843780830192505050975050505050505050604051602081830303815290604052611cfb565b6000546001600160a01b031681565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156119cf57600080fd5b505afa1580156119e3573d6000803e3d6000fd5b505050506040513d60208110156119f957600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b158015611a4157600080fd5b505afa158015611a55573d6000803e3d6000fd5b505050506040513d6020811015611a6b57600080fd5b50519050336001600160a01b03821614611ab9576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a01b900460ff16611b04576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4105554d15160b21b604482015290519081900360640190fd5b6001805460ff60a01b19169055604080516000815290517f9077d36bc00859b5c3f320310707208543dd35092cb0a0fe117d0c6a558b148b9181900360200190a15050565b600154600160a01b900460ff1681565b600080546001600160a01b031615611c25576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015611bb657600080fd5b505afa158015611bca573d6000803e3d6000fd5b505050506040513d6020811015611be057600080fd5b5051611c25576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6000611c4f60033386866040518083838082843760405192018290039091209350611db492505050565b9050807fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b858560405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a29392505050565b6001546001600160a01b031681565b600154600160a81b900460ff1681565b3b151590565b61111061111160901b01190190565b61111161111160901b010190565b600080611d1085858580519060200120611db4565b9050807fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b846040518080602001828103825283818151815260200191508051906020019080838360005b83811015611d72578181015183820152602001611d5a565b50505050905090810190601f168015611d9f5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2949350505050565b600154604080516302bbfad160e01b815260ff861660048201526001600160a01b03858116602483015260448201859052915160009392909216916302bbfad1913491606480830192602092919082900301818588803b158015611e1757600080fd5b505af1158015611e2b573d6000803e3d6000fd5b50505050506040513d6020811015611e4257600080fd5b505194935050505056fea2646970667358221220ed792396a49edd456f5b05e40bfc6c2098d2037e24a28a983ff70e1f51cdd64564736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff191660011790556108878061002d6000396000f3fe608060405234801561001057600080fd5b506004361061006d5760003560e01c806316b9109b1461007257806330a826b414610091578063485cc955146100ae5780636f791d29146100dc5780638b8ca199146100f8578063bc49accb14610130578063f03c04a5146101bc575b600080fd5b61008f6004803603602081101561008857600080fd5b50356101e8565b005b61008f600480360360208110156100a757600080fd5b5035610269565b61008f600480360360408110156100c457600080fd5b506001600160a01b03813581169160200135166102e7565b6100e461036c565b604080519115158252519081900360200190f35b61008f6004803603608081101561010e57600080fd5b50803590602081013590604081013590606001356001600160a01b0316610375565b61008f6004803603608081101561014657600080fd5b8135916020810135916001600160a01b03604083013516919081019060808101606082013564010000000081111561017d57600080fd5b82018360208201111561018f57600080fd5b803590602001918460018302840111640100000000831117156101b157600080fd5b50909250905061041c565b61008f600480360360408110156101d257600080fd5b506001600160a01b038135169060200135610687565b6001546001600160a01b03163314610235576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600160f81b6020820152602180820184905282518083039091018152604190910190915261026690610721565b50565b6001546001600160a01b031633146102b6576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600160f91b6020820152602180820184905282518083039091018152604190910190915261026690610721565b6001546001600160a01b031615610334576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b60008054610100600160a81b0319166101006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b60005460ff1690565b6001546001600160a01b031633146103c2576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600060208201526021810186905260418101859052436061820152608181018490526001600160a01b03831660a1808301919091528251808303909101815260c190910190915261041690610721565b50505050565b6001546001600160a01b03163314610469576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051774368616c6c656e6765506572696f64457468426c6f636b7360401b815281519081900360180181207214dc195959131a5b5a5d14195c94d958dbdb99606a1b825291519081900360130190206060919087906064880460405180806921b430b4b727bbb732b960b11b815250600a01905060405180910390208860601b60601c6001600160a01b03168888604051602001808981526020018881526020018781526020018681526020018581526020018481526020018383808284376040805191909301818103601f190182528084526000805483516020808601919091206302bbfad160e01b8552600b60048601526024850184905260448501529551939f50909d5061010090046001600160a01b03169b506302bbfad19a5060648082019a509398509096508690039091019350849250899150889050803b1580156105b557600080fd5b505af11580156105c9573d6000803e3d6000fd5b505050506040513d60208110156105df57600080fd5b5051604080516020808252855182820152855193945084937fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b938793928392918301919085019080838360005b8381101561064457818101518382015260200161062c565b50505050905090810190601f1680156106715780820380516001836020036101000a031916815260200191505b509250505060405180910390a250505050505050565b6001546001600160a01b031633146106d4576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600360f81b60208201526001600160a01b0384166021820152604181018390524360618083019190915282518083039091018152608190910190915261071d90610721565b5050565b600080548251602080850191909120604080516302bbfad160e01b8152600860048201523360248201526044810192909252516101009093046001600160a01b0316936302bbfad193606480840194939192918390030190829087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d60208110156107b457600080fd5b505160408051602080825284518282015284517fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b938693928392918301919085019080838360005b838110156108145781810151838201526020016107fc565b50505050905090810190601f1680156108415780820380516001836020036101000a031916815260200191505b509250505060405180910390a25056fea264697066735822122088b967009dc1bb1421c1227dab50fdedd3f9c23f8c919c0cced5186e63410eae64736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff191660011790556113158061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638515bc6a116100925780638515bc6a146102ed5780639229bab6146102f55780639c5cfe0b146103125780639f0c04bf1461040e578063b0f30537146104ad578063c75184df146104b5578063cb23bcb5146104d9578063e78cea92146104e1578063f1fd3a39146104e9576100ea565b80627436d3146100ef5780630c726847146101a75780631198527114610267578063465477901461026f578063485cc955146102775780636f791d29146102a557806372f2a8c7146102c157806380648b02146102c9575b600080fd5b6101956004803603606081101561010557600080fd5b810190602081018135600160201b81111561011f57600080fd5b82018360208201111561013157600080fd5b803590602001918460208302840111600160201b8311171561015257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295505082359350505060200135610506565b60408051918252519081900360200190f35b610265600480360360408110156101bd57600080fd5b810190602081018135600160201b8111156101d757600080fd5b8201836020820111156101e957600080fd5b803590602001918460018302840111600160201b8311171561020a57600080fd5b919390929091602081019035600160201b81111561022757600080fd5b82018360208201111561023957600080fd5b803590602001918460208302840111600160201b8311171561025a57600080fd5b509092509050610541565b005b61019561062d565b610195610643565b6102656004803603604081101561028d57600080fd5b506001600160a01b0381358116916020013516610652565b6102ad6106dc565b604080519115158252519081900360200190f35b6101956106e5565b6102d16106eb565b604080516001600160a01b039092168252519081900360200190f35b6101956106fa565b6101956004803603602081101561030b57600080fd5b5035610710565b610265600480360361014081101561032957600080fd5b81359190810190604081016020820135600160201b81111561034a57600080fd5b82018360208201111561035c57600080fd5b803590602001918460208302840111600160201b8311171561037d57600080fd5b919390928235926001600160a01b03602082013581169360408301359091169260608301359260808101359260a08201359260c08301359261010081019060e00135600160201b8111156103d057600080fd5b8201836020820111156103e257600080fd5b803590602001918460018302840111600160201b8311171561040357600080fd5b509092509050610722565b610195600480360360e081101561042457600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359160808201359160a08101359181019060e0810160c0820135600160201b81111561046f57600080fd5b82018360208201111561048157600080fd5b803590602001918460018302840111600160201b831117156104a257600080fd5b509092509050610afa565b610195610b9a565b6104bd610ba9565b604080516001600160801b039092168252519081900360200190f35b6102d1610bae565b6102d1610bc2565b6102ad600480360360208110156104ff57600080fd5b5035610bd1565b60006105398484846040516020018082815260200191505060405160208183030381529060405280519060200120610be5565b949350505050565b60005461010090046001600160a01b03163314610593576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b806000805b82811015610624576106028783888888868181106105b257fe5b905060200201358601926105c8939291906112b7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610cb392505050565b84848281811061060e57fe5b6020029190910135929092019150600101610598565b50505050505050565b600454600160801b90046001600160801b031690565b6003546001600160801b031690565b60005461010090046001600160a01b0316156106a4576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b60008054610100600160a81b0319166101006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b60005460ff1690565b60055490565b6006546001600160a01b031690565b600354600160801b90046001600160801b031690565b60026020526000908152604090205481565b6000806107358a8a8a8a8a8a8a8a610afa565b90506107848e8e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d84610e1b565b91508d8a6001600160a01b03168a6001600160a01b03167f20af7f3bbfe38132b8900ae295cd9c8d1914be7052d061a511f3f728dab189648e6040518082815260200191505060405180910390a4506107db611270565b60036040518060c00160405290816000820160009054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016000820160109054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016001820160009054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016001820160109054906101000a90046001600160801b03166001600160801b03166001600160801b03168152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152505090506040518060c00160405280896001600160801b03168152602001886001600160801b03168152602001876001600160801b031681526020018f6001600160801b031681526020018381526020018b6001600160a01b0316815250600360008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a8154816001600160801b0302191690836001600160801b0316021790555060408201518160010160006101000a8154816001600160801b0302191690836001600160801b0316021790555060608201518160010160106101000a8154816001600160801b0302191690836001600160801b031602179055506080820151816002015560a08201518160030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050610a6a898686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ffa92505050565b80516003805460208401516001600160801b03199182166001600160801b03948516178416600160801b9185168202179092556040840151600480546060870151931691851691909117841691909316909102179055608081015160055560a00151600680546001600160a01b0319166001600160a01b0390921691909117905550505050505050505050505050565b600060038960601b60601c6001600160a01b03168960601b60601c6001600160a01b0316898989898989604051602001808a60ff1660ff1660f81b815260010189815260200188815260200187815260200186815260200185815260200184815260200183838082843780830192505050995050505050505050505060405160208183030381529060405280519060200120905098975050505050505050565b6004546001600160801b031690565b600181565b60005461010090046001600160a01b031681565b6001546001600160a01b031681565b600090815260026020526040902054151590565b8251600090610100811115610bf957600080fd5b8260005b82811015610ca95760028606610c5657868181518110610c1957fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150610c9b565b81878281518110610c6357fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101610bfd565b5095945050505050565b805160009082908290610cc257fe5b01602001516001600160f81b0319161415610e18578051606114610d1a576040805162461bcd60e51b815260206004820152600a6024820152690848288be988a9c8ea8960b31b604482015290519081900360640190fd5b6000610d2d82600163ffffffff61121716565b9050610d3881610bd1565b15610d81576040805162461bcd60e51b8152602060048201526014602482015273454e5452595f414c52454144595f45584953545360601b604482015290519081900360640190fd5b6000610d9483602163ffffffff61121716565b90506000610da984604163ffffffff61121716565b9050610db36112a5565b5060408051602080820183528382526000868152600282528390208251905582518681529081018490528083018590529151909185917fe5ccc8d7080a4904b2f4e42d91e8f06b13fe6cb2181ad1fe14644e856b44c1319181900360600190a2505050505b50565b6000610100845110610e65576040805162461bcd60e51b815260206004820152600e60248201526d50524f4f465f544f4f5f4c4f4e4760901b604482015290519081900360640190fd5b835160020a8310610eb0576040805162461bcd60e51b815260206004820152601060248201526f1410551217d393d517d352539253505360821b604482015290519081900360640190fd5b6000610ebd858585610506565b6000878152600260205260409020805491925090610f14576040805162461bcd60e51b815260206004820152600f60248201526e4e4f5f4f5554424f585f454e54525960881b604482015290519081900360640190fd5b8551604080516020808201899052818301939093528151808203830181526060909101825280519083012060008181526001850190935291205460ff1615610f93576040805162461bcd60e51b815260206004820152600d60248201526c1053149150511657d4d4115395609a1b604482015290519081900360640190fd5b81548314610fd3576040805162461bcd60e51b815260206004820152600860248201526710905117d493d3d560c21b604482015290519081900360640190fd5b6000818152600192830160205260409020805460ff19169092179091559695505050505050565b600154604051639e5d4c4960e01b81526001600160a01b03858116600483019081526024830186905260606044840181815286516064860152865160009692959490921693639e5d4c49938a938a938a93909160849091019060208501908083838e5b8381101561107557818101518382015260200161105d565b50505050905090810190601f1680156110a25780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156110c357600080fd5b505af11580156110d7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561110057600080fd5b815160208301805160405192949293830192919084600160201b82111561112657600080fd5b90830190602082018581111561113b57600080fd5b8251600160201b81118282018810171561115457600080fd5b82525081516020918201929091019080838360005b83811015611181578181015183820152602001611169565b50505050905090810190601f1680156111ae5780820380516001836020036101000a031916815260200191505b506040525050509150915081611210578051156111ce5780518082602001fd5b6040805162461bcd60e51b81526020600482015260126024820152711094925111d157d0d0531317d1905253115160721b604482015290519081900360640190fd5b5050505050565b60008160200183511015611267576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60408051602081019091526000815290565b600080858511156112c6578182fd5b838611156112d2578182fd5b505082019391909203915056fea2646970667358221220767004b2eded0b2e68c20232247b168ceca5eb5578398f78770ead63ded5a1b964736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b506040516201487538038062014875833981810160405261018081101561003657600080fd5b815160208301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e0180519a519c9e9b9d999c989b979a9699959894979396929591949391820192846401000000008211156100a557600080fd5b9083019060208201858111156100ba57600080fd5b82516401000000008111828201881017156100d457600080fd5b82525081516020918201929091019080838360005b838110156101015781810151838201526020016100e9565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b5060405250505061013d610a9c565b6040518061016001604052808d81526020018c81526020018b81526020018a8152602001898152602001886001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b031681526020018581526020018481526020018381525090506101b6818e6101ba60201b60201c565b5033ff5b60006101c4610b14565b6040516101d090610b49565b604051809103906000f0801580156101ec573d6000803e3d6000fd5b506001600160a01b031660a0820181905260e085015161021591906001600160e01b0361063b16565b8560000186602001876040018860600189608001856001600160a01b03166001600160a01b0316815250856001600160a01b03166001600160a01b0316815250856001600160a01b03166001600160a01b0316815250856001600160a01b03166001600160a01b0316815250856001600160a01b03166001600160a01b031681525050505050508060a001516001600160a01b0316637b6abd9c8560000151604051806080016040528088602001518152602001886040015181526020018860600151815260200188608001518152508760a001518860c001518961014001516040518060c0016040528089600001516001600160a01b03166001600160a01b0316815260200189602001516001600160a01b03166001600160a01b0316815260200189608001516001600160a01b03166001600160a01b0316815260200189606001516001600160a01b03166001600160a01b031681526020018b6001600160a01b03166001600160a01b0316815260200160405161039490610b57565b604051809103906000f0801580156103b0573d6000803e3d6000fd5b506001600160a01b03166001600160a01b031681525060405180604001604052806040516103dd90610b65565b604051809103906000f0801580156103f9573d6000803e3d6000fd5b506001600160a01b03166001600160a01b0316815260200160405161041d90610b73565b604051809103906000f080158015610439573d6000803e3d6000fd5b506001600160a01b031690526040805180820182526101008f015181526101208f0151602082015290516001600160e01b031960e08b901b168152600481018981529060240188608080838360005b838110156104a0578181015183820152602001610488565b5050506001600160a01b03808c169490920193845250881660208301525060408101906060018560c080838360005b838110156104e75781810151838201526020016104cf565b5050505090500184600260200280838360005b838110156105125781810151838201526020016104fa565b5050505090500183600260200280838360005b8381101561053d578181015183820152602001610525565b50505050905001828103825286818151815260200191508051906020019080838360005b83811015610579578181015183820152602001610561565b50505050905090810190601f1680156105a65780820380516001836020036101000a031916815260200191505b509950505050505050505050600060405180830381600087803b1580156105cc57600080fd5b505af11580156105e0573d6000803e3d6000fd5b50505060a082015160408084015181516001600160a01b0393841681529216602083015280517ff2890eb99858b9475308ad4861846ebb89a8f2297267ac42c6efcb12f40f559f9350918290030190a160a001519392505050565b600080600080600061064b610b14565b60405161065790610b81565b604051809103906000f080158015610673573d6000803e3d6000fd5b506001600160a01b0316815260405161068b90610b8f565b604051809103906000f0801580156106a7573d6000803e3d6000fd5b506001600160a01b031660208201526040516106c290610b9d565b604051809103906000f0801580156106de573d6000803e3d6000fd5b506001600160a01b0316604080830191909152516106fb90610bab565b604051809103906000f080158015610717573d6000803e3d6000fd5b506001600160a01b0316606082015260405161073290610bb9565b604051809103906000f08015801561074e573d6000803e3d6000fd5b5081608001906001600160a01b031690816001600160a01b03168152505080600001516001600160a01b0316638129fc1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107ab57600080fd5b505af11580156107bf573d6000803e3d6000fd5b50505050602081015181516040805163c0c53b8b60e01b81526001600160a01b0392831660048201528a831660248201528b831660448201529051919092169163c0c53b8b91606480830192600092919082900301818387803b15801561082557600080fd5b505af1158015610839573d6000803e3d6000fd5b505050506040818101518251825163485cc95560e01b81526001600160a01b0391821660048201526000602482018190529351919092169263485cc955926044808201939182900301818387803b15801561089357600080fd5b505af11580156108a7573d6000803e3d6000fd5b50505050606081015181516040805163485cc95560e01b81526001600160a01b0392831660048201528b831660248201529051919092169163485cc95591604480830192600092919082900301818387803b15801561090557600080fd5b505af1158015610919573d6000803e3d6000fd5b50505050608081015181516040805163485cc95560e01b81526001600160a01b038c8116600483015292831660248201529051919092169163485cc95591604480830192600092919082900301818387803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b50508251604080850151815163722dbe7360e11b81526001600160a01b0391821660048201526001602482015291519216935063e45b7ce6925060448082019260009290919082900301818387803b1580156109e657600080fd5b505af11580156109fa573d6000803e3d6000fd5b5050505080600001516001600160a01b031663f2fde38b896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b158015610a5a57600080fd5b505af1158015610a6e573d6000803e3d6000fd5b50508251602084015160408501516060860151608090960151929d919c509a50939850965091945050505050565b604051806101600160405280600080191681526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001606081525090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b6116f88062000bc883390190565b611b3580620022c083390190565b613fef8062003df583390190565b61550e8062007de483390190565b61134a806200d2f283390190565b6123ea806200e63c83390190565b6121148062010a2683390190565b6108b48062012b3a83390190565b61148780620133ee8339019056fe608060405234801561001057600080fd5b5060008054600160ff199182168117909255600b80549091169055600c8190556100386100f7565b610089576040805162461bcd60e51b815260206004820152601460248201527f434f4e5354525543544f525f4e4f545f494e4954000000000000000000000000604482015290519081900360640190fd5b506000600c556100a06001600160e01b036100f716565b156100f2576040805162461bcd60e51b815260206004820152601360248201527f494e56414c49445f434f4e5354525543544f5200000000000000000000000000604482015290519081900360640190fd5b6100ff565b600c54151590565b6115ea8061010e6000396000f3fe60806040526004361061026b5760003560e01c80637ba9534a11610144578063d735e21d116100b6578063e4781e101161007a578063e4781e1014610773578063e8bd492214610788578063ef40a670146107f1578063f33e1fac14610824578063f51de41b1461084e578063f8d1f194146108635761027a565b8063d735e21d1461070a578063d7445bc81461071f578063d93fe9c414610734578063dc72a33b14610749578063dff697871461075e5761027a565b806391c657e81161010857806391c657e81461065957806395fcea781461068c5780639e8a713f146106a1578063ce11e6ab146106b6578063d01e6602146106cb578063d4f43293146106f55761027a565b80637ba9534a146105f05780637f4320ce146106055780637f60abbb1461061a5780638640ce5f1461062f5780638da5cb5b146106445761027a565b80636177fd18116101dd57806369fd251c116101a157806369fd251c146104be5780636f791d29146104f1578063715ea22b1461050657806376e7e23b1461051b578063771b2f97146105305780637b6abd9c146105455761027a565b80636177fd18146103fc57806362a82d7d1461042f57806363721d6b1461045957806365f7f80d1461046e578063662ea47d146104835761027a565b806345e38b641161022f57806345e38b64146103695780634f0f4aa91461037e57806351ed6a30146103a85780635c975abb146103bd5780635dbaf68b146103d25780635e8ef106146103e75761027a565b80632e7acfa6146102825780632f30cabd146102a9578063313a04fa146102dc5780633e55c0c7146103055780633e96576e146103365761027a565b3661027a5761027861088d565b005b61027861088d565b34801561028e57600080fd5b506102976108a7565b60408051918252519081900360200190f35b3480156102b557600080fd5b50610297600480360360208110156102cc57600080fd5b50356001600160a01b03166108ad565b3480156102e857600080fd5b506102f16108cc565b604080519115158252519081900360200190f35b34801561031157600080fd5b5061031a6108d6565b604080516001600160a01b039092168252519081900360200190f35b34801561034257600080fd5b506102976004803603602081101561035957600080fd5b50356001600160a01b03166108e5565b34801561037557600080fd5b50610297610903565b34801561038a57600080fd5b5061031a600480360360208110156103a157600080fd5b5035610909565b3480156103b457600080fd5b5061031a610924565b3480156103c957600080fd5b506102f1610933565b3480156103de57600080fd5b5061031a61093c565b3480156103f357600080fd5b5061029761094b565b34801561040857600080fd5b506102f16004803603602081101561041f57600080fd5b50356001600160a01b0316610951565b34801561043b57600080fd5b5061031a6004803603602081101561045257600080fd5b5035610979565b34801561046557600080fd5b506102976109a3565b34801561047a57600080fd5b506102976109a9565b34801561048f57600080fd5b506104986109af565b604080516001600160a01b03938416815291909216602082015281519081900390910190f35b3480156104ca57600080fd5b5061031a600480360360208110156104e157600080fd5b50356001600160a01b03166109ca565b3480156104fd57600080fd5b506102f16109eb565b34801561051257600080fd5b5061031a6109f4565b34801561052757600080fd5b50610297610a1e565b34801561053c57600080fd5b50610297610a24565b34801561055157600080fd5b50610278600480360361024081101561056957600080fd5b81359160208101916001600160a01b0360a083013581169260c081013590911691810190610100810160e08201356401000000008111156105a957600080fd5b8201836020820111156105bb57600080fd5b803590602001918460018302840111640100000000831117156105dd57600080fd5b919350915060c081016101008201610a2a565b3480156105fc57600080fd5b50610297611005565b34801561061157600080fd5b5061029761100b565b34801561062657600080fd5b50610297611011565b34801561063b57600080fd5b50610297611017565b34801561065057600080fd5b5061031a61101d565b34801561066557600080fd5b506102f16004803603602081101561067c57600080fd5b50356001600160a01b031661102c565b34801561069857600080fd5b50610278611086565b3480156106ad57600080fd5b5061031a6110e9565b3480156106c257600080fd5b5061031a6110f8565b3480156106d757600080fd5b5061031a600480360360208110156106ee57600080fd5b5035611107565b34801561070157600080fd5b5061031a611136565b34801561071657600080fd5b50610297611146565b34801561072b57600080fd5b5061029761114c565b34801561074057600080fd5b5061031a611152565b34801561075557600080fd5b50610297611161565b34801561076a57600080fd5b50610297611167565b34801561077f57600080fd5b5061029761116d565b34801561079457600080fd5b506107bb600480360360208110156107ab57600080fd5b50356001600160a01b0316611173565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b3480156107fd57600080fd5b506102976004803603602081101561081457600080fd5b50356001600160a01b03166111af565b34801561083057600080fd5b506102976004803603602081101561084757600080fd5b50356111cd565b34801561085a57600080fd5b5061031a6111f5565b34801561086f57600080fd5b506102976004803603602081101561088657600080fd5b5035611204565b6108956108a5565b6108a56108a0611216565b6112fb565b565b600c5481565b6001600160a01b0381166000908152600a60205260409020545b919050565b601e544310155b90565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b60185481565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b600b5460ff1690565b6014546001600160a01b031681565b600e5490565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b60006007828154811061098857fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b6000806109ba611136565b6109c26109f4565b915091509091565b6001600160a01b039081166000908152600860205260409020600301541690565b60005460ff1690565b6000601c600181548110610a0457fe5b6000918252602090912001546001600160a01b0316905090565b600f5481565b600d5481565b610a3261131f565b15610a73576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b610a968260005b60200201356001600160a01b03166001600160a01b0316611327565b610ade576040805162461bcd60e51b8152602060048201526014602482015273119050d15517cc17d393d517d0d3d395149050d560621b604482015290519081900360640190fd5b610ae9826001610a7a565b610b31576040805162461bcd60e51b8152602060048201526014602482015273119050d15517cc57d393d517d0d3d395149050d560621b604482015290519081900360640190fd5b604080516001600160a01b038981166024808401919091528351808403909101815260449092018352602080830180516001600160e01b031663189acdbd60e31b17815293518351600095928801359093169392909182918083835b60208310610bac5780518252601f199092019160209182019101610b8d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610c0c576040519150601f19603f3d011682016040523d82523d6000602084013e610c11565b606091505b5050905080610c59576040805162461bcd60e51b815260206004820152600f60248201526e1190525317d253925517d19050d155608a1b604482015290519081900360640190fd5b6010805485356001600160a01b039081166001600160a01b03199283161792839055601180546020890135831690841617905560128054909216604080890135831691821790935582516319dc7ae560e31b8152600481019190915260016024820152915192169163cee3d7289160448082019260009290919082900301818387803b158015610ce857600080fd5b505af1158015610cfc573d6000803e3d6000fd5b5050505083600360068110610d0d57fe5b601380546001600160a01b0319166001600160a01b0360209390930293909301358216929092179091556010546040805163722dbe7360e11b8152606088013584166004820152600160248201529051919092169163e45b7ce691604480830192600092919082900301818387803b158015610d8857600080fd5b505af1158015610d9c573d6000803e3d6000fd5b50506013546040805163bc49accb60e01b81528d3560048201818152928f0135602483018190526001600160a01b038e81166044850152608060648501908152608485018e90529516965063bc49accb9550909390928d928d928d929160a401848480828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b158015610e3b57600080fd5b505af1158015610e4f573d6000803e3d6000fd5b5050505083600460068110610e6057fe5b601480546001600160a01b03199081166001600160a01b03602094909402949094013583169390931790556015805490921660a08701359091161790556000610ea88b61132d565b9050610eb381611424565b8935600c556020808b0135600d556040808c0135600e5560608c0135600f55601680546001600160a01b0319166001600160a01b038c811691909117909155604b601855610190601b5560115482516326a407d560e11b8152873560048201529387013560248501529151911691634d480faa91604480830192600092919082900301818387803b158015610f4757600080fd5b505af1158015610f5b573d6000803e3d6000fd5b50610f6f9250601c9150869050600261152d565b50600019601e55604080518c815290517f4ac0014773275a3dfb58c58539631006301de41998cce7c4f8698d297c88bb2d9181900360200190a1610fb161131f565b610ff8576040805162461bcd60e51b81526020600482015260136024820152721253925512505312569157d393d517d2539255606a1b604482015290519081900360640190fd5b5050505050505050505050565b60035490565b601a5481565b601e5481565b60045490565b6016546001600160a01b031681565b6000805b60095481101561107d576009818154811061104757fe5b60009182526020909120600290910201546001600160a01b03848116911614156110755760019150506108c7565b600101611030565b50600092915050565b6000611090611473565b9050336001600160a01b038216146110e0576040805162461bcd60e51b815260206004820152600e60248201526d2727aa2fa32927a6afa0a226a4a760911b604482015290519081900360640190fd5b50600019601e55565b6013546001600160a01b031681565b6012546001600160a01b031681565b60006009828154811061111657fe5b60009182526020909120600290910201546001600160a01b031692915050565b6000601c600081548110610a0457fe5b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b6001600160a01b031660009081526008602052604090206002015490565b6000600982815481106111dc57fe5b9060005260206000209060020201600101549050919050565b6010546001600160a01b031681565b60009081526006602052604090205490565b6000600436101561125c576040805162461bcd60e51b815260206004820152600b60248201526a4e4f5f46554e435f53494760a81b604482015290519081900360640190fd5b6016546001600160a01b03166000811580159061128157506001600160a01b03821633145b6112925761128d6109f4565b61129a565b61129a611136565b90506112ae816001600160a01b0316611327565b6112f5576040805162461bcd60e51b815260206004820152601360248201527215105491d15517d393d517d0d3d395149050d5606a1b604482015290519081900360640190fd5b91505090565b3660008037600080366000845af43d6000803e80801561131a573d6000f35b3d6000fd5b600c54151590565b3b151590565b600080611383604051806101200160405280600081526020018581526020016000815260200160008152602001600081526020016000801b81526020016000801b81526020014381526020016001815250611498565b6015546040805163d45ab2b560e01b815260048101849052600060248201819052604482018190526064820181905243608483015291519394506001600160a01b039092169263d45ab2b59260a4808201936020939283900390910190829087803b1580156113f157600080fd5b505af1158015611405573d6000803e3d6000fd5b505050506040513d602081101561141b57600080fd5b50519392505050565b6000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc80546001600160a01b0319166001600160a01b03929092169190911790556001600255565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b828054828255906000526020600020908101928215611580579160200282015b828111156115805781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061154d565b5061158c929150611590565b5090565b6108d391905b8082111561158c5780546001600160a01b031916815560010161159656fea2646970667358221220f4a49303621c85e1c41cb76dcf5bdaeb26f0adca9b76bcbcf3e1676c5b0d17ec64736f6c634300060b0033608060405234801561001057600080fd5b50600060405161001f90610106565b604051809103906000f08015801561003b573d6000803e3d6000fd5b50905060008160405161004d90610113565b6001600160a01b03909116815260405190819003602001906000f08015801561007a573d6000803e3d6000fd5b506040805163f2fde38b60e01b815233600482015290519192506001600160a01b0383169163f2fde38b9160248082019260009290919082900301818387803b1580156100c657600080fd5b505af11580156100da573d6000803e3d6000fd5b5050600080546001600160a01b0319166001600160a01b03949094169390931790925550610120915050565b6109ab80610bb983390190565b6105d18061156483390190565b610a8a8061012f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806359659e901461003b578063d45ab2b51461005f575b600080fd5b610043610094565b604080516001600160a01b039092168252519081900360200190f35b610043600480360360a081101561007557600080fd5b50803590602081013590604081013590606081013590608001356100a3565b6000546001600160a01b031681565b6000805460405182916001600160a01b0316906100bf9061018d565b6001600160a01b03909116815260406020820181905260008183018190529051918290036080019190f0801580156100fb573d6000803e3d6000fd5b5060408051632901acdd60e21b8152336004820152602481018a905260448101899052606481018890526084810187905260a4810186905290519192506001600160a01b0383169163a406b3749160c48082019260009290919082900301818387803b15801561016a57600080fd5b505af115801561017e573d6000803e3d6000fd5b50929998505050505050505050565b6108ba8061019b8339019056fe60806040526040516108ba3803806108ba8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e626561636f6e0000000000000000000000008252519081900360140190206000805160206107fa83398151915260001990910114925061012a91505057fe5b61013d82826001600160e01b0361014416565b50506104f3565b610157826102a260201b6100311760201c565b6101925760405162461bcd60e51b815260040180806020018281038252602581526020018061083b6025913960400191505060405180910390fd5b61020a826001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ce57600080fd5b505afa1580156101e2573d6000803e3d6000fd5b505050506040513d60208110156101f857600080fd5b50516102a2602090811b61003117901c565b6102455760405162461bcd60e51b81526004018080602001828103825260348152602001806108866034913960400191505060405180910390fd5b6000805160206107fa83398151915282815581511561029d5761029b6102726001600160e01b036102a816565b8360405180606001604052806021815260200161081a6021913961032460201b6100371760201c565b505b505050565b3b151590565b60006102bb6001600160e01b0361043c16565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d602081101561031d57600080fd5b5051905090565b6060610338846001600160e01b036102a216565b6103735760405162461bcd60e51b81526004018080602001828103825260268152602001806108606026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106103b15780518252601f199092019160209182019101610392565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b5090925090506104308282866001600160e01b0361044f16565b925050505b9392505050565b6000805160206107fa8339815191525490565b6060831561045e575081610435565b82511561046e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b85781810151838201526020016104a0565b50505050905090810190601f1680156104e55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6102f8806105026000396000f3fe60806040523661001357610011610017565b005b6100115b61001f61002f565b61002f61002a61013c565b6101af565b565b3b151590565b606061004284610031565b61007d5760405162461bcd60e51b815260040180806020018281038252602681526020018061029d6026913960400191505060405180910390fd5b60006060856001600160a01b0316856040518082805190602001908083835b602083106100bb5780518252601f19909201916020918201910161009c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101308282866101d3565b925050505b9392505050565b6000610146610277565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561017e57600080fd5b505afa158015610192573d6000803e3d6000fd5b505050506040513d60208110156101a857600080fd5b5051905090565b3660008037600080366000845af43d6000803e8080156101ce573d6000f35b3d6000fd5b606083156101e2575081610135565b8251156101f25782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561023c578181015183820152602001610224565b50505050905090810190601f1680156102695780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50549056fe416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374a264697066735822122053dcbd8c0863f6517a5117ac7b858fc300ba6a67685a286f909e85f8150b82c764736f6c634300060b0033a3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50426561636f6e50726f78793a2066756e6374696f6e2063616c6c206661696c6564426561636f6e50726f78793a20626561636f6e206973206e6f74206120636f6e7472616374416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374426561636f6e50726f78793a20626561636f6e20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a264697066735822122083993765fb17d9e56f1f170178dae4a9b16953cf668bbf9cd1327252c4cac33564736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff1916600117905561097e8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806388d221c6116100b8578063a406b3741161007c578063a406b37414610260578063a8929e0b146102a4578063cb23bcb5146102ac578063d7ff5e35146102d0578063dff69787146102d8578063f0dd77ff146102e057610137565b806388d221c6146101fc5780639168ae721461020457806396a9fdc01461022a57806397bdc51014610250578063a0369c141461025857610137565b80635b8b2280116100ff5780635b8b2280146101ab5780636971dfe5146101b35780636f791d29146101d0578063701da98e146101ec57806383197ef0146101f457610137565b80631bc09d0a1461013c5780632466696e1461015b5780632edfb42a146101935780633aa192741461019b578063479c9254146101a3575b600080fd5b6101596004803603602081101561015257600080fd5b50356102e8565b005b6101816004803603602081101561017157600080fd5b50356001600160a01b0316610346565b60408051918252519081900360200190f35b610181610429565b6101596104c0565b61018161058d565b610181610593565b610159600480360360208110156101c957600080fd5b5035610599565b6101d86105eb565b604080519115158252519081900360200190f35b6101816105f4565b6101596105fa565b610159610650565b6101d86004803603602081101561021a57600080fd5b50356001600160a01b031661069e565b6101596004803603602081101561024057600080fd5b50356001600160a01b03166106b3565b610181610785565b61018161078b565b610159600480360360c081101561027657600080fd5b506001600160a01b038135169060208101359060408101359060608101359060808101359060a00135610791565b610181610864565b6102b461086a565b604080516001600160a01b039092168252519081900360200190f35b610181610879565b61018161087f565b610181610885565b6009546001600160a01b03163314610335576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b600a546103415743600a555b600b55565b6009546000906001600160a01b03163314610396576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6001600160a01b03821660009081526008602052604090205460ff16156103f5576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b604482015290519081900360640190fd5b506001600160a01b03166000908152600860205260409020805460ff19166001908117909155600780549091019081905590565b600080600960009054906101000a90046001600160a01b03166001600160a01b0316637f60abbb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561047a57600080fd5b505afa15801561048e573d6000803e3d6000fd5b505050506040513d60208110156104a457600080fd5b50519050438111156104b8576005546104ba565b805b91505090565b600960009054906101000a90046001600160a01b03166001600160a01b031663313a04fa6040518163ffffffff1660e01b815260040160206040518083038186803b15801561050e57600080fd5b505afa158015610522573d6000803e3d6000fd5b505050506040513d602081101561053857600080fd5b50518061054757506006544310155b61058b576040805162461bcd60e51b815260206004820152601060248201526f10d212531117d513d3d7d49150d1539560821b604482015290519081900360640190fd5b565b60045481565b60025481565b6009546001600160a01b031633146105e6576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b600655565b60005460ff1690565b60015481565b6009546001600160a01b03163314610647576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b61058b3361088b565b610658610429565b43101561058b576040805162461bcd60e51b815260206004820152600f60248201526e4245464f52455f444541444c494e4560881b604482015290519081900360640190fd5b60086020526000908152604090205460ff1681565b6009546001600160a01b03163314610700576040805162461bcd60e51b815260206004820152600b60248201526a524f4c4c55505f4f4e4c5960a81b604482015290519081900360640190fd5b6001600160a01b03811660009081526008602052604090205460ff1661075a576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b6001600160a01b03166000908152600860205260409020805460ff1916905560078054600019019055565b60035481565b60065481565b6001600160a01b0386166107da576040805162461bcd60e51b815260206004820152600b60248201526a2927a6262aa82fa0a2222960a91b604482015290519081900360640190fd5b6009546001600160a01b031615610827576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0397909716969096179095556001939093556002919091556003556004556005819055600655565b61a4b390565b6009546001600160a01b031681565b600a5481565b60075481565b600b5481565b6000546040805180820190915260098152684e4f545f434c4f4e4560b81b60208201529060ff161561093b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109005781810151838201526020016108e8565b50505050905090810190601f16801561092d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50806001600160a01b0316fffea2646970667358221220ac1de2b488909c055fe33469c43800e5232a0d3993909d2c062e17a0df1d6d2e64736f6c634300060b0033608060405234801561001057600080fd5b506040516105d13803806105d18339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100aa16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100a4816001600160e01b036100ae16565b50610124565b3390565b6100c18161011e60201b61034c1760201c565b6100fc5760405162461bcd60e51b815260040180806020018281038252603381526020018061059e6033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b61046b806101336000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610084578063715018a6146100a85780638da5cb5b146100b0578063f2fde38b146100b8575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b03166100de565b005b61008c610180565b604080516001600160a01b039092168252519081900360200190f35b61008261018f565b61008c61023b565b610082600480360360208110156100ce57600080fd5b50356001600160a01b031661024a565b6100e6610352565b6001600160a01b03166100f761023b565b6001600160a01b031614610140576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b61014981610356565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001546001600160a01b031690565b610197610352565b6001600160a01b03166101a861023b565b6001600160a01b0316146101f1576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610252610352565b6001600160a01b031661026361023b565b6001600160a01b0316146102ac576040805162461bcd60e51b81526020600482018190526024820152600080516020610416833981519152604482015290519081900360640190fd5b6001600160a01b0381166102f15760405162461bcd60e51b81526004018080602001828103825260268152602001806103bd6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b3390565b61035f8161034c565b61039a5760405162461bcd60e51b81526004018080602001828103825260338152602001806103e36033913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e74726163744f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e082b44760d7484daad017396b93ce8fb7ce2f11f19db0d8429a61aaedbc6f4564736f6c634300060b00335570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374608060405234801561001057600080fd5b506000805460ff19908116600117909155600b80549091169055613fb6806100396000396000f3fe608060405234801561001057600080fd5b50600436106103715760003560e01c80637c75c298116101d5578063cf47bb8411610105578063e4781e10116100a8578063e4781e1014610c4c578063e8bd492214610c54578063ef40a67014610cb0578063f33e1fac14610cd6578063f38c937914610cf3578063f51de41b14610e16578063f53f5afa14610e1e578063f8d1f19414610ef4578063ff204f3b14610f1157610371565b8063cf47bb8414610aa6578063d01e660214610bd9578063d735e21d14610bf6578063d7445bc814610bfe578063d93fe9c414610c06578063dc72a33b14610c0e578063dff6978714610c16578063e45b7ce614610c1e57610371565b80639161d535116101785780639161d5351461086057806391c657e81461087d578063948d6588146108a35780639e8a713f146108c05780639ea28e65146108c8578063a3ffb77214610956578063a5cc82f814610a79578063a8929e0b14610a96578063ce11e6ab14610a9e57610371565b80637c75c298146107615780637e6c255f146108025780637f4320ce1461080a5780637f60abbb146108125780638456cb591461081a578063848bf918146108225780638640ce5f146108505780638da5cb5b1461085857610371565b806351ed6a30116102b057806365f7f80d1161025357806365f7f80d1461060e578063661d27221461061657806369fd251c146106d05780636aef131a146106f65780636d435421146107135780636f791d291461074157806376e7e23b14610749578063771b2f97146107515780637ba9534a1461075957610371565b806351ed6a301461057d578063567ca41b146105855780635c975abb146105ab5780635dbaf68b146105b35780635e8ef106146105bb5780636177fd18146105c357806362a82d7d146105e957806363721d6b1461060657610371565b80632f30cabd116103185780632f30cabd1461048c578063313a04fa146104b25780633e55c0c7146104ce5780633e96576e146104f25780633ea410981461051857806340b570f41461053557806345e38b64146105585780634f0f4aa91461056057610371565b80630397d45814610376578063046f7da21461039e57806306ae5851146103a657806313af4035146103c35780631d0ada65146103e95780631f9566321461041657806327035859146104445780632e7acfa614610472575b600080fd5b61039c6004803603602081101561038c57600080fd5b50356001600160a01b0316610f37565b005b61039c610f6f565b61039c600480360360208110156103bc57600080fd5b5035610f93565b61039c600480360360208110156103d957600080fd5b50356001600160a01b0316610fb5565b61039c600480360360608110156103ff57600080fd5b508035906020810135151590604001351515610fed565b61039c6004803603604081101561042c57600080fd5b506001600160a01b0381351690602001351515611538565b61039c6004803603604081101561045a57600080fd5b506001600160a01b03813581169160200135166115c4565b61047a611654565b60408051918252519081900360200190f35b61047a600480360360208110156104a257600080fd5b50356001600160a01b031661165a565b6104ba611679565b604080519115158252519081900360200190f35b6104d6611682565b604080516001600160a01b039092168252519081900360200190f35b61047a6004803603602081101561050857600080fd5b50356001600160a01b0316611691565b61039c6004803603602081101561052e57600080fd5b50356116af565b61039c6004803603604081101561054b57600080fd5b50803590602001356116d1565b61047a61175b565b6104d66004803603602081101561057657600080fd5b5035611761565b6104d661177c565b61039c6004803603602081101561059b57600080fd5b50356001600160a01b031661178b565b6104ba611863565b6104d661186c565b61047a61187b565b6104ba600480360360208110156105d957600080fd5b50356001600160a01b0316611881565b6104d6600480360360208110156105ff57600080fd5b50356118a9565b61047a6118d3565b61047a6118d9565b61039c6004803603606081101561062c57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561065f57600080fd5b82018360208201111561067157600080fd5b803590602001918460208302840111600160201b8311171561069257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506118df945050505050565b6104d6600480360360208110156106e657600080fd5b50356001600160a01b03166119a5565b61039c6004803603602081101561070c57600080fd5b50356119c6565b61039c6004803603604081101561072957600080fd5b506001600160a01b03813581169160200135166119e8565b6104ba611a76565b61047a611a7f565b61047a611a85565b61047a611a8b565b61039c6004803603602081101561077757600080fd5b810190602081018135600160201b81111561079157600080fd5b8201836020820111156107a357600080fd5b803590602001918460208302840111600160201b831117156107c457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611a91945050505050565b61039c611b45565b61047a611c03565b61047a611c09565b61039c611c0f565b61039c6004803603604081101561083857600080fd5b506001600160a01b0381358116916020013516611c33565b61047a611cc1565b6104d6611cc7565b61039c6004803603602081101561087657600080fd5b5035611cd6565b6104ba6004803603602081101561089357600080fd5b50356001600160a01b0316611cf8565b61039c600480360360208110156108b957600080fd5b5035611d52565b6104d6611d74565b61039c60048036036102608110156108df57600080fd5b813591602081019160e08201919081019061020081016101e0820135600160201b81111561090c57600080fd5b82018360208201111561091e57600080fd5b803590602001918460018302840111600160201b8311171561093f57600080fd5b919350915080359060208101359060400135611d83565b61039c6004803603604081101561096c57600080fd5b810190602081018135600160201b81111561098657600080fd5b82018360208201111561099857600080fd5b803590602001918460208302840111600160201b831117156109b957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610a0857600080fd5b820183602082011115610a1a57600080fd5b803590602001918460208302840111600160201b83111715610a3b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611fda945050505050565b61039c60048036036020811015610a8f57600080fd5b50356120a8565b61047a6120ca565b6104d66120d0565b61039c60048036036060811015610abc57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610ae657600080fd5b820183602082011115610af857600080fd5b803590602001918460208302840111600160201b83111715610b1957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b6857600080fd5b820183602082011115610b7a57600080fd5b803590602001918460208302840111600160201b83111715610b9b57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506120df945050505050565b6104d660048036036020811015610bef57600080fd5b5035612226565b61047a612255565b61047a61225b565b6104d6612261565b61047a612270565b61047a612276565b61039c60048036036040811015610c3457600080fd5b506001600160a01b038135169060200135151561227c565b61047a612308565b610c7a60048036036020811015610c6a57600080fd5b50356001600160a01b031661230e565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b61047a60048036036020811015610cc657600080fd5b50356001600160a01b031661234a565b61047a60048036036020811015610cec57600080fd5b5035612368565b61039c60048036036040811015610d0957600080fd5b810190602081018135600160201b811115610d2357600080fd5b820183602082011115610d3557600080fd5b803590602001918460208302840111600160201b83111715610d5657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610da557600080fd5b820183602082011115610db757600080fd5b803590602001918460208302840111600160201b83111715610dd857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612390945050505050565b6104d661254f565b61039c600480360360e0811015610e3457600080fd5b813591602081013591810190606081016040820135600160201b811115610e5a57600080fd5b820183602082011115610e6c57600080fd5b803590602001918460018302840111600160201b83111715610e8d57600080fd5b919390929091602081019035600160201b811115610eaa57600080fd5b820183602082011115610ebc57600080fd5b803590602001918460208302840111600160201b83111715610edd57600080fd5b91935091508035906020810135906040013561255e565b61047a60048036036020811015610f0a57600080fd5b50356125f8565b61039c60048036036020811015610f2757600080fd5b50356001600160a01b031661260a565b601780546001600160a01b0319166001600160a01b038316179055604051600d90600080516020613f6183398151915290600090a250565b610f776126a8565b604051600490600080516020613f6183398151915290600090a2565b600f819055604051600c90600080516020613f6183398151915290600090a250565b601680546001600160a01b0319166001600160a01b038316179055604051600790600080516020613f6183398151915290600090a250565b610ff5611863565b1561103a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b611042611679565b1561108c576040805162461bcd60e51b8152602060048201526015602482015274414c52454144595f53485554444f574e5f4d4f444560581b604482015290519081900360640190fd5b60006110966118d9565b905060006110a2611a8b565b9050845b8282146111c757808214156111305760006110c083611761565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156110fb57600080fd5b505afa15801561110f573d6000803e3d6000fd5b505050506040513d602081101561112557600080fd5b505191506111bb9050565b8461117e576040805162461bcd60e51b8152602060048201526019602482015278105315115493905512559154d7d393d517d156141150d51151603a1b604482015290519081900360640190fd5b6111878261273f565b6040805183815290517fc48f1661fe65917dbe9d175ac4cb62063ef44afe989dcd3dbf470ac5a1c77bcb9181900360200190a15b600019909101906110a6565b60006111d1612276565b905060608167ffffffffffffffff811180156111ec57600080fd5b50604051908082528060200260200182016040528015611216578160200160208202803683370190505b50905060005b828167ffffffffffffffff161015611277576112418167ffffffffffffffff166118a9565b828267ffffffffffffffff168151811061125757fe5b6001600160a01b039092166020928302919091019091015260010161121c565b5060005b828167ffffffffffffffff161015611507576000828267ffffffffffffffff16815181106112a557fe5b6020026020010151905060006112ba826119a5565b90506001600160a01b038116156114955788611316576040805162461bcd60e51b815260206004820152601660248201527510d2105313115391d157d393d517d156141150d5115160521b604482015290519081900360640190fd5b6000816001600160a01b031663bb4af0b16040518163ffffffff1660e01b815260040160206040518083038186803b15801561135157600080fd5b505afa158015611365573d6000803e3d6000fd5b505050506040513d602081101561137b57600080fd5b5051604080516329a6d87160e11b815290519192506000916001600160a01b0385169163534db0e2916004808301926020929190829003018186803b1580156113c357600080fd5b505afa1580156113d7573d6000803e3d6000fd5b505050506040513d60208110156113ed57600080fd5b505190506113fa826127c1565b611403816127c1565b826001600160a01b03166214ebe76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561143d57600080fd5b505af1158015611451573d6000803e3d6000fd5b5050604080516001600160a01b038716815290517fec0b2d27905d678228bae2ed41ea32ea8bdbdd62e81edec23035cbde03f122a29350908190036020019150a150505b60006114a86114a384611691565b611761565b6001600160a01b031614156114fd576114c0826127eb565b604080516001600160a01b038416815290517fe695a52cb984a997f48f43d18e30b3ea892d024ca5410f74e5fded60b4a033ef9181900360200190a15b505060010161127b565b5043601e55611514612863565b604051601990600080516020613f6183398151915290600090a25050505050505050565b60115460408051630fcab31960e11b81526001600160a01b038581166004830152841515602483015291519190921691631f95663291604480830192600092919082900301818387803b15801561158e57600080fd5b505af11580156115a2573d6000803e3d6000fd5b505060405160139250600080516020613f618339815191529150600090a25050565b81601c6000815481106115d357fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080601c60018154811061161057fe5b6000918252602082200180546001600160a01b0319166001600160a01b039390931692909217909155604051600591600080516020613f6183398151915291a25050565b600c5481565b6001600160a01b0381166000908152600a60205260409020545b919050565b601e5443101590565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b600c819055604051600990600080516020613f6183398151915290600090a250565b601154604080516326a407d560e11b8152600481018590526024810184905290516001600160a01b0390921691634d480faa9160448082019260009290919082900301818387803b15801561172557600080fd5b505af1158015611739573d6000803e3d6000fd5b5050604051600e9250600080516020613f618339815191529150600090a25050565b60185481565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b6012546001600160a01b03828116911614156117db576040805162461bcd60e51b815260206004820152600a602482015269086aaa4be9eaaa8849eb60b31b604482015290519081900360640190fd5b601054604080516319dc7ae560e31b81526001600160a01b038481166004830152600060248301819052925193169263cee3d7289260448084019391929182900301818387803b15801561182e57600080fd5b505af1158015611842573d6000803e3d6000fd5b505060405160019250600080516020613f618339815191529150600090a250565b600b5460ff1690565b6014546001600160a01b031681565b600e5490565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b6000600782815481106118b857fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b604080516337ca261760e01b81526001600160a01b038481166004830190815260248301938452845160448401528451918716936337ca261793879387939291606401906020808601910280838360005b83811015611948578181015183820152602001611930565b505050509050019350505050600060405180830381600087803b15801561196e57600080fd5b505af1158015611982573d6000803e3d6000fd5b505060405160119250600080516020613f618339815191529150600090a2505050565b6001600160a01b039081166000908152600860205260409020600301541690565b601b819055604051601090600080516020613f6183398151915290600090a250565b816001600160a01b031663f2fde38b826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b158015611a4057600080fd5b505af1158015611a54573d6000803e3d6000fd5b5050604051601b9250600080516020613f618339815191529150600090a25050565b60005460ff1690565b600f5481565b600d5481565b60035490565b611a99611863565b611ad8576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b60005b8151811015611b2757611b02828281518110611af357fe5b602002602001015160006128e6565b50611b1f828281518110611b1257fe5b60200260200101516129bc565b600101611adb565b50604051601690600080516020613f6183398151915290600090a250565b611b4d611863565b611b8c576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b611b94611679565b611bd9576040805162461bcd60e51b81526020600482015260116024820152704e4f545f53485554444f574e5f4d4f444560781b604482015290519081900360640190fd5b600019601e55611be76126a8565b604051601a90600080516020613f6183398151915290600090a2565b601a5481565b601e5481565b611c17612863565b604051600390600080516020613f6183398151915290600090a2565b816001600160a01b0316633659cfe6826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b158015611c8b57600080fd5b505af1158015611c9f573d6000803e3d6000fd5b505060405160149250600080516020613f618339815191529150600090a25050565b60045490565b6016546001600160a01b031681565b600d819055604051600a90600080516020613f6183398151915290600090a250565b6000805b600954811015611d495760098181548110611d1357fe5b60009182526020909120600290910201546001600160a01b0384811691161415611d41576001915050611674565b600101611cfc565b50600092915050565b6018819055604051600890600080516020613f6183398151915290600090a250565b6013546001600160a01b031681565b611d8b611863565b611dca576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b611dd26118d9565b8114611e1d576040805162461bcd60e51b815260206004820152601560248201527413d3931657d310551154d517d0d3d3919254935151605a1b604482015290519081900360640190fd5b611e25613e72565b60408051808201909152611f58908960026000835b82821015611e7b5760408051606081810190925290808402860190600390839083908082843760009201919091525050508152600190910190602001611e3a565b50506040805180820190915291508a905060026000835b82821015611ed35760408051608081810190925290808402860190600490839083908082843760009201919091525050508152600190910190602001611e92565b505050508686601160009054906101000a90046001600160a01b03166001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2757600080fd5b505afa158015611f3b573d6000803e3d6000fd5b505050506040513d6020811015611f5157600080fd5b5051612a70565b6040805160c081018252848152600c546020820152600e54918101919091526011546001600160a01b039081166060830152601354811660808301526015541660a0820152909150611fb49082908a908a908a908a908f612abe565b50604051601790600080516020613f6183398151915290600090a2505050505050505050565b805182511461201f576040805162461bcd60e51b815260206004820152600c60248201526b0aea49e9c8ebe988a9c8ea8960a31b604482015290519081900360640190fd5b60005b82518110156120895781818151811061203757fe5b6020026020010151601d600085848151811061204f57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101612022565b50604051600690600080516020613f6183398151915290600090a25050565b600e819055604051600b90600080516020613f6183398151915290600090a250565b61a4b290565b6012546001600160a01b031681565b8051825114612125576040805162461bcd60e51b815260206004820152600d60248201526c1253959053125117d253941555609a1b604482015290519081900360640190fd5b60408051633b99adf760e01b8152600481019182528351604482015283516001600160a01b03861692633b99adf792869286929182916024820191606401906020808801910280838360005b83811015612189578181015183820152602001612171565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156121c85781810151838201526020016121b0565b50505050905001945050505050600060405180830381600087803b1580156121ef57600080fd5b505af1158015612203573d6000803e3d6000fd5b505060405160129250600080516020613f618339815191529150600090a2505050565b60006009828154811061223557fe5b60009182526020909120600290910201546001600160a01b031692915050565b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b6010546040805163722dbe7360e11b81526001600160a01b03858116600483015284151560248301529151919092169163e45b7ce691604480830192600092919082900301818387803b1580156122d257600080fd5b505af11580156122e6573d6000803e3d6000fd5b505060405160029250600080516020613f618339815191529150600090a25050565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b6001600160a01b031660009081526008602052604090206002015490565b60006009828154811061237757fe5b9060005260206000209060020201600101549050919050565b612398611863565b6123d7576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b805182511461241c576040805162461bcd60e51b815260206004820152600c60248201526b0aea49e9c8ebe988a9c8ea8960a31b604482015290519081900360640190fd5b60005b825181101561253057600061245a84838151811061243957fe5b602002602001015184848151811061244d57fe5b6020026020010151613178565b90506001600160a01b0381166124a6576040805162461bcd60e51b815260206004820152600c60248201526b1393d517d25397d0d210531360a21b604482015290519081900360640190fd5b6124c28483815181106124b557fe5b60200260200101516127c1565b6124d18383815181106124b557fe5b806001600160a01b03166214ebe76040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561250b57600080fd5b505af115801561251f573d6000803e3d6000fd5b50506001909301925061241f915050565b50604051601590600080516020613f6183398151915290600090a25050565b6010546001600160a01b031681565b612566611863565b6125a5576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b6012546013546125d3918b918b918b918b918b918b918b918b918b916001600160a01b03918216911661323e565b604051601890600080516020613f6183398151915290600090a2505050505050505050565b60009081526006602052604090205490565b601280546001600160a01b0319166001600160a01b03838116918217909255601054604080516319dc7ae560e31b81526004810193909352600160248401525192169163cee3d7289160448082019260009290919082900301818387803b15801561267457600080fd5b505af1158015612688573d6000803e3d6000fd5b505060405160009250600080516020613f6183398151915291508290a250565b6126b0611863565b6126ef576040805162461bcd60e51b81526020600482015260146024820152600080516020613f41833981519152604482015290519081900360640190fd5b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61272261350f565b604080516001600160a01b039092168252519081900360200190a1565b60008181526005602052604080822054815163083197ef60e41b815291516001600160a01b03909116926383197ef0926004808201939182900301818387803b15801561278b57600080fd5b505af115801561279f573d6000803e3d6000fd5b50505060009182525060056020526040902080546001600160a01b0319169055565b6001600160a01b0316600090815260086020526040902060030180546001600160a01b0319169055565b6001600160a01b038116600090815260086020526040902060028101546128128382613513565b61281b8361359e565b604080518281526000602082015281516001600160a01b038616927febd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6928290030190a2505050565b61286b611863565b156128b0576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861272261350f565b6001600160a01b038216600090815260086020526040812060028101548084111561294b576040805162461bcd60e51b815260206004820152601060248201526f544f4f5f4c4954544c455f5354414b4560801b604482015290519081900360640190fd5b600061295d828663ffffffff6136c416565b6002840186905590506129708682613513565b604080518381526020810187905281516001600160a01b038916927febd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6928290030190a295945050505050565b6001600160a01b0381811660008181526008602090815260408083208151808301909252938152600180850154928201928352600980549182018155909352517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af600290930292830180546001600160a01b031916919095161790935591517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b090920191909155612a6c8261359e565b5050565b612a78613e72565b60408051808201909152865186518291612a93918888613721565b8152602001612ab2886001602002015188600160200201514387613721565b90529695505050505050565b6000612ac8613e97565b612ad1896137bf565b60e08201528351612ae190611761565b81606001906001600160a01b031690816001600160a01b03168152505083606001516001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b158015612b3b57600080fd5b505afa158015612b4f573d6000803e3d6000fd5b505050506040513d6020811015612b6557600080fd5b5051815260608101516040805163380ed4c760e11b815290516001600160a01b039092169163701da98e91600480820192602092909190829003018186803b158015612bb057600080fd5b505afa158015612bc4573d6000803e3d6000fd5b505050506040513d6020811015612bda57600080fd5b50518951612be7906137e1565b14612c2b576040805162461bcd60e51b815260206004820152600f60248201526e0a0a48aacbea6a882a88abe9082a69608b1b604482015290519081900360640190fd5b805160208a0151604001511115612c7a576040805162461bcd60e51b815260206004820152600e60248201526d12539093d617d41054d517d1539160921b604482015290519081900360640190fd5b83606001516001600160a01b031663dc1b7b1f87878c60200151604001516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604080518083038186803b158015612cfd57600080fd5b505afa158015612d11573d6000803e3d6000fd5b505050506040513d6040811015612d2757600080fd5b508051602090910151610120830152610100820152612d4589613876565b816040018181525050612d6a84604001518260e00151866020015184606001516138a7565b8160c0018181525050600081606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b158015612db257600080fd5b505afa158015612dc6573d6000803e3d6000fd5b505050506040513d6020811015612ddc57600080fd5b50511160a0820181905215612e6657612e5c81606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e2b57600080fd5b505afa158015612e3f573d6000803e3d6000fd5b505050506040513d6020811015612e5557600080fd5b50516125f8565b6080820152612e77565b8351612e71906125f8565b60808201525b8360a001516001600160a01b031663d45ab2b5612e978b602001516137e1565b612ea68c856040015143613a2d565b612eaf8d613a4a565b88600001518660c001516040518663ffffffff1660e01b81526004018086815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b158015612f0b57600080fd5b505af1158015612f1f573d6000803e3d6000fd5b505050506040513d6020811015612f3557600080fd5b50516001600160a01b031660208201526000612f4f611a8b565b600101905081606001516001600160a01b0316631bc09d0a826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612f9e57600080fd5b505af1158015612fb2573d6000803e3d6000fd5b50505050612fd38260a0015183608001518460400151856101200151613a7a565b9250838314613020576040805162461bcd60e51b81526020600482015260146024820152730aa9c8ab0a08a86a88a88be9c9e888abe9082a6960631b604482015290519081900360640190fd5b61302e826020015184613ae1565b6080850151855160c084015160408051638b8ca19960e01b81526004810186905260248101939093526044830191909152336064830152516001600160a01b0390921691638b8ca1999160848082019260009290919082900301818387803b15801561309957600080fd5b505af11580156130ad573d6000803e3d6000fd5b50505050506130bf84600001516125f8565b6130c7611a8b565b7f8016306209aff73e79f274cf38a41928996f746e2953111902e1f55be1713a5484846040015185600001518661010001518761012001518f8f6040518088815260200187815260200186815260200185815260200184815260200183600260600280828437600083820152601f01601f191690910190508261010080828437600083820152604051601f909101601f1916909201829003995090975050505050505050a350979650505050505050565b6001600160a01b038083166000908152600860205260408082208484168352908220600382015492939192909116806131e2576040805162461bcd60e51b81526020600482015260076024820152661393d7d0d2105360ca1b604482015290519081900360640190fd5b60038201546001600160a01b03828116911614613235576040805162461bcd60e51b815260206004820152600c60248201526b1112519197d25397d0d2105360a21b604482015290519081900360640190fd5b95945050505050565b60006132bf8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508d613b2b565b905060006132cc8d611761565b90506132db8c83888a89613c2c565b816001600160a01b03166397bdc5106040518163ffffffff1660e01b815260040160206040518083038186803b15801561331457600080fd5b505afa158015613328573d6000803e3d6000fd5b505050506040513d602081101561333e57600080fd5b505114613381576040805162461bcd60e51b815260206004820152600c60248201526b434f4e4649524d5f4441544160a01b604482015290519081900360640190fd5b836001600160a01b0316630c7268478c8c8c8c6040518563ffffffff1660e01b81526004018080602001806020018381038352878782818152602001925080828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801561342357600080fd5b505af1158015613437573d6000803e3d6000fd5b5050505061344660015461273f565b60018d81558d01600255604080516316b9109b60e01b8152600481018f905290516001600160a01b038516916316b9109b91602480830192600092919082900301818387803b15801561349857600080fd5b505af11580156134ac573d6000803e3d6000fd5b505050508c7f2400bd6e429cfcd98fe43a75bbbe4702c59c99d636100690130cc1ebb611c5a2838989896040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050505050505050565b3390565b6001600160a01b0382166000908152600a60205260408120549061353d828463ffffffff613c7316565b6001600160a01b0385166000818152600a60209081526040918290208490558151868152908101849052815193945091927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae29281900390910190a250505050565b6001600160a01b038116600090815260086020526040902080546007805460001981019081106135ca57fe5b600091825260209091200154600780546001600160a01b0390921691839081106135f057fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600860006007848154811061363057fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902055600780548061366057fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03949094168152600890935250506040812081815560018101829055600281019190915560030180546001600160a81b0319169055565b60008282111561371b576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b613729613eeb565b60408051610120810182528551815286516020820152908101856001602002015181526020018560026004811061375c57fe5b602002015181526020018560036004811061377357fe5b602002015181526020018660016003811061378a57fe5b60200201518152602001866002600381106137a157fe5b60200201518152602001848152602001838152509050949350505050565b8051516020820151516000916137db919063ffffffff6136c416565b92915050565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b805180516020830151516000926137db92918290039061389590613cd4565b6138a28660200151613cd4565b613d09565b6000806138db866138cf6138c282600163ffffffff6136c416565b889063ffffffff613c7316565b9063ffffffff613d4716565b905061396a8161395e6138f4438863ffffffff613c7316565b866001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561392d57600080fd5b505afa158015613941573d6000803e3d6000fd5b505050506040513d602081101561395757600080fd5b5051613dae565b9063ffffffff613c7316565b91506000836001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156139a757600080fd5b505afa1580156139bb573d6000803e3d6000fd5b505050506040513d60208110156139d157600080fd5b505190508015613a2357613a20836139e883611761565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561392d57600080fd5b92505b5050949350505050565b6000613a428383866020015160400151613dc4565b949350505050565b805160a09081015160208301519182015160c083015160608401516080909401516000946137db94939291613c2c565b60008085613a89576000613a8c565b60015b905080858585604051602001808560ff1660ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120915050949350505050565b60038054600101808255600090815260056020908152604080832080546001600160a01b0319166001600160a01b0397909716969096179095559154815260069091529190912055565b81518351600091829184835b83811015613bde576000888281518110613b4d57fe5b60200260200101519050838187011115613b9d576040805162461bcd60e51b815260206004820152600c60248201526b2220aa20afa7ab22a9292aa760a11b604482015290519081900360640190fd5b6020868b0181018290206040805180840196909652858101919091528051808603820181526060909501905283519301929092209190940193600101613b37565b50818414613c21576040805162461bcd60e51b815260206004820152600b60248201526a08882a882be988a9c8ea8960ab1b604482015290519081900360640190fd5b979650505050505050565b60408051602080820197909752808201959095526060850192909252608084019290925260a0808401929092528051808403909201825260c0909201909152805191012090565b600082820183811015613ccd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006137db8260000151613d04846040015185602001518660a0015187606001518860c001518960800151613dfb565b613e46565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b6000808211613d9d576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381613da657fe5b049392505050565b6000818311613dbd5781613ccd565b5090919050565b6040805160208082019590955280820193909352606080840192909252805180840390920182526080909201909152805191012090565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6040518060400160405280613e85613eeb565b8152602001613e92613eeb565b905290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101200160405280600081526020016000801916815260200160008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152509056fe5061757361626c653a206e6f7420706175736564000000000000000000000000ea8787f128d10b2cc0317b0c3960f9ad447f7f6c1ed189db1083ccffd20f456ea2646970667358221220e791981d28606560ce5b1b12a67e3d55219868cebbf9fbfd786f0fc78dc6131264736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff19908116600117909155600b805490911690556154d5806100396000396000f3fe60806040526004361061030c5760003560e01c80637427be511161019c578063d01e6602116100e2578063e8bd492211610090578063e8bd492214610a22578063edfd03ed14610a8b578063ef40a67014610ab5578063f31d863f14610ae8578063f33e1fac14610bc6578063f51de41b14610bf0578063f8d1f19414610c05578063fa7803e614610c2f5761030c565b8063d01e66021461097a578063d735e21d146109a4578063d7445bc8146109b9578063d93fe9c4146109ce578063dc72a33b146109e3578063dff69787146109f8578063e4781e1014610a0d5761030c565b806381fbc98a1161014a57806381fbc98a146108785780638640ce5f146108ab5780638da5cb5b146108c057806391c657e8146108d55780639e8a713f14610908578063a8929e0b1461091d578063c4d66de814610932578063ce11e6ab146109655761030c565b80637427be51146107ac57806376e7e23b146107df578063771b2f97146107f45780637ba9534a146108095780637e2d21551461081e5780637f4320ce1461084e5780637f60abbb146108635761030c565b80634f0f4aa91161026157806362a82d7d1161020f57806362a82d7d1461069257806363721d6b146106bc57806365f7f80d146106d157806367425daf146106e657806369fd251c146106fb5780636b94c33b1461072e5780636f791d29146107615780636f7d0026146107765761030c565b80634f0f4aa9146105d957806351ed6a30146106035780635c975abb146106185780635dbaf68b1461062d5780635e8ef106146106425780635f576db6146106575780636177fd181461065f5761030c565b80633e96576e116102be5780633e96576e1461044e5780633fe3862714610481578063414f23fe1461051e57806345c5b2c71461054e57806345e38b6414610574578063488ed1a9146105895780634d26732d146105c45761030c565b806304a28064146103115780631e83d30f146103565780632b2af0ab146103825780632e7acfa6146103ac5780632f30cabd146103c1578063313a04fa146103f45780633e55c0c71461041d575b600080fd5b34801561031d57600080fd5b506103446004803603602081101561033457600080fd5b50356001600160a01b0316610c6a565b60408051918252519081900360200190f35b34801561036257600080fd5b506103806004803603602081101561037957600080fd5b5035610d2b565b005b34801561038e57600080fd5b50610380600480360360208110156103a557600080fd5b5035610df7565b3480156103b857600080fd5b50610344610e93565b3480156103cd57600080fd5b50610344600480360360208110156103e457600080fd5b50356001600160a01b0316610e99565b34801561040057600080fd5b50610409610eb4565b604080519115158252519081900360200190f35b34801561042957600080fd5b50610432610ebd565b604080516001600160a01b039092168252519081900360200190f35b34801561045a57600080fd5b506103446004803603602081101561047157600080fd5b50356001600160a01b0316610ecc565b34801561048d57600080fd5b5061038060048036036102408110156104a557600080fd5b813591602081019160e08201916101e08101359161020082013591908101906102408101610220820135600160201b8111156104e057600080fd5b8201836020820111156104f257600080fd5b803590602001918460018302840111600160201b8311171561051357600080fd5b509092509050610eea565b34801561052a57600080fd5b506103806004803603604081101561054157600080fd5b508035906020013561135e565b6103806004803603602081101561056457600080fd5b50356001600160a01b03166115bd565b34801561058057600080fd5b50610344611663565b34801561059557600080fd5b5061038060048036036101408110156105ad57600080fd5b50604081016080820160c083016101008401611669565b3480156105d057600080fd5b50610344611f92565b3480156105e557600080fd5b50610432600480360360208110156105fc57600080fd5b5035611fb7565b34801561060f57600080fd5b50610432611fd2565b34801561062457600080fd5b50610409611fe1565b34801561063957600080fd5b50610432611fea565b34801561064e57600080fd5b50610344611ff9565b610380611fff565b34801561066b57600080fd5b506104096004803603602081101561068257600080fd5b50356001600160a01b03166120a6565b34801561069e57600080fd5b50610432600480360360208110156106b557600080fd5b50356120ce565b3480156106c857600080fd5b506103446120f8565b3480156106dd57600080fd5b506103446120fe565b3480156106f257600080fd5b50610380612104565b34801561070757600080fd5b506104326004803603602081101561071e57600080fd5b50356001600160a01b031661216e565b34801561073a57600080fd5b506103806004803603602081101561075157600080fd5b50356001600160a01b031661218f565b34801561076d57600080fd5b506104096125e3565b34801561078257600080fd5b506103446004803603606081101561079957600080fd5b50803590602081013590604001356125ec565b3480156107b857600080fd5b50610380600480360360208110156107cf57600080fd5b50356001600160a01b0316612603565b3480156107eb57600080fd5b5061034461270e565b34801561080057600080fd5b50610344612714565b34801561081557600080fd5b5061034461271a565b34801561082a57600080fd5b506103806004803603604081101561084157600080fd5b5080359060200135612720565b34801561085a57600080fd5b5061034461295d565b34801561086f57600080fd5b50610344612963565b34801561088457600080fd5b506103446004803603602081101561089b57600080fd5b50356001600160a01b0316612969565b3480156108b757600080fd5b50610344612a5c565b3480156108cc57600080fd5b50610432612a62565b3480156108e157600080fd5b50610409600480360360208110156108f857600080fd5b50356001600160a01b0316612a71565b34801561091457600080fd5b50610432612acb565b34801561092957600080fd5b50610344612ada565b34801561093e57600080fd5b506103806004803603602081101561095557600080fd5b50356001600160a01b0316612ae0565b34801561097157600080fd5b50610432612b2f565b34801561098657600080fd5b506104326004803603602081101561099d57600080fd5b5035612b3e565b3480156109b057600080fd5b50610344612b6d565b3480156109c557600080fd5b50610344612b73565b3480156109da57600080fd5b50610432612b79565b3480156109ef57600080fd5b50610344612b88565b348015610a0457600080fd5b50610344612b8e565b348015610a1957600080fd5b50610344612b94565b348015610a2e57600080fd5b50610a5560048036036020811015610a4557600080fd5b50356001600160a01b0316612b9a565b604080519586526020860194909452848401929092526001600160a01b0316606084015215156080830152519081900360a00190f35b348015610a9757600080fd5b5061038060048036036020811015610aae57600080fd5b5035612bd6565b348015610ac157600080fd5b5061034460048036036020811015610ad857600080fd5b50356001600160a01b0316612ce3565b348015610af457600080fd5b50610380600480360360c0811015610b0b57600080fd5b81359190810190604081016020820135600160201b811115610b2c57600080fd5b820183602082011115610b3e57600080fd5b803590602001918460018302840111600160201b83111715610b5f57600080fd5b919390929091602081019035600160201b811115610b7c57600080fd5b820183602082011115610b8e57600080fd5b803590602001918460208302840111600160201b83111715610baf57600080fd5b919350915080359060208101359060400135612d01565b348015610bd257600080fd5b5061034460048036036020811015610be957600080fd5b5035613065565b348015610bfc57600080fd5b5061043261308d565b348015610c1157600080fd5b5061034460048036036020811015610c2857600080fd5b503561309c565b348015610c3b57600080fd5b5061038060048036036040811015610c5257600080fd5b506001600160a01b03813581169160200135166130ae565b600080610c756120f8565b90506000805b82811015610d2157846001600160a01b0316639168ae72610c9b83612b3e565b6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610ce157600080fd5b505afa158015610cf5573d6000803e3d6000fd5b505050506040513d6020811015610d0b57600080fd5b505115610d19576001909101905b600101610c7b565b509150505b919050565b336000908152601d602052604090205460ff16610d7f576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b610d87611fe1565b15610dc7576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b610dd033613162565b6000610dda611f92565b905080821015610de8578091505b610df233836131f9565b505050565b610dff612b6d565b811015610e45576040805162461bcd60e51b815260206004820152600f60248201526e1053149150511657d11150d2511151608a1b604482015290519081900360640190fd5b610e4d61271a565b811115610e90576040805162461bcd60e51b815260206004820152600c60248201526b1113d154d39517d1561254d560a21b604482015290519081900360640190fd5b50565b600c5481565b6001600160a01b03166000908152600a602052604090205490565b601e5443101590565b6011546001600160a01b031681565b6001600160a01b031660009081526008602052604090206001015490565b336000908152601d602052604090205460ff16610f3e576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b610f46611fe1565b15610f86576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b610f8f336120a6565b610fcd576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b610fd5615351565b60408051808201909152611108908860026000835b8282101561102b5760408051606081810190925290808402860190600390839083908082843760009201919091525050508152600190910190602001610fea565b505060408051808201909152915089905060026000835b828210156110835760408051608081810190925290808402860190600490839083908082843760009201919091525050508152600190910190602001611042565b505050508787601160009054906101000a90046001600160a01b03166001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b1580156110d757600080fd5b505afa1580156110eb573d6000803e3d6000fd5b505050506040513d602081101561110157600080fd5b50516132bf565b805160e0015190915060009061112590439063ffffffff61330d16565b905060185481101561116b576040805162461bcd60e51b815260206004820152600a60248201526954494d455f44454c544160b01b604482015290519081900360640190fd5b60006111768361336a565b9050826000015161010001518360200151604001511015806111ab5750600e546111a790839063ffffffff61338616565b8110155b806111d7575082516060908101516020850151909101516064916111d5919063ffffffff61330d16565b145b611214576040805162461bcd60e51b81526020600482015260096024820152681513d3d7d4d350531360ba1b604482015290519081900360640190fd5b8251606090810151602085015190910151606491611238919063ffffffff61330d16565b111561127c576040805162461bcd60e51b815260206004820152600e60248201526d544f4f5f4d414e595f53454e445360901b604482015290519081900360640190fd5b6112a26004611296600e548561338690919063ffffffff16565b9063ffffffff61338616565b8111156112e2576040805162461bcd60e51b8152602060048201526009602482015268544f4f5f4c4152474560b81b604482015290519081900360640190fd5b505061133f81888886866040518060c0016040528061130033610ecc565b8152600c546020820152600e5460408201526011546001600160a01b039081166060830152601354811660808301526015541660a0909101528e6133df565b506113543361134c61271a565b600c54613a99565b5050505050505050565b336000908152601d602052604090205460ff166113b2576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6113ba611fe1565b156113fa576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b611403336120a6565b611441576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b8061144b8361309c565b1461148a576040805162461bcd60e51b815260206004820152600a6024820152694e4f44455f52454f524760b01b604482015290519081900360640190fd5b611492612b6d565b82101580156114a857506114a461271a565b8211155b6114f1576040805162461bcd60e51b81526020600482015260156024820152744e4f44455f4e554d5f4f55545f4f465f52414e474560581b604482015290519081900360640190fd5b60006114fc83611fb7565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561153757600080fd5b505afa15801561154b573d6000803e3d6000fd5b505050506040513d602081101561156157600080fd5b505161156c33610ecc565b146115b0576040805162461bcd60e51b815260206004820152600f60248201526e2727aa2fa9aa20a5a2a22fa82922ab60891b604482015290519081900360640190fd5b610df23384600c54613a99565b336000908152601d602052604090205460ff16611611576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b611619611fe1565b15611659576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b610e908134613c32565b60185481565b336000908152601d602052604090205460ff166116bd576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6116c5611fe1565b15611705576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b602084013584351061174c576040805162461bcd60e51b815260206004820152600b60248201526a2ba927a723afa7a92222a960a91b604482015290519081900360640190fd5b61175461271a565b6020850135111561179b576040805162461bcd60e51b815260206004820152600c60248201526b1393d517d41493d413d4d15160a21b604482015290519081900360640190fd5b83356117a56120fe565b106117eb576040805162461bcd60e51b81526020600482015260116024820152701053149150511657d0d3d3919254935151607a1b604482015290519081900360640190fd5b60006117fd85825b6020020135611fb7565b9050600061180c8660016117f3565b9050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561184757600080fd5b505afa15801561185b573d6000803e3d6000fd5b505050506040513d602081101561187157600080fd5b5051604080516311e7249560e21b815290516001600160a01b0385169163479c9254916004808301926020929190829003018186803b1580156118b357600080fd5b505afa1580156118c7573d6000803e3d6000fd5b505050506040513d60208110156118dd57600080fd5b50511461191d576040805162461bcd60e51b81526020600482015260096024820152682224a3232fa82922ab60b91b604482015290519081900360640190fd5b6119378760005b60200201356001600160a01b0316613162565b611942876001611924565b604080516348b4573960e11b81526001600160a01b03893581166004830152915191841691639168ae7291602480820192602092909190829003018186803b15801561198d57600080fd5b505afa1580156119a1573d6000803e3d6000fd5b505050506040513d60208110156119b757600080fd5b50516119ff576040805162461bcd60e51b815260206004820152601260248201527114d51052d1548c57d393d517d4d51052d15160721b604482015290519081900360640190fd5b604080516348b4573960e11b81526001600160a01b0360208a81013582166004840152925190841692639168ae729260248082019391829003018186803b158015611a4957600080fd5b505afa158015611a5d573d6000803e3d6000fd5b505050506040513d6020811015611a7357600080fd5b5051611abb576040805162461bcd60e51b815260206004820152601260248201527114d51052d1548c97d393d517d4d51052d15160721b604482015290519081900360640190fd5b611ad0853585358560005b6020020135613ce1565b826001600160a01b0316635b8b22806040518163ffffffff1660e01b815260040160206040518083038186803b158015611b0957600080fd5b505afa158015611b1d573d6000803e3d6000fd5b505050506040513d6020811015611b3357600080fd5b505114611b74576040805162461bcd60e51b815260206004820152600a6024820152694348414c5f484153483160b01b604482015290519081900360640190fd5b611b8960208087013590860135856001611ac6565b816001600160a01b0316635b8b22806040518163ffffffff1660e01b815260040160206040518083038186803b158015611bc257600080fd5b505afa158015611bd6573d6000803e3d6000fd5b505050506040513d6020811015611bec57600080fd5b505114611c2d576040805162461bcd60e51b815260206004820152600a60248201526921a420a62fa420a9a41960b11b604482015290519081900360640190fd5b6000611da7611cca600d54611cbe88600060028110611c4857fe5b6020020135876001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8657600080fd5b505afa158015611c9a573d6000803e3d6000fd5b505050506040513d6020811015611cb057600080fd5b50519063ffffffff61330d16565b9063ffffffff613d1816565b611d37856001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0657600080fd5b505afa158015611d1a573d6000803e3d6000fd5b505050506040513d6020811015611d3057600080fd5b5051611fb7565b6001600160a01b031663d7ff5e356040518163ffffffff1660e01b815260040160206040518083038186803b158015611d6f57600080fd5b505afa158015611d83573d6000803e3d6000fd5b505050506040513d6020811015611d9957600080fd5b50519063ffffffff613d1816565b90506020850135811015611de157611dd96001600160a01b0389351689600160200201356001600160a01b0316613d72565b505050611f8b565b6014546000906001600160a01b0390811690638ecaab119030908a35908935908e35168e600160200201356001600160a01b0316611e398d600060028110611e2557fe5b60200201358a61330d90919063ffffffff16565b611e538e600160200201358b61330d90919063ffffffff16565b601154601054604080516001600160e01b031960e08d901b1681526001600160a01b039a8b166004820152602481019990995260448901979097529488166064880152928716608487015260a486019190915260c4850152841660e484015290921661010482015290516101248083019260209291908290030181600087803b158015611edf57600080fd5b505af1158015611ef3573d6000803e3d6000fd5b505050506040513d6020811015611f0957600080fd5b50519050611f326001600160a01b038a35168a600160200201356001600160a01b031683613df9565b604080516001600160a01b038b35811682526020808d01358216908301528a35828401529151918316917fa5256d19d4ddaf646f4b5c1861b8d4c08238e6356b8ae36dcc49ac67fda758799181900360600190a2505050505b5050505050565b600080611f9d612b6d565b9050611fb14382611fac61271a565b613e43565b91505090565b6000908152600560205260409020546001600160a01b031690565b6017546001600160a01b031681565b600b5460ff1690565b6014546001600160a01b031681565b600e5490565b336000908152601d602052604090205460ff16612053576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61205b611fe1565b1561209b576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6120a4346140fa565b565b6001600160a01b0316600090815260086020526040902060030154600160a01b900460ff1690565b6000600782815481106120dd57fe5b6000918252602090912001546001600160a01b031692915050565b60095490565b60015490565b600061210e612b6d565b90506121186120fe565b8111801561212d575061212961271a565b8111155b610e90576040805162461bcd60e51b815260206004820152600d60248201526c1393d7d553949154d3d3159151609a1b604482015290519081900360640190fd5b6001600160a01b039081166000908152600860205260409020600301541690565b336000908152601d602052604090205460ff166121e3576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6121eb611fe1565b1561222b576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b612233612104565b600061223d6120fe565b90506000612249612b6d565b9050600061225682611fb7565b905082816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b15801561229257600080fd5b505afa1580156122a6573d6000803e3d6000fd5b505050506040513d60208110156122bc57600080fd5b50511415612545576122cd846120a6565b61230b576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b61231c61231785610ecc565b610df7565b806001600160a01b0316639168ae72856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561237257600080fd5b505afa158015612386573d6000803e3d6000fd5b505050506040513d602081101561239c57600080fd5b5051156123e3576040805162461bcd60e51b815260206004820152601060248201526f14d51052d15117d3d397d5105491d15560821b604482015290519081900360640190fd5b806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b15801561241c57600080fd5b505afa158015612430573d6000803e3d6000fd5b5050505061243d83611fb7565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b15801561247557600080fd5b505afa158015612489573d6000803e3d6000fd5b505050506124976000612bd6565b6124a081610c6a565b816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b1580156124d957600080fd5b505afa1580156124ed573d6000803e3d6000fd5b505050506040513d602081101561250357600080fd5b505114612545576040805162461bcd60e51b815260206004820152600b60248201526a4841535f5354414b45525360a81b604482015290519081900360640190fd5b61254d614306565b60135460408051630c2a09ad60e21b81526004810185905290516001600160a01b03909216916330a826b49160248082019260009290919082900301818387803b15801561259a57600080fd5b505af11580156125ae573d6000803e3d6000fd5b50506040518492507f9f7eee12f08e41a1d1a617e76576aa2d6a1e06dbdd72d817e62b6e8dfdebe2a39150600090a250505050565b60005460ff1690565b60006125f9848484613e43565b90505b9392505050565b336000908152601d602052604090205460ff16612657576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61265f610eb4565b6126ab5761266b611fe1565b156126ab576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6126b36120fe565b6126bc82610ecc565b11156126fc576040805162461bcd60e51b815260206004820152600a6024820152691513d3d7d49150d1539560b21b604482015290519081900360640190fd5b61270581613162565b610e908161431c565b600f5481565b600d5481565b60035490565b336000908152601d602052604090205460ff16612774576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b61277c611fe1565b156127bc576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6127c46120f8565b821115612809576040805162461bcd60e51b815260206004820152600e60248201526d4e4f5f535543485f5a4f4d42494560901b604482015290519081900360640190fd5b600061281483612b3e565b9050600061282184613065565b905060008061282e612b6d565b90505b80831015801561284057508482105b1561293557600061285084611fb7565b9050806001600160a01b03166396a9fdc0866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b1580156128aa57600080fd5b505af11580156128be573d6000803e3d6000fd5b50505050806001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b1580156128fb57600080fd5b505afa15801561290f573d6000803e3d6000fd5b505050506040513d602081101561292557600080fd5b5051935050600190910190612831565b8083101561294b5761294686614382565b612955565b612955868461441e565b505050505050565b601a5481565b601e5481565b336000908152601d602052604081205460ff166129bd576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b6129c5610eb4565b612a11576129d1611fe1565b15612a11576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6000612a1c33614445565b6040519091506001600160a01b0384169082156108fc029083906000818181858888f19350505050158015612a55573d6000803e3d6000fd5b5092915050565b60045490565b6016546001600160a01b031681565b6000805b600954811015612ac25760098181548110612a8c57fe5b60009182526020909120600290910201546001600160a01b0384811691161415612aba576001915050610d26565b600101612a75565b50600092915050565b6013546001600160a01b031681565b61a4b190565b6001600160a01b03811615610e90576040805162461bcd60e51b815260206004820152601060248201526f1393d7d513d2d15397d0531313d5d15160821b604482015290519081900360640190fd5b6012546001600160a01b031681565b600060098281548110612b4d57fe5b60009182526020909120600290910201546001600160a01b031692915050565b60025490565b600e5481565b6015546001600160a01b031681565b601b5481565b60075490565b60195481565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160a01b03811690600160a01b900460ff1685565b336000908152601d602052604090205460ff16612c2a576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612c32610eb4565b612c7e57612c3e611fe1565b15612c7e576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b6000612c886120f8565b90506000612c94612b6d565b9050825b82811015612cdd575b81612cab82613065565b1015612cd557612cba81614382565b60001990920191828110612cd057505050610e90565b612ca1565b600101612c98565b50505050565b6001600160a01b031660009081526008602052604090206002015490565b336000908152601d602052604090205460ff16612d55576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b612d5d610eb4565b612da957612d69611fe1565b15612da9576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b612db1612104565b6000612dbb612b8e565b11612dfa576040805162461bcd60e51b815260206004820152600a6024820152694e4f5f5354414b45525360b01b604482015290519081900360640190fd5b6000612e0c612e07612b6d565b611fb7565b9050806001600160a01b03166388d221c66040518163ffffffff1660e01b815260040160006040518083038186803b158015612e4757600080fd5b505afa158015612e5b573d6000803e3d6000fd5b50505050612e6a612e076120fe565b6001600160a01b0316633aa192746040518163ffffffff1660e01b815260040160006040518083038186803b158015612ea257600080fd5b505afa158015612eb6573d6000803e3d6000fd5b50505050612ec26120fe565b816001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015612efb57600080fd5b505afa158015612f0f573d6000803e3d6000fd5b505050506040513d6020811015612f2557600080fd5b505114612f68576040805162461bcd60e51b815260206004820152600c60248201526b24a72b20a624a22fa82922ab60a11b604482015290519081900360640190fd5b612f726000612bd6565b612f86612f7e82610c6a565b611cbe612b8e565b816001600160a01b031663dff697876040518163ffffffff1660e01b815260040160206040518083038186803b158015612fbf57600080fd5b505afa158015612fd3573d6000803e3d6000fd5b505050506040513d6020811015612fe957600080fd5b50511461302e576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d0531317d4d51052d15160921b604482015290519081900360640190fd5b60125460135461305a918b918b918b918b918b918b918b918b916001600160a01b0390811691166144a8565b505050505050505050565b60006009828154811061307457fe5b9060005260206000209060020201600101549050919050565b6010546001600160a01b031681565b60009081526006602052604090205490565b6130b6611fe1565b156130f6576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b61310082826144c9565b6001600160a01b0316336001600160a01b031614613154576040805162461bcd60e51b815260206004820152600c60248201526b2ba927a723afa9a2a72222a960a11b604482015290519081900360640190fd5b61315e8282613d72565b5050565b61316b816120a6565b6131a9576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4d51052d15160b21b604482015290519081900360640190fd5b60006131b48261216e565b6001600160a01b031614610e90576040805162461bcd60e51b8152602060048201526007602482015266125397d0d2105360ca1b604482015290519081900360640190fd5b6001600160a01b038216600090815260086020526040812060028101548084111561325e576040805162461bcd60e51b815260206004820152601060248201526f544f4f5f4c4954544c455f5354414b4560801b604482015290519081900360640190fd5b6000613270828663ffffffff61330d16565b600284018690559050613283868261458f565b604080518381526020810187905281516001600160a01b0389169260008051602061543f833981519152928290030190a2925050505b92915050565b6132c7615351565b604080518082019091528651865182916132e291888861461a565b815260200161330188600160200201518860016020020151438761461a565b90529695505050505050565b600082821115613364576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8051516020820151516000916132b9919063ffffffff61330d16565b600082613395575060006132b9565b828202828482816133a257fe5b04146125fc5760405162461bcd60e51b815260040180806020018281038252602181526020018061545f6021913960400191505060405180910390fd5b60006133e9615376565b6133f28961336a565b60e0820152835161340290611fb7565b81606001906001600160a01b031690816001600160a01b03168152505083606001516001600160a01b0316633dbcc8d16040518163ffffffff1660e01b815260040160206040518083038186803b15801561345c57600080fd5b505afa158015613470573d6000803e3d6000fd5b505050506040513d602081101561348657600080fd5b5051815260608101516040805163380ed4c760e11b815290516001600160a01b039092169163701da98e91600480820192602092909190829003018186803b1580156134d157600080fd5b505afa1580156134e5573d6000803e3d6000fd5b505050506040513d60208110156134fb57600080fd5b50518951613508906146b8565b1461354c576040805162461bcd60e51b815260206004820152600f60248201526e0a0a48aacbea6a882a88abe9082a69608b1b604482015290519081900360640190fd5b805160208a015160400151111561359b576040805162461bcd60e51b815260206004820152600e60248201526d12539093d617d41054d517d1539160921b604482015290519081900360640190fd5b83606001516001600160a01b031663dc1b7b1f87878c60200151604001516040518463ffffffff1660e01b815260040180806020018381526020018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050604080518083038186803b15801561361e57600080fd5b505afa158015613632573d6000803e3d6000fd5b505050506040513d604081101561364857600080fd5b5080516020909101516101208301526101008201526136668961474d565b81604001818152505061368b84604001518260e001518660200151846060015161477e565b8160c0018181525050600081606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136d357600080fd5b505afa1580156136e7573d6000803e3d6000fd5b505050506040513d60208110156136fd57600080fd5b50511160a08201819052156137875761377d81606001516001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561374c57600080fd5b505afa158015613760573d6000803e3d6000fd5b505050506040513d602081101561377657600080fd5b505161309c565b6080820152613798565b83516137929061309c565b60808201525b8360a001516001600160a01b031663d45ab2b56137b88b602001516146b8565b6137c78c8560400151436148ec565b6137d08d614901565b88600001518660c001516040518663ffffffff1660e01b81526004018086815260200185815260200184815260200183815260200182815260200195505050505050602060405180830381600087803b15801561382c57600080fd5b505af1158015613840573d6000803e3d6000fd5b505050506040513d602081101561385657600080fd5b50516001600160a01b03166020820152600061387061271a565b600101905081606001516001600160a01b0316631bc09d0a826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156138bf57600080fd5b505af11580156138d3573d6000803e3d6000fd5b505050506138f48260a0015183608001518460400151856101200151614931565b9250838314613941576040805162461bcd60e51b81526020600482015260146024820152730aa9c8ab0a08a86a88a88be9c9e888abe9082a6960631b604482015290519081900360640190fd5b61394f826020015184614998565b6080850151855160c084015160408051638b8ca19960e01b81526004810186905260248101939093526044830191909152336064830152516001600160a01b0390921691638b8ca1999160848082019260009290919082900301818387803b1580156139ba57600080fd5b505af11580156139ce573d6000803e3d6000fd5b50505050506139e0846000015161309c565b6139e861271a565b7f8016306209aff73e79f274cf38a41928996f746e2953111902e1f55be1713a5484846040015185600001518661010001518761012001518f8f6040518088815260200187815260200186815260200185815260200184815260200183600260600280828437600083820152601f01601f191690910190508261010080828437600083820152604051601f909101601f1916909201829003995090975050505050505050a350979650505050505050565b6001600160a01b0380841660008181526008602090815260408083208784526005835281842054825163123334b760e11b815260048101969096529151909591909116938492632466696e9260248084019382900301818787803b158015613b0057600080fd5b505af1158015613b14573d6000803e3d6000fd5b505050506040513d6020811015613b2a57600080fd5b5051600180850187905590915081141561295557600060056000846001600160a01b031663479c92546040518163ffffffff1660e01b815260040160206040518083038186803b158015613b7d57600080fd5b505afa158015613b91573d6000803e3d6000fd5b505050506040513d6020811015613ba757600080fd5b505181526020810191909152604001600020546001600160a01b0316905080636971dfe5613bdb438863ffffffff613d1816565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015613c1157600080fd5b505af1158015613c25573d6000803e3d6000fd5b5050505050505050505050565b336000908152601d602052604090205460ff16613c86576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b613c8e611fe1565b15613cce576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b613cd782613162565b61315e82826149e2565b6040805160208082019590955280820193909352606080840192909252805180840390920182526080909201909152805191012090565b6000828201838110156125fc576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000613d7d82612ce3565b90506000613d8a84612ce3565b905080821115613db157613dae613da184836131f9565b839063ffffffff61330d16565b91505b60028204613dbf85826149e2565b613dcf838263ffffffff61330d16565b9250613dda85614a56565b601654613df0906001600160a01b03168461458f565b611f8b84614a80565b6001600160a01b03928316600090815260086020526040808220600390810180549487166001600160a01b0319958616811790915594909516825290209092018054909216179055565b600081600184031415613e595750600f546125fc565b6000613e6484611fb7565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e9c57600080fd5b505afa158015613eb0573d6000803e3d6000fd5b505050506040513d6020811015613ec657600080fd5b5051905080851015613edc575050600f546125fc565b613ee46153ca565b506040805161014081018252600181526201e05b60208201526201f7d191810191909152620138916060820152620329e160808201526201be4360a08201526204cb8c60c08201526201fbc460e082015262036d3261010082015262027973610120820152613f516153ca565b506040805161014081018252600181526201c03060208201526201b6999181019190915261fde26060820152620265c6608082015262013b8e60a0820152620329e160c08201526201389160e08201526201f7d1610100820152620153756101208201526000613fc7888563ffffffff61330d16565b90506000613ff1600c54613fe5600a8561338690919063ffffffff16565b9063ffffffff614b3016565b905060ff61400682600a63ffffffff614b3016565b1061401a57600019955050505050506125fc565b600061402d82600a63ffffffff614b3016565b60020a9050600085600a8406600a811061404357fe5b602002015162ffffff168202905085600a8406600a811061406057fe5b602002015162ffffff1682828161407357fe5b041461408a576000199750505050505050506125fc565b60006140b586600a8606600a811061409e57fe5b6020020151839062ffffff1663ffffffff614b3016565b9050806140c0575060015b600f5480820290829082816140d157fe5b04146140ea5760001999505050505050505050506125fc565b9c9b505050505050505050505050565b336000908152601d602052604090205460ff1661414e576040805162461bcd60e51b815260206004820152600d60248201526c2727aa2fab20a624a220aa27a960991b604482015290519081900360640190fd5b614156611fe1565b15614196576040805162461bcd60e51b81526020600482015260106024820152600080516020615480833981519152604482015290519081900360640190fd5b61419f336120a6565b156141e2576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b604482015290519081900360640190fd5b6141eb33612a71565b15614230576040805162461bcd60e51b815260206004820152601060248201526f5354414b45525f49535f5a4f4d42494560801b604482015290519081900360640190fd5b614238611f92565b81101561427f576040805162461bcd60e51b815260206004820152601060248201526f4e4f545f454e4f5547485f5354414b4560801b604482015290519081900360640190fd5b6142893382614b97565b6013546001600160a01b031663f03c04a5336142a36120fe565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156142f257600080fd5b505af1158015611f8b573d6000803e3d6000fd5b614311600254614c90565b600280546001019055565b6001600160a01b03811660009081526008602052604090206002810154614343838261458f565b61434c83614d12565b604080518281526000602082015281516001600160a01b0386169260008051602061543f833981519152928290030190a2505050565b60098054600019810190811061439457fe5b9060005260206000209060020201600982815481106143af57fe5b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b0390921691909117815560019182015491015560098054806143f257fe5b60008281526020812060026000199093019283020180546001600160a01b031916815560010155905550565b806009838154811061442c57fe5b9060005260206000209060020201600101819055505050565b6001600160a01b0381166000818152600a60209081526040808320805490849055815181815292830184905281519394909390927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae292908290030190a292915050565b6144bd6002548b8b8b8b8b8b8b8b8b8b614e38565b50505050505050505050565b6001600160a01b03808316600090815260086020526040808220848416835290822060038201549293919290911680614533576040805162461bcd60e51b81526020600482015260076024820152661393d7d0d2105360ca1b604482015290519081900360640190fd5b60038201546001600160a01b03828116911614614586576040805162461bcd60e51b815260206004820152600c60248201526b1112519197d25397d0d2105360a21b604482015290519081900360640190fd5b95945050505050565b6001600160a01b0382166000908152600a6020526040812054906145b9828463ffffffff613d1816565b6001600160a01b0385166000818152600a60209081526040918290208490558151868152908101849052815193945091927fa740af14c56e4e04a617b1de1eb20de73270decbaaead14f142aabf3038e5ae29281900390910190a250505050565b6146226153e9565b60408051610120810182528551815286516020820152908101856001602002015181526020018560026004811061465557fe5b602002015181526020018560036004811061466c57fe5b602002015181526020018660016003811061468357fe5b602002015181526020018660026003811061469a57fe5b60200201518152602001848152602001838152509050949350505050565b6000816000015182602001518360400151846060015185608001518660a001518760c001518860e00151896101000151604051602001808a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019950505050505050505050604051602081830303815290604052805190602001209050919050565b805180516020830151516000926132b992918290039061476c90615109565b6147798660200151615109565b61513e565b6000806147a686613fe561479982600163ffffffff61330d16565b889063ffffffff613d1816565b905061482981611cbe6147bf438863ffffffff613d1816565b866001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156147f857600080fd5b505afa15801561480c573d6000803e3d6000fd5b505050506040513d602081101561482257600080fd5b505161517c565b91506000836001600160a01b031663f0dd77ff6040518163ffffffff1660e01b815260040160206040518083038186803b15801561486657600080fd5b505afa15801561487a573d6000803e3d6000fd5b505050506040513d602081101561489057600080fd5b5051905080156148e2576148df836148a783611fb7565b6001600160a01b0316632edfb42a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156147f857600080fd5b92505b5050949350505050565b60006125f98383866020015160400151613ce1565b805160a09081015160208301519182015160c083015160608401516080909401516000946132b994939291615192565b60008085614940576000614943565b60015b905080858585604051602001808560ff1660ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120915050949350505050565b60038054600101808255600090815260056020908152604080832080546001600160a01b0319166001600160a01b0397909716969096179095559154815260069091529190912055565b6001600160a01b038216600090815260086020526040812060028101549091614a11828563ffffffff613d1816565b60028401819055604080518481526020810183905281519293506001600160a01b0388169260008051602061543f833981519152929181900390910190a25050505050565b6001600160a01b0316600090815260086020526040902060030180546001600160a01b0319169055565b6001600160a01b0381811660008181526008602090815260408083208151808301909252938152600180850154928201928352600980549182018155909352517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af600290930292830180546001600160a01b031916919095161790935591517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b09092019190915561315e82614d12565b6000808211614b86576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381614b8f57fe5b049392505050565b6007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688810180546001600160a01b038087166001600160a01b031992831681179093556040805160a081018252858152865460208281019182528284018a8152600060608501818152608086018c81528a8352600885528783209651875594519b86019b909b559051600285015598516003909301805492511515600160a01b0260ff60a01b199490961692909616919091179190911692909217909255436004558151948552840185905280519293919260008051602061543f8339815191529281900390910190a2505050565b60008181526005602052604080822054815163083197ef60e41b815291516001600160a01b03909116926383197ef0926004808201939182900301818387803b158015614cdc57600080fd5b505af1158015614cf0573d6000803e3d6000fd5b50505060009182525060056020526040902080546001600160a01b0319169055565b6001600160a01b03811660009081526008602052604090208054600780546000198101908110614d3e57fe5b600091825260209091200154600780546001600160a01b039092169183908110614d6457fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806008600060078481548110614da457fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556007805480614dd457fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03949094168152600890935250506040812081815560018101829055600281019190915560030180546001600160a81b0319169055565b6000614eb98a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c918291850190849080828437600081840152601f19601f820116905080830192505050505050508d6151d9565b90506000614ec68d611fb7565b9050614ed58c83888a89615192565b816001600160a01b03166397bdc5106040518163ffffffff1660e01b815260040160206040518083038186803b158015614f0e57600080fd5b505afa158015614f22573d6000803e3d6000fd5b505050506040513d6020811015614f3857600080fd5b505114614f7b576040805162461bcd60e51b815260206004820152600c60248201526b434f4e4649524d5f4441544160a01b604482015290519081900360640190fd5b836001600160a01b0316630c7268478c8c8c8c6040518563ffffffff1660e01b81526004018080602001806020018381038352878782818152602001925080828437600083820152601f01601f19169091018481038352858152602090810191508690860280828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801561501d57600080fd5b505af1158015615031573d6000803e3d6000fd5b50505050615040600154614c90565b60018d81558d01600255604080516316b9109b60e01b8152600481018f905290516001600160a01b038516916316b9109b91602480830192600092919082900301818387803b15801561509257600080fd5b505af11580156150a6573d6000803e3d6000fd5b505050508c7f2400bd6e429cfcd98fe43a75bbbe4702c59c99d636100690130cc1ebb611c5a2838989896040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050505050505050565b60006132b98260000151615139846040015185602001518660a0015187606001518860c0015189608001516152da565b615325565b604080516020808201969096528082019490945260608401929092526080808401919091528151808403909101815260a09092019052805191012090565b600081831161518b57816125fc565b5090919050565b60408051602080820197909752808201959095526060850192909252608084019290925260a0808401929092528051808403909201825260c0909201909152805191012090565b81518351600091829184835b8381101561528c5760008882815181106151fb57fe5b6020026020010151905083818701111561524b576040805162461bcd60e51b815260206004820152600c60248201526b2220aa20afa7ab22a9292aa760a11b604482015290519081900360640190fd5b6020868b01810182902060408051808401969096528581019190915280518086038201815260609095019052835193019290922091909401936001016151e5565b508184146152cf576040805162461bcd60e51b815260206004820152600b60248201526a08882a882be988a9c8ea8960ab1b604482015290519081900360640190fd5b979650505050505050565b60408051602080820198909852808201969096526060860194909452608085019290925260a084015260c0808401919091528151808403909101815260e09092019052805191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60405180604001604052806153646153e9565b81526020016153716153e9565b905290565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081019190915290565b604051806101400160405280600a906020820280368337509192915050565b604051806101200160405280600081526020016000801916815260200160008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152509056feebd093d389ab57f3566918d2c379a2b4d9539e8eb95efad9d5e465457833fde6536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775061757361626c653a2070617573656400000000000000000000000000000000a26469706673582212208c3d38675521346566e8f28939516bbd5f14bb6d5eb606cf9443f07198e6875464736f6c634300060b0033608060405234801561001057600080fd5b5061132a806100206000396000f3fe6080604052600436106100de5760003560e01c8063945e114711610085578063945e1147146102225780639e5d4c491461024c578063a8929e0b14610361578063ab5d894314610376578063c29372de1461038b578063cee3d728146103be578063d9dd67ab146103f9578063e45b7ce614610423578063f2fde38b1461045e576100de565b806301d8d0c1146100e357806302bbfad11461010a5780633dbcc8d11461013f578063413b35bd14610154578063715018a61461019b5780637ee94329146101b25780638129fc1c146101f85780638da5cb5b1461020d575b600080fd5b3480156100ef57600080fd5b506100f8610491565b60408051918252519081900360200190f35b6100f86004803603606081101561012057600080fd5b5060ff813516906001600160a01b036020820135169060400135610497565b34801561014b57600080fd5b506100f8610505565b34801561016057600080fd5b506101876004803603602081101561017757600080fd5b50356001600160a01b031661050b565b604080519115158252519081900360200190f35b3480156101a757600080fd5b506101b061052c565b005b3480156101be57600080fd5b506101dc600480360360208110156101d557600080fd5b50356105c6565b604080516001600160a01b039092168252519081900360200190f35b34801561020457600080fd5b506101b06105ed565b34801561021957600080fd5b506101dc610697565b34801561022e57600080fd5b506101dc6004803603602081101561024557600080fd5b50356106a6565b34801561025857600080fd5b506102de6004803603606081101561026f57600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561029f57600080fd5b8201836020820111156102b157600080fd5b803590602001918460018302840111640100000000831117156102d357600080fd5b5090925090506106b3565b604051808315151515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561032557818101518382015260200161030d565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561036d57600080fd5b506100f8610887565b34801561038257600080fd5b506101dc61088d565b34801561039757600080fd5b50610187600480360360208110156103ae57600080fd5b50356001600160a01b031661089c565b3480156103ca57600080fd5b506101b0600480360360408110156103e157600080fd5b506001600160a01b03813516906020013515156108bd565b34801561040557600080fd5b506100f86004803603602081101561041c57600080fd5b5035610b36565b34801561042f57600080fd5b506101b06004803603604081101561044657600080fd5b506001600160a01b0381351690602001351515610b54565b34801561046a57600080fd5b506101b06004803603602081101561048157600080fd5b50356001600160a01b0316610dcb565b60685490565b3360009081526065602052604081206001015460ff166104ef576040805162461bcd60e51b815260206004820152600e60248201526d09c9ea8be8ca49e9abe929c849eb60931b604482015290519081900360640190fd5b6104fd848443423a87610ebc565b949350505050565b606a5490565b6001600160a01b031660009081526066602052604090206001015460ff1690565b610534610f7f565b6001600160a01b0316610545610697565b6001600160a01b03161461058e576040805162461bcd60e51b815260206004820181905260248201526000805160206112b5833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316906000805160206112d5833981519152908390a3603380546001600160a01b0319169055565b606781815481106105d357fe5b6000918252602090912001546001600160a01b0316905081565b600054610100900460ff16806106065750610606610f83565b80610614575060005460ff16155b61064f5760405162461bcd60e51b815260040180806020018281038252602e815260200180611287602e913960400191505060405180910390fd5b600054610100900460ff1615801561067a576000805460ff1961ff0019909116610100171660011790555b610682610f94565b8015610694576000805461ff00191690555b50565b6033546001600160a01b031690565b606881815481106105d357fe5b3360009081526066602052604081206001015460609060ff1661070f576040805162461bcd60e51b815260206004820152600f60248201526e09c9ea8be8ca49e9abe9eaaa8849eb608b1b604482015290519081900360640190fd5b821561076a57610727866001600160a01b0316611031565b61076a576040805162461bcd60e51b815260206004820152600f60248201526e1393d7d0d3d11157d05517d11154d5608a1b604482015290519081900360640190fd5b606980546001600160a01b0319811633179091556040516001600160a01b0391821691881690879087908790808383808284376040519201945060009350909150508083038185875af1925050503d80600081146107e4576040519150601f19603f3d011682016040523d82523d6000602084013e6107e9565b606091505b50606980546001600160a01b0319166001600160a01b0385811691909117909155604080518a81526020810182815291810189905293965091945089169133917f2d9d115ef3e4a606d698913b1eae831a3cdfe20d9a83d48007b0526749c3d466918a918a918a9160608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a35094509492505050565b61a4b590565b6069546001600160a01b031681565b6001600160a01b031660009081526065602052604090206001015460ff1690565b6108c5610f7f565b6001600160a01b03166108d6610697565b6001600160a01b03161461091f576040805162461bcd60e51b815260206004820181905260248201526000805160206112b5833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152606660209081526040918290206001810154835186151581529351919460ff9091169390927f49477e7356dbcb654ab85d7534b50126772d938130d1350e23e2540370c8dffa92918290030190a28080156109865750825b80610998575080158015610998575082155b156109a4575050610b32565b8215610a3357604080518082018252606880548252600160208084018281526001600160a01b038a16600081815260669093529582209451855551938201805460ff1916941515949094179093558154908101825591527fa2153420d844928b4421650203c77babc8b33d7f2e7b450e2966db0c220977530180546001600160a01b0319169091179055610b2f565b606880546000198101908110610a4557fe5b6000918252602090912001548254606880546001600160a01b03909316929091908110610a6e57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160000154606660006068856000015481548110610ab657fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556068805480610ae657fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526066905260408120908155600101805460ff191690555b50505b5050565b606a8181548110610b4357fe5b600091825260209091200154905081565b610b5c610f7f565b6001600160a01b0316610b6d610697565b6001600160a01b031614610bb6576040805162461bcd60e51b815260206004820181905260248201526000805160206112b5833981519152604482015290519081900360640190fd5b6001600160a01b0382166000818152606560209081526040918290206001810154835186151581529351919460ff9091169390927f6675ce8882cb71637de5903a193d218cc0544be9c0650cb83e0955f6aa2bf52192918290030190a2808015610c1d5750825b80610c2f575080158015610c2f575082155b15610c3b575050610b32565b8215610cca57604080518082018252606780548252600160208084018281526001600160a01b038a16600081815260659093529582209451855551938201805460ff1916941515949094179093558154908101825591527f9787eeb91fe3101235e4a76063c7023ecb40f923f97916639c598592fa30d6ae0180546001600160a01b0319169091179055610b2f565b606780546000198101908110610cdc57fe5b6000918252602090912001548254606780546001600160a01b03909316929091908110610d0557fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160000154606560006067856000015481548110610d4d57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020556067805480610d7d57fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861682526065905260408120908155600101805460ff1916905550505050565b610dd3610f7f565b6001600160a01b0316610de4610697565b6001600160a01b031614610e2d576040805162461bcd60e51b815260206004820181905260248201526000805160206112b5833981519152604482015290519081900360640190fd5b6001600160a01b038116610e725760405162461bcd60e51b81526004018080602001828103825260268152602001806112616026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216906000805160206112d583398151915290600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b606a5460009081610ed289898989868a8a611037565b905060008215610efa57606a6001840381548110610eec57fe5b906000526020600020015490505b606a610f0682846110ad565b8154600181018355600092835260209283902001556040805133815260ff8d16928101929092526001600160a01b038b16828201526060820187905251829185917f23be8e12e420b5da9fb98d8102572f640fb3c11a0085060472dfc0ed194b3cf79181900360800190a3509098975050505050505050565b3390565b6000610f8e30611031565b15905090565b600054610100900460ff1680610fad5750610fad610f83565b80610fbb575060005460ff16155b610ff65760405162461bcd60e51b815260040180806020018281038252602e815260200180611287602e913960400191505060405180910390fd5b600054610100900460ff16158015611021576000805460ff1961ff0019909116610100171660011790555b6110296110d9565b610682611179565b3b151590565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6bffffffffffffffffffffffff19166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600054610100900460ff16806110f257506110f2610f83565b80611100575060005460ff16155b61113b5760405162461bcd60e51b815260040180806020018281038252602e815260200180611287602e913960400191505060405180910390fd5b600054610100900460ff16158015610682576000805460ff1961ff0019909116610100171660011790558015610694576000805461ff001916905550565b600054610100900460ff16806111925750611192610f83565b806111a0575060005460ff16155b6111db5760405162461bcd60e51b815260040180806020018281038252602e815260200180611287602e913960400191505060405180910390fd5b600054610100900460ff16158015611206576000805460ff1961ff0019909116610100171660011790555b6000611210610f7f565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000906000805160206112d5833981519152908290a3508015610694576000805461ff00191690555056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a26469706673582212201386009389b68216b62c456fde88affad1ded7825aa5fdf97fcc0d0cc363645764736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff191660011790556123bd8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106101635760003560e01c80636f791d29116100ce578063b71939b111610087578063b71939b1146106a2578063c0c53b8b146106aa578063cb23bcb5146106e2578063d9b141ff146106ea578063d9dd67ab146106f2578063dc1b7b1f14610168578063e367a2c11461070f57610163565b80636f791d291461055d5780637e6c255f146105655780637fa3a40e1461056d5780638a2df18d1461057557806395fcea7814610692578063a8929e0b1461069a57610163565b8063381b003b11610120578063381b003b146103be5780633dbcc8d1146103da57806344c7cc30146103e25780634d480faa146104f05780635c1bba38146105135780636d46e9871461053757610163565b806306cc91b2146101685780630c4a1e59146101ef5780631a734229146102455780631f956632146103535780632aa8690914610381578063342025fa146103a4575b600080fd5b6101d66004803603604081101561017e57600080fd5b810190602081018135600160201b81111561019857600080fd5b8201836020820111156101aa57600080fd5b803590602001918460018302840111600160201b831117156101cb57600080fd5b919350915035610717565b6040805192835260208301919091528051918290030190f35b610243600480360361012081101561020657600080fd5b5080359060ff60208201351690604081019060808101359060a0810135906001600160a01b0360c0820135169060e0810135906101000135610732565b005b6102436004803603608081101561025b57600080fd5b810190602081018135600160201b81111561027557600080fd5b82018360208201111561028757600080fd5b803590602001918460018302840111600160201b831117156102a857600080fd5b919390929091602081019035600160201b8111156102c557600080fd5b8201836020820111156102d757600080fd5b803590602001918460208302840111600160201b831117156102f857600080fd5b919390929091602081019035600160201b81111561031557600080fd5b82018360208201111561032757600080fd5b803590602001918460208302840111600160201b8311171561034857600080fd5b919350915035610a10565b6102436004803603604081101561036957600080fd5b506001600160a01b0381351690602001351515610be6565b6102436004803603604081101561039757600080fd5b5080359060200135610c97565b6103ac610e2c565b60408051918252519081900360200190f35b6103c6610e32565b604080519115158252519081900360200190f35b6103ac610e3b565b610243600480360360808110156103f857600080fd5b810190602081018135600160201b81111561041257600080fd5b82018360208201111561042457600080fd5b803590602001918460018302840111600160201b8311171561044557600080fd5b919390929091602081019035600160201b81111561046257600080fd5b82018360208201111561047457600080fd5b803590602001918460208302840111600160201b8311171561049557600080fd5b919390929091602081019035600160201b8111156104b257600080fd5b8201836020820111156104c457600080fd5b803590602001918460208302840111600160201b831117156104e557600080fd5b919350915035610e41565b6102436004803603604081101561050657600080fd5b5080359060200135610fab565b61051b611041565b604080516001600160a01b039092168252519081900360200190f35b6103c66004803603602081101561054d57600080fd5b50356001600160a01b0316611050565b6103c6611065565b61024361106e565b6103ac6111b3565b610243600480360360a081101561058b57600080fd5b810190602081018135600160201b8111156105a557600080fd5b8201836020820111156105b757600080fd5b803590602001918460018302840111600160201b831117156105d857600080fd5b919390929091602081019035600160201b8111156105f557600080fd5b82018360208201111561060757600080fd5b803590602001918460208302840111600160201b8311171561062857600080fd5b919390929091602081019035600160201b81111561064557600080fd5b82018360208201111561065757600080fd5b803590602001918460208302840111600160201b8311171561067857600080fd5b9193509150803590602001356001600160a01b03166111b9565b6102436113d0565b6103ac61142d565b61051b611433565b610243600480360360608110156106c057600080fd5b506001600160a01b038135811691602081013582169160409091013516611442565b61051b6114d9565b6103ac6114e8565b6103ac6004803603602081101561070857600080fd5b50356114ee565b6103ac61150c565b600080610725858585611512565b915091505b935093915050565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff16156107eb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107b0578181015183820152602001610798565b50505050905090810190601f1680156107dd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060006108028885893560208b01358a8a8961165f565b60085490915043883590910110610853576040805162461bcd60e51b815260206004820152601060248201526f4d41585f44454c41595f424c4f434b5360801b604482015290519081900360640190fd5b600954426020890135909101106108a2576040805162461bcd60e51b815260206004820152600e60248201526d4d41585f44454c41595f54494d4560901b604482015290519081900360640190fd5b600060018a111561092c57600480546040805163d9dd67ab60e01b81526001198e0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b1580156108fd57600080fd5b505afa158015610911573d6000803e3d6000fd5b505050506040513d602081101561092757600080fd5b505190505b61093681836116d5565b600480546040805163d9dd67ab60e01b81526000198f0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b15801561098657600080fd5b505afa15801561099a573d6000803e3d6000fd5b505050506040513d60208110156109b057600080fd5b5051146109fa576040805162461bcd60e51b81526020600482015260136024820152722222a620aca2a22fa0a1a1aaa6aaa620aa27a960691b604482015290519081900360640190fd5b5050610a068882611701565b5050505050505050565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff1615610a8c5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107b0578181015183820152602001610798565b50600060025490506000610adc89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a91508990508888611865565b905080827f3bf85aebd2a1dc6c510ffc4795a3785e786b5817ab30144f88501d4c6456c986600254868d8d8d8d8d8d600180805490500333604051808b81526020018a8152602001806020018060200180602001868152602001856001600160a01b03166001600160a01b0316815260200184810384528c8c82818152602001925080828437600083820152601f01601f191690910185810384528a8152602090810191508b908b0280828437600083820152601f01601f19169091018581038352888152602090810191508990890280828437600083820152604051601f909101601f19169092018290039f50909d5050505050505050505050505050a3505050505050505050565b6006546001600160a01b03163314610c33576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b6001600160a01b038216600081815260076020908152604091829020805460ff191685151590811790915582519384529083015280517fce86e570206e55533301cb66529b33afbd75e991c575b85adeaca10146be8cb49281900390910190a15050565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff1615610d135760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107b0578181015183820152602001610798565b5060065460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610d5857600080fd5b505afa158015610d6c573d6000803e3d6000fd5b505050506040513d6020811015610d8257600080fd5b50516001600160a01b031614610dd3576040805162461bcd60e51b815260206004820152601160248201527027a7262cafa927a6262aa82fa7aba722a960791b604482015290519081900360640190fd5b6003548214610de657610de68282611701565b600a805460ff1916600190811790915560408051918252517fe6d1c315c736941d015418a8728891eae6aea39817b9c134486054bf34cc336b9181900360200190a15050565b60095481565b600a5460ff1681565b60025481565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff1615610ebd5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107b0578181015183820152602001610798565b50333214610f00576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b600060025490506000610f4f89898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a91508990508888611865565b60025460015460408051928352602083018790526000199091018282015251919250829184917f10e0571aafaf282151fd5b0215b5495521c549509cb0de3a3f8310bd2e344682919081900360600190a3505050505050505050565b6006546001600160a01b03163314610ff8576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60088290556009819055604080518381526020810183905281517f3bcd3c6d4304309e4b36d94f90517baf304582bb1ac828906808577e067e6b6e929181900390910190a15050565b6005546001600160a01b031690565b60076020526000908152604090205460ff1681565b60005460ff1690565b60065460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b50516001600160a01b03161461112d576040805162461bcd60e51b815260206004820152601160248201527027a7262cafa927a6262aa82fa7aba722a960791b604482015290519081900360640190fd5b600a5460ff16611173576040805162461bcd60e51b815260206004820152600c60248201526b2727aa2fa9a42aaa2227aba760a11b604482015290519081900360640190fd5b600a805460ff19169055604080516000815290517fe6d1c315c736941d015418a8728891eae6aea39817b9c134486054bf34cc336b9181900360200190a1565b60035481565b600a5460408051808201909152601281527153485554444f574e5f464f525f4e4954524f60701b60208201529060ff16156112355760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107b0578181015183820152602001610798565b50333214611278576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b60005a600254604080516020601f8d018190048102820181019092528b815292935036926000916112cb91908e908e90819084018382808284376000920191909152508e92508d91508c90508b8b611865565b60025460015460408051928352602083018a90526000199091018282015251919250829184917f10e0571aafaf282151fd5b0215b5495521c549509cb0de3a3f8310bd2e344682919081900360600190a36001600160a01b038516156113c257846001600160a01b031663e3db8a49335a8703866040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b031681526020018381526020018281526020019350505050602060405180830381600087803b15801561139557600080fd5b505af11580156113a9573d6000803e3d6000fd5b505050506040513d60208110156113bf57600080fd5b50505b505050505050505050505050565b60006113da611de3565b9050336001600160a01b0382161461142a576040805162461bcd60e51b815260206004820152600e60248201526d2727aa2fa32927a6afa0a226a4a760911b604482015290519081900360640190fd5b50565b61a4b790565b6004546001600160a01b031681565b6004546001600160a01b03161561148f576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600480546001600160a01b039485166001600160a01b0319918216179091559183166000908152600760205260409020805460ff1916600117905560068054919093169116179055565b6006546001600160a01b031681565b60015490565b600181815481106114fb57fe5b600091825260209091200154905081565b60085481565b600080826115255750600090508061072a565b60008061156787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250611e08915050565b90925090506000811561159f5761159988888560018087038154811061158957fe5b9060005260206000200154611e7c565b90935090505b6000600183815481106115ae57fe5b9060005260206000200154905060006115c98a8a8785611e7c565b9095509050828811611610576040805162461bcd60e51b815260206004820152600b60248201526a10905510d217d4d510549560aa1b604482015290519081900360640190fd5b80881115611651576040805162461bcd60e51b815260206004820152600960248201526810905510d217d1539160ba1b604482015290519081900360640190fd5b999098509650505050505050565b6040805160f89890981b6001600160f81b0319166020808a019190915260609790971b6bffffffffffffffffffffffff19166021890152603588019590955260558701939093526075860191909152609585015260b5808501919091528151808503909101815260d59093019052815191012090565b604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600354821161174b576040805162461bcd60e51b815260206004820152601160248201527044454c415945445f4241434b574152445360781b604482015290519081900360640190fd5b600254600154600090156117795760018054600019810190811061176b57fe5b906000526020600020015490505b60008061178a83858843428a61203c565b60018054808201825560008281527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6909101849055600283905560408051808201825285815260208181018c9052935482518681529485018d9052959750939550879489947f85b6a949bf20bfd6bc6e20f98fb490c7944ab61dcfa5a30b5dae543412c9a8a09488948e9492936000190192828101918591908190849084905b8381101561184257818101518382015260200161182a565b5050505090500182815260200194505050505060405180910390a3505050505050565b3360009081526007602052604081205460ff166118ba576040805162461bcd60e51b815260206004820152600e60248201526d27a7262cafa9a2a8aaa2a721a2a960911b604482015290519081900360640190fd5b600154156118e2576001805460001981019081106118d457fe5b906000526020600020015490505b60025481600060208a01815b600581018810611c7c57600089898360010181811061190957fe5b905060200201359050436008548201101561195b576040805162461bcd60e51b815260206004820152600d60248201526c109313d0d2d7d513d3d7d3d311609a1b604482015290519081900360640190fd5b438111156119a0576040805162461bcd60e51b815260206004820152600d60248201526c424c4f434b5f544f4f5f4e455760981b604482015290519081900360640190fd5b5060008989836002018181106119b257fe5b9050602002013590504260095482011015611a03576040805162461bcd60e51b815260206004820152600c60248201526b1512535157d513d3d7d3d31160a21b604482015290519081900360640190fd5b42811115611a47576040805162461bcd60e51b815260206004820152600c60248201526b54494d455f544f4f5f4e455760a01b604482015290519081900360640190fd5b506000338a8a84600101818110611a5a57fe5b905060200201358b8b85600201818110611a7057fe5b9050602002013560405160200180846001600160a01b03166001600160a01b031660601b8152601401838152602001828152602001935050505060405160208183030381529060405280519060200120905060008a8a84818110611ad057fe5b905060200201359050611ae9848e8e8885878d8d6122a0565b909850909650940193925060009050898960038401818110611b0757fe5b905060200201359050600354811015611b5b576040805162461bcd60e51b815260206004820152601160248201527044454c415945445f4241434b574152445360781b604482015290519081900360640190fd5b6001811015611ba5576040805162461bcd60e51b8152602060048201526011602482015270135554d517d111531056515117d2539255607a1b604482015290519081900360640190fd5b6001600354101580611bc95750898983818110611bbe57fe5b905060200201356000145b611c14576040805162461bcd60e51b8152602060048201526017602482015276135554d517d111531056515117d253925517d4d5105495604a1b604482015290519081900360640190fd5b600354811115611c7357611c6e8587838d8d87600101818110611c3357fe5b905060200201358e8e88600201818110611c4957fe5b905060200201358f8f89600401818110611c5f57fe5b9050602002013560001b61203c565b965094505b506005016118ee565b5060208b0180821015611cc8576040805162461bcd60e51b815260206004820152600f60248201526e4f46465345545f4f564552464c4f5760881b604482015290519081900360640190fd5b8b518101821115611d17576040805162461bcd60e51b81526020600482015260146024820152732a2920a729a0a1aa24a7a729afa7ab22a9292aa760611b604482015290519081900360640190fd5b6002548511611d5b576040805162461bcd60e51b815260206004820152600b60248201526a08a9aa0a8b2be8482a886960ab1b604482015290519081900360640190fd5b6001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6018490556002859055868414611dd4576040805162461bcd60e51b815260206004820152600960248201526841465445525f41434360b81b604482015290519081900360640190fd5b50505050509695505050505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b60008082845110158015611e20575060208385510310155b611e5d576040805162461bcd60e51b81526020600482015260096024820152681d1bdbc81cda1bdc9d60ba1b604482015290519081900360640190fd5b60208301611e71858563ffffffff61232e16565b915091509250929050565b6000806000806000806000611ec88b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611e08915050565b809550819a505050611f118b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611e08915050565b809450819a505050611f5a8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611e08915050565b809350819a505050611fa38b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611e08915050565b604080516020808201989098528082018790526060810186905260808082018490528251808303909101815260a0909101909152805196019590952090995060018401955093905087841461202b576040805162461bcd60e51b815260206004820152600960248201526842415443485f41434360b81b604482015290519081900360640190fd5b509699929850919650505050505050565b6004805460408051633dbcc8d160e01b8152905160009384936001600160a01b031692633dbcc8d19281830192602092829003018186803b15801561208057600080fd5b505afa158015612094573d6000803e3d6000fd5b505050506040513d60208110156120aa57600080fd5b50518611156120f2576040805162461bcd60e51b815260206004820152600f60248201526e2222a620aca2a22faa27a7afa320a960891b604482015290519081900360640190fd5b600480546040805163d9dd67ab60e01b81526000198a0193810193909352516001600160a01b039091169163d9dd67ab916024808301926020929190829003018186803b15801561214257600080fd5b505afa158015612156573d6000803e3d6000fd5b505050506040513d602081101561216c57600080fd5b505183146121af576040805162461bcd60e51b815260206004820152600b60248201526a44454c415945445f41434360a81b604482015290519081900360640190fd5b50506003805460408051702232b630bcb2b21036b2b9b9b0b3b2b99d60791b602080830191909152603182019a909a5260518101899052607181018390526091810188905260b1808201959095528151808203909501855260d1810182528451948a0194909420600060f186015261010585019690965261012580850195909552805180850390950185526101458401815284519489019490942060605160802061016585019690965290860390960161018583018190526101a58301969096526101c580830194909452825180830390940184526101e59091019091528151919094012092559091600190910190565b92840192808289875b8781101561231f5760008b8b838181106122bf57fe5b60209081029290920135808620604080518086019a909a5289810189905260608a018d90526080808b01929092528051808b03909201825260a09099019098528751979092019690962095506001948501949301929190910190506122a9565b50985098509895505050505050565b6000816020018351101561237e576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b5001602001519056fea2646970667358221220b5ba73c644de2ce471db488ffce4cfbd774d5ee918b7d60282d056ff815c684e64736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff60a01b1916600160a01b1790556120e1806100336000396000f3fe6080604052600436106101405760003560e01c80636e6e8a6a116100b65780639fe12da51161006f5780639fe12da514610760578063a8929e0b14610775578063b4d9ec441461078a578063b75436bb1461079f578063e78cea921461081a578063fdebb9b31461082f57610140565b80636e6e8a6a146105975780636f791d2914610640578063794cfd51146106695780637ae8d8b31461067e5780638a631aa61461069357806393e59dc11461072f57610140565b8063485cc95511610108578063485cc955146102e25780635075788b1461031d5780635661777a146103c05780635e916758146103d5578063679b6ded1461045f57806367ef3ab81461050857610140565b80630f4d14e9146101455780631b871c8d146101745780631fe927cf1461021d5780632b40609a1461029857806347466f98146102af575b600080fd5b6101626004803603602081101561015b57600080fd5b5035610844565b60408051918252519081900360200190f35b610162600480360361010081101561018b57600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b8111156101df57600080fd5b8201836020820111156101f157600080fd5b803590602001918460018302840111600160201b8311171561021257600080fd5b509092509050610a31565b34801561022957600080fd5b506101626004803603602081101561024057600080fd5b810190602081018135600160201b81111561025a57600080fd5b82018360208201111561026c57600080fd5b803590602001918460018302840111600160201b8311171561028d57600080fd5b509092509050610c11565b3480156102a457600080fd5b506102ad610d7e565b005b3480156102bb57600080fd5b506102ad600480360360208110156102d257600080fd5b50356001600160a01b0316610f46565b3480156102ee57600080fd5b506102ad6004803603604081101561030557600080fd5b506001600160a01b0381358116916020013516610fe9565b34801561032957600080fd5b50610162600480360360c081101561034057600080fd5b8135916020810135916040820135916001600160a01b03606082013516916080820135919081019060c0810160a0820135600160201b81111561038257600080fd5b82018360208201111561039457600080fd5b803590602001918460018302840111600160201b831117156103b557600080fd5b509092509050611064565b3480156103cc57600080fd5b506101626111b9565b610162600480360360808110156103eb57600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b81111561042157600080fd5b82018360208201111561043357600080fd5b803590602001918460018302840111600160201b8311171561045457600080fd5b5090925090506112bf565b610162600480360361010081101561047657600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b8111156104ca57600080fd5b8201836020820111156104dc57600080fd5b803590602001918460018302840111600160201b831117156104fd57600080fd5b50909250905061140a565b610162600480360360a081101561051e57600080fd5b8135916020810135916040820135916001600160a01b036060820135169181019060a081016080820135600160201b81111561055957600080fd5b82018360208201111561056b57600080fd5b803590602001918460018302840111600160201b8311171561058c57600080fd5b50909250905061158f565b61016260048036036101008110156105ae57600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359091169160a08201359160c081013591810190610100810160e0820135600160201b81111561060257600080fd5b82018360208201111561061457600080fd5b803590602001918460018302840111600160201b8311171561063557600080fd5b5090925090506116e3565b34801561064c57600080fd5b506106556116f6565b604080519115158252519081900360200190f35b34801561067557600080fd5b506102ad611706565b34801561068a57600080fd5b506102ad6118c8565b34801561069f57600080fd5b50610162600480360360a08110156106b657600080fd5b8135916020810135916001600160a01b036040830135169160608101359181019060a081016080820135600160201b8111156106f157600080fd5b82018360208201111561070357600080fd5b803590602001918460018302840111600160201b8311171561072457600080fd5b509092509050611a93565b34801561073b57600080fd5b50610744611bd4565b604080516001600160a01b039092168252519081900360200190f35b34801561076c57600080fd5b506102ad611be3565b34801561078157600080fd5b50610162611da2565b34801561079657600080fd5b50610655611da8565b3480156107ab57600080fd5b50610162600480360360208110156107c257600080fd5b810190602081018135600160201b8111156107dc57600080fd5b8201836020820111156107ee57600080fd5b803590602001918460018302840111600160201b8311171561080f57600080fd5b509092509050611db8565b34801561082657600080fd5b50610744611f18565b34801561083b57600080fd5b50610655611f27565b600080546001600160a01b031615610910576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156108a157600080fd5b505afa1580156108b5573d6000803e3d6000fd5b505050506040513d60208110156108cb57600080fd5b5051610910576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a01b900460ff161561096a576040805162461bcd60e51b815260206004820152601860248201527710d49150551157d4915514965050931154d7d4105554d15160421b604482015290519081900360640190fd5b60015433908190600160a81b900460ff16156109b65761098982611f37565b15801561099557503233145b156109aa576109a382611f3d565b91506109b6565b6109b381611f4c565b90505b604080516001600160a01b0383166020820181905260008284018190523460608401526080830188905260a0830182905260c083019190915260e0820181905261010082018190526101208083019190915282518083039091018152610140909101909152610a29906009908490611f5a565b949350505050565b600080546001600160a01b031615610afd576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015610a8e57600080fd5b505afa158015610aa2573d6000803e3d6000fd5b505050506040513d6020811015610ab857600080fd5b5051610afd576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b600154600160a01b900460ff1615610b57576040805162461bcd60e51b815260206004820152601860248201527710d49150551157d4915514965050931154d7d4105554d15160421b604482015290519081900360640190fd5b610c036009338c60601b60601c6001600160a01b03168c348d8d60601b60601c6001600160a01b03168d60601b60601c6001600160a01b03168d8d8d8d90508e8e604051602001808c81526020018b81526020018a8152602001898152602001888152602001878152602001868152602001858152602001848152602001838380828437808301925050509b505050505050505050505050604051602081830303815290604052611f5a565b9a9950505050505050505050565b600080546001600160a01b031615610cdd576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015610c6e57600080fd5b505afa158015610c82573d6000803e3d6000fd5b505050506040513d6020811015610c9857600080fd5b5051610cdd576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b333214610d1f576040805162461bcd60e51b815260206004820152600b60248201526a6f726967696e206f6e6c7960a81b604482015290519081900360640190fd5b6000610d496003338686604051808383808284376040519201829003909120935061201392505050565b60405190915081907fab532385be8f1005a4b6ba8fa20a2245facb346134ac739fe9a5198dc1580b9c90600090a29392505050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610dc357600080fd5b505afa158015610dd7573d6000803e3d6000fd5b505050506040513d6020811015610ded57600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b158015610e3557600080fd5b505afa158015610e49573d6000803e3d6000fd5b505050506040513d6020811015610e5f57600080fd5b50519050336001600160a01b03821614610ead576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a01b900460ff1615610efd576040805162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4105554d15160921b604482015290519081900360640190fd5b6001805460ff60a01b1916600160a01b17815560408051918252517f9077d36bc00859b5c3f320310707208543dd35092cb0a0fe117d0c6a558b148b9181900360200190a15050565b6000546001600160a01b03163314610f95576040805162461bcd60e51b815260206004820152600d60248201526c1393d517d19493d357d31254d5609a1b604482015290519081900360640190fd5b600080546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f37389c47920d5cc3229678a0205d0455002c07541a4139ebdce91ac2274657779181900360200190a150565b6001546001600160a01b031615611036576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b600180546001600160a01b039384166001600160a01b03199182161790915560008054929093169116179055565b600080546001600160a01b031615611130576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d60208110156110eb57600080fd5b5051611130576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6111ad60033360008b8b8b8b60601b60601c6001600160a01b03168b8b8b604051602001808960ff1660ff1660f81b81526001018881526020018781526020018681526020018581526020018481526020018383808284378083019250505098505050505050505050604051602081830303815290604052611f5a565b98975050505050505050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b1580156111fe57600080fd5b505afa158015611212573d6000803e3d6000fd5b505050506040513d602081101561122857600080fd5b50516001600160a01b0316331461127a576040805162461bcd60e51b815260206004820152601160248201527027a7262cafa12924a223a2afa7aba722a960791b604482015290519081900360640190fd5b604080516000815260208101909152611297906006903390611f5a565b6040805160008152602081019091529091506112b7906080903390611f5a565b600101905090565b600080546001600160a01b03161561138b576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561131c57600080fd5b505afa158015611330573d6000803e3d6000fd5b505050506040513d602081101561134657600080fd5b505161138b576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b611400600733600189898960601b60601c6001600160a01b0316348a8a604051602001808860ff1660ff1660f81b815260010187815260200186815260200185815260200184815260200183838082843780830192505050975050505050505050604051602081830303815290604052611f5a565b9695505050505050565b600080546001600160a01b0316156114d6576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b15801561146757600080fd5b505afa15801561147b573d6000803e3d6000fd5b505050506040513d602081101561149157600080fd5b50516114d6576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b888801341015611522576040805162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742076616c756560701b604482015290519081900360640190fd5b600154600160a81b900460ff16801561153f575061153f87611f37565b156115505761154d87611f4c565b96505b600154600160a81b900460ff16801561156d575061156d86611f37565b1561157e5761157b86611f4c565b95505b610c038a8a8a8a8a8a8a8a8a610a31565b600080546001600160a01b03161561165b576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b1580156115ec57600080fd5b505afa158015611600573d6000803e3d6000fd5b505050506040513d602081101561161657600080fd5b505161165b576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6116d860073360008a8a8a8a60601b60601c6001600160a01b0316348b8b604051602001808960ff1660ff1660f81b81526001018881526020018781526020018681526020018581526020018481526020018383808284378083019250505098505050505050505050604051602081830303815290604052611f5a565b979650505050505050565b6000610c038a8a8a8a8a8a8a8a8a610a31565b600054600160a01b900460ff1690565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b15801561174b57600080fd5b505afa15801561175f573d6000803e3d6000fd5b505050506040513d602081101561177557600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b1580156117bd57600080fd5b505afa1580156117d1573d6000803e3d6000fd5b505050506040513d60208110156117e757600080fd5b50519050336001600160a01b03821614611835576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a81b900460ff16611883576040805162461bcd60e51b815260206004820152600d60248201526c4e4f545f524557524954494e4760981b604482015290519081900360640190fd5b6001805460ff60a81b19169055604080516000815290517fab1ea65fd25ce96d303e895d1bd43edddb89841544a3705d3e61fc947a5fc25b9181900360200190a15050565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b15801561190d57600080fd5b505afa158015611921573d6000803e3d6000fd5b505050506040513d602081101561193757600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b15801561197f57600080fd5b505afa158015611993573d6000803e3d6000fd5b505050506040513d60208110156119a957600080fd5b50519050336001600160a01b038216146119f7576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a81b900460ff1615611a4a576040805162461bcd60e51b8152602060048201526011602482015270414c52454144595f524557524954494e4760781b604482015290519081900360640190fd5b6001805460ff60a81b1916600160a81b17815560408051918252517fab1ea65fd25ce96d303e895d1bd43edddb89841544a3705d3e61fc947a5fc25b9181900360200190a15050565b600080546001600160a01b031615611b5f576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015611af057600080fd5b505afa158015611b04573d6000803e3d6000fd5b505050506040513d6020811015611b1a57600080fd5b5051611b5f576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6116d860033360018a8a8a60601b60601c6001600160a01b03168a8a8a604051602001808860ff1660ff1660f81b815260010187815260200186815260200185815260200184815260200183838082843780830192505050975050505050505050604051602081830303815290604052611f5a565b6000546001600160a01b031681565b60015460408051638da5cb5b60e01b815290516000926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015611c2857600080fd5b505afa158015611c3c573d6000803e3d6000fd5b505050506040513d6020811015611c5257600080fd5b505160408051638da5cb5b60e01b815290519192506000916001600160a01b03841691638da5cb5b916004808301926020929190829003018186803b158015611c9a57600080fd5b505afa158015611cae573d6000803e3d6000fd5b505050506040513d6020811015611cc457600080fd5b50519050336001600160a01b03821614611d12576040805162461bcd60e51b815260206004820152600a60248201526904e4f545f524f4c4c55560b41b604482015290519081900360640190fd5b600154600160a01b900460ff16611d5d576040805162461bcd60e51b815260206004820152600a6024820152691393d517d4105554d15160b21b604482015290519081900360640190fd5b6001805460ff60a01b19169055604080516000815290517f9077d36bc00859b5c3f320310707208543dd35092cb0a0fe117d0c6a558b148b9181900360200190a15050565b61a4b690565b600154600160a01b900460ff1681565b600080546001600160a01b031615611e84576000546040805163babcc53960e01b815233600482015290516001600160a01b039092169163babcc53991602480820192602092909190829003018186803b158015611e1557600080fd5b505afa158015611e29573d6000803e3d6000fd5b505050506040513d6020811015611e3f57600080fd5b5051611e84576040805162461bcd60e51b815260206004820152600f60248201526e1393d517d5d2125511531254d51151608a1b604482015290519081900360640190fd5b6000611eae6003338686604051808383808284376040519201829003909120935061201392505050565b9050807fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b858560405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a29392505050565b6001546001600160a01b031681565b600154600160a81b900460ff1681565b3b151590565b61111061111160901b01190190565b61111161111160901b010190565b600080611f6f85858580519060200120612013565b9050807fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b846040518080602001828103825283818151815260200191508051906020019080838360005b83811015611fd1578181015183820152602001611fb9565b50505050905090810190601f168015611ffe5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2949350505050565b600154604080516302bbfad160e01b815260ff861660048201526001600160a01b03858116602483015260448201859052915160009392909216916302bbfad1913491606480830192602092919082900301818588803b15801561207657600080fd5b505af115801561208a573d6000803e3d6000fd5b50505050506040513d60208110156120a157600080fd5b505194935050505056fea26469706673582212201d933684bc3d987de13963a4c0917e3729ecb3ead4776cbf6b69bd85123810e564736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff191660011790556108878061002d6000396000f3fe608060405234801561001057600080fd5b506004361061006d5760003560e01c806316b9109b1461007257806330a826b414610091578063485cc955146100ae5780636f791d29146100dc5780638b8ca199146100f8578063bc49accb14610130578063f03c04a5146101bc575b600080fd5b61008f6004803603602081101561008857600080fd5b50356101e8565b005b61008f600480360360208110156100a757600080fd5b5035610269565b61008f600480360360408110156100c457600080fd5b506001600160a01b03813581169160200135166102e7565b6100e461036c565b604080519115158252519081900360200190f35b61008f6004803603608081101561010e57600080fd5b50803590602081013590604081013590606001356001600160a01b0316610375565b61008f6004803603608081101561014657600080fd5b8135916020810135916001600160a01b03604083013516919081019060808101606082013564010000000081111561017d57600080fd5b82018360208201111561018f57600080fd5b803590602001918460018302840111640100000000831117156101b157600080fd5b50909250905061041c565b61008f600480360360408110156101d257600080fd5b506001600160a01b038135169060200135610687565b6001546001600160a01b03163314610235576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600160f81b6020820152602180820184905282518083039091018152604190910190915261026690610721565b50565b6001546001600160a01b031633146102b6576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600160f91b6020820152602180820184905282518083039091018152604190910190915261026690610721565b6001546001600160a01b031615610334576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b60008054610100600160a81b0319166101006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b60005460ff1690565b6001546001600160a01b031633146103c2576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600060208201526021810186905260418101859052436061820152608181018490526001600160a01b03831660a1808301919091528251808303909101815260c190910190915261041690610721565b50505050565b6001546001600160a01b03163314610469576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051774368616c6c656e6765506572696f64457468426c6f636b7360401b815281519081900360180181207214dc195959131a5b5a5d14195c94d958dbdb99606a1b825291519081900360130190206060919087906064880460405180806921b430b4b727bbb732b960b11b815250600a01905060405180910390208860601b60601c6001600160a01b03168888604051602001808981526020018881526020018781526020018681526020018581526020018481526020018383808284376040805191909301818103601f190182528084526000805483516020808601919091206302bbfad160e01b8552600b60048601526024850184905260448501529551939f50909d5061010090046001600160a01b03169b506302bbfad19a5060648082019a509398509096508690039091019350849250899150889050803b1580156105b557600080fd5b505af11580156105c9573d6000803e3d6000fd5b505050506040513d60208110156105df57600080fd5b5051604080516020808252855182820152855193945084937fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b938793928392918301919085019080838360005b8381101561064457818101518382015260200161062c565b50505050905090810190601f1680156106715780820380516001836020036101000a031916815260200191505b509250505060405180910390a250505050505050565b6001546001600160a01b031633146106d4576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600360f81b60208201526001600160a01b0384166021820152604181018390524360618083019190915282518083039091018152608190910190915261071d90610721565b5050565b600080548251602080850191909120604080516302bbfad160e01b8152600860048201523360248201526044810192909252516101009093046001600160a01b0316936302bbfad193606480840194939192918390030190829087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d60208110156107b457600080fd5b505160408051602080825284518282015284517fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b938693928392918301919085019080838360005b838110156108145781810151838201526020016107fc565b50505050905090810190601f1680156108415780820380516001836020036101000a031916815260200191505b509250505060405180910390a25056fea2646970667358221220a755ba5ccf304c7666c33cc08ebec0c9a35dec519ac6a7982dfa609c5f66081a64736f6c634300060b0033608060405234801561001057600080fd5b506000805460ff1916600117905561145a8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106101105760003560e01c80638dd14802116100ad578063b0f3053711610071578063b0f3053714610501578063c75184df14610509578063cb23bcb51461052d578063e78cea9214610535578063f1fd3a391461053d57610110565b80638dd148021461031b5780639229bab6146103415780639c5cfe0b1461035e5780639f0c04bf1461045a578063a8929e0b146104f957610110565b80627436d3146101155780630c726847146101cd578063119852711461028d5780634654779014610295578063485cc9551461029d5780636f791d29146102cb57806372f2a8c7146102e757806380648b02146102ef5780638515bc6a14610313575b600080fd5b6101bb6004803603606081101561012b57600080fd5b810190602081018135600160201b81111561014557600080fd5b82018360208201111561015757600080fd5b803590602001918460208302840111600160201b8311171561017857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550508235935050506020013561055a565b60408051918252519081900360200190f35b61028b600480360360408110156101e357600080fd5b810190602081018135600160201b8111156101fd57600080fd5b82018360208201111561020f57600080fd5b803590602001918460018302840111600160201b8311171561023057600080fd5b919390929091602081019035600160201b81111561024d57600080fd5b82018360208201111561025f57600080fd5b803590602001918460208302840111600160201b8311171561028057600080fd5b509092509050610595565b005b6101bb610681565b6101bb610697565b61028b600480360360408110156102b357600080fd5b506001600160a01b03813581169160200135166106a6565b6102d3610730565b604080519115158252519081900360200190f35b6101bb610739565b6102f761073f565b604080516001600160a01b039092168252519081900360200190f35b6101bb61074e565b61028b6004803603602081101561033157600080fd5b50356001600160a01b0316610764565b6101bb6004803603602081101561035757600080fd5b503561084f565b61028b600480360361014081101561037557600080fd5b81359190810190604081016020820135600160201b81111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460208302840111600160201b831117156103c957600080fd5b919390928235926001600160a01b03602082013581169360408301359091169260608301359260808101359260a08201359260c08301359261010081019060e00135600160201b81111561041c57600080fd5b82018360208201111561042e57600080fd5b803590602001918460018302840111600160201b8311171561044f57600080fd5b509092509050610861565b6101bb600480360360e081101561047057600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359160808201359160a08101359181019060e0810160c0820135600160201b8111156104bb57600080fd5b8201836020820111156104cd57600080fd5b803590602001918460018302840111600160201b831117156104ee57600080fd5b509092509050610c39565b6101bb610cd9565b6101bb610cdf565b610511610cee565b604080516001600160801b039092168252519081900360200190f35b6102f7610cf3565b6102f7610d07565b6102d36004803603602081101561055357600080fd5b5035610d16565b600061058d8484846040516020018082815260200191505060405160208183030381529060405280519060200120610d2a565b949350505050565b60005461010090046001600160a01b031633146105e7576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b806000805b828110156106785761065687838888888681811061060657fe5b9050602002013586019261061c939291906113fc565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610df892505050565b84848281811061066257fe5b60200291909101359290920191506001016105ec565b50505050505050565b600454600160801b90046001600160801b031690565b6003546001600160801b031690565b60005461010090046001600160a01b0316156106f8576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b60008054610100600160a81b0319166101006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b60005460ff1690565b60055490565b6006546001600160a01b031690565b600354600160801b90046001600160801b031690565b600160009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107b257600080fd5b505afa1580156107c6573d6000803e3d6000fd5b505050506040513d60208110156107dc57600080fd5b50516001600160a01b0316331461082d576040805162461bcd60e51b815260206004820152601060248201526f2727aa2fa12924a223a2afa7aba722a960811b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60026020526000908152604090205481565b6000806108748a8a8a8a8a8a8a8a610c39565b90506108c38e8e8e80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508d84610f60565b91508d8a6001600160a01b03168a6001600160a01b03167f20af7f3bbfe38132b8900ae295cd9c8d1914be7052d061a511f3f728dab189648e6040518082815260200191505060405180910390a45061091a6113b5565b60036040518060c00160405290816000820160009054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016000820160109054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016001820160009054906101000a90046001600160801b03166001600160801b03166001600160801b031681526020016001820160109054906101000a90046001600160801b03166001600160801b03166001600160801b03168152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152505090506040518060c00160405280896001600160801b03168152602001886001600160801b03168152602001876001600160801b031681526020018f6001600160801b031681526020018381526020018b6001600160a01b0316815250600360008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a8154816001600160801b0302191690836001600160801b0316021790555060408201518160010160006101000a8154816001600160801b0302191690836001600160801b0316021790555060608201518160010160106101000a8154816001600160801b0302191690836001600160801b031602179055506080820151816002015560a08201518160030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050610ba9898686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061113f92505050565b80516003805460208401516001600160801b03199182166001600160801b03948516178416600160801b9185168202179092556040840151600480546060870151931691851691909117841691909316909102179055608081015160055560a00151600680546001600160a01b0319166001600160a01b0390921691909117905550505050505050505050505050565b600060038960601b60601c6001600160a01b03168960601b60601c6001600160a01b0316898989898989604051602001808a60ff1660ff1660f81b815260010189815260200188815260200187815260200186815260200185815260200184815260200183838082843780830192505050995050505050505050505060405160208183030381529060405280519060200120905098975050505050505050565b61a4b490565b6004546001600160801b031690565b600181565b60005461010090046001600160a01b031681565b6001546001600160a01b031681565b600090815260026020526040902054151590565b8251600090610100811115610d3e57600080fd5b8260005b82811015610dee5760028606610d9b57868181518110610d5e57fe5b6020026020010151826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209150610de0565b81878281518110610da857fe5b602002602001015160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012091505b600286049550600101610d42565b5095945050505050565b805160009082908290610e0757fe5b01602001516001600160f81b0319161415610f5d578051606114610e5f576040805162461bcd60e51b815260206004820152600a6024820152690848288be988a9c8ea8960b31b604482015290519081900360640190fd5b6000610e7282600163ffffffff61135c16565b9050610e7d81610d16565b15610ec6576040805162461bcd60e51b8152602060048201526014602482015273454e5452595f414c52454144595f45584953545360601b604482015290519081900360640190fd5b6000610ed983602163ffffffff61135c16565b90506000610eee84604163ffffffff61135c16565b9050610ef86113ea565b5060408051602080820183528382526000868152600282528390208251905582518681529081018490528083018590529151909185917fe5ccc8d7080a4904b2f4e42d91e8f06b13fe6cb2181ad1fe14644e856b44c1319181900360600190a2505050505b50565b6000610100845110610faa576040805162461bcd60e51b815260206004820152600e60248201526d50524f4f465f544f4f5f4c4f4e4760901b604482015290519081900360640190fd5b835160020a8310610ff5576040805162461bcd60e51b815260206004820152601060248201526f1410551217d393d517d352539253505360821b604482015290519081900360640190fd5b600061100285858561055a565b6000878152600260205260409020805491925090611059576040805162461bcd60e51b815260206004820152600f60248201526e4e4f5f4f5554424f585f454e54525960881b604482015290519081900360640190fd5b8551604080516020808201899052818301939093528151808203830181526060909101825280519083012060008181526001850190935291205460ff16156110d8576040805162461bcd60e51b815260206004820152600d60248201526c1053149150511657d4d4115395609a1b604482015290519081900360640190fd5b81548314611118576040805162461bcd60e51b815260206004820152600860248201526710905117d493d3d560c21b604482015290519081900360640190fd5b6000818152600192830160205260409020805460ff19169092179091559695505050505050565b600154604051639e5d4c4960e01b81526001600160a01b03858116600483019081526024830186905260606044840181815286516064860152865160009692959490921693639e5d4c49938a938a938a93909160849091019060208501908083838e5b838110156111ba5781810151838201526020016111a2565b50505050905090810190601f1680156111e75780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561120857600080fd5b505af115801561121c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561124557600080fd5b815160208301805160405192949293830192919084600160201b82111561126b57600080fd5b90830190602082018581111561128057600080fd5b8251600160201b81118282018810171561129957600080fd5b82525081516020918201929091019080838360005b838110156112c65781810151838201526020016112ae565b50505050905090810190601f1680156112f35780820380516001836020036101000a031916815260200191505b506040525050509150915081611355578051156113135780518082602001fd5b6040805162461bcd60e51b81526020600482015260126024820152711094925111d157d0d0531317d1905253115160721b604482015290519081900360640190fd5b5050505050565b600081602001835110156113ac576040805162461bcd60e51b815260206004820152601260248201527152656164206f7574206f6620626f756e647360701b604482015290519081900360640190fd5b50016020015190565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60408051602081019091526000815290565b6000808585111561140b578182fd5b83861115611417578182fd5b505082019391909203915056fea2646970667358221220b8a07fdd4002ff00965732e20a6a2b65fe9c9f128e8325843424ab200c3aff1a64736f6c634300060b0033", } // RollupCreatorNoProxyABI is the input ABI used to generate the binding from. diff --git a/packages/arb-util/ethbridgetestcontracts/RollupEventBridge.go b/packages/arb-util/ethbridgetestcontracts/RollupEventBridge.go index a09d6ac747..dbfb54cf87 100755 --- a/packages/arb-util/ethbridgetestcontracts/RollupEventBridge.go +++ b/packages/arb-util/ethbridgetestcontracts/RollupEventBridge.go @@ -31,7 +31,7 @@ var ( // RollupEventBridgeMetaData contains all meta data concerning the RollupEventBridge contract. var RollupEventBridgeMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"messageNum\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"InboxMessageDelivered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"messageNum\",\"type\":\"uint256\"}],\"name\":\"InboxMessageDeliveredFromOrigin\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rollup\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isMaster\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"nodeConfirmed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"prev\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"asserter\",\"type\":\"address\"}],\"name\":\"nodeCreated\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"nodeRejected\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"confirmPeriodBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"avmGasSpeedLimitPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"extraConfig\",\"type\":\"bytes\"}],\"name\":\"rollupInitialized\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nodeNum\",\"type\":\"uint256\"}],\"name\":\"stakeCreated\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506000805460ff191660011790556108878061002d6000396000f3fe608060405234801561001057600080fd5b506004361061006d5760003560e01c806316b9109b1461007257806330a826b414610091578063485cc955146100ae5780636f791d29146100dc5780638b8ca199146100f8578063bc49accb14610130578063f03c04a5146101bc575b600080fd5b61008f6004803603602081101561008857600080fd5b50356101e8565b005b61008f600480360360208110156100a757600080fd5b5035610269565b61008f600480360360408110156100c457600080fd5b506001600160a01b03813581169160200135166102e7565b6100e461036c565b604080519115158252519081900360200190f35b61008f6004803603608081101561010e57600080fd5b50803590602081013590604081013590606001356001600160a01b0316610375565b61008f6004803603608081101561014657600080fd5b8135916020810135916001600160a01b03604083013516919081019060808101606082013564010000000081111561017d57600080fd5b82018360208201111561018f57600080fd5b803590602001918460018302840111640100000000831117156101b157600080fd5b50909250905061041c565b61008f600480360360408110156101d257600080fd5b506001600160a01b038135169060200135610687565b6001546001600160a01b03163314610235576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600160f81b6020820152602180820184905282518083039091018152604190910190915261026690610721565b50565b6001546001600160a01b031633146102b6576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600160f91b6020820152602180820184905282518083039091018152604190910190915261026690610721565b6001546001600160a01b031615610334576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b60008054610100600160a81b0319166101006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b60005460ff1690565b6001546001600160a01b031633146103c2576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600060208201526021810186905260418101859052436061820152608181018490526001600160a01b03831660a1808301919091528251808303909101815260c190910190915261041690610721565b50505050565b6001546001600160a01b03163314610469576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051774368616c6c656e6765506572696f64457468426c6f636b7360401b815281519081900360180181207214dc195959131a5b5a5d14195c94d958dbdb99606a1b825291519081900360130190206060919087906064880460405180806921b430b4b727bbb732b960b11b815250600a01905060405180910390208860601b60601c6001600160a01b03168888604051602001808981526020018881526020018781526020018681526020018581526020018481526020018383808284376040805191909301818103601f190182528084526000805483516020808601919091206302bbfad160e01b8552600b60048601526024850184905260448501529551939f50909d5061010090046001600160a01b03169b506302bbfad19a5060648082019a509398509096508690039091019350849250899150889050803b1580156105b557600080fd5b505af11580156105c9573d6000803e3d6000fd5b505050506040513d60208110156105df57600080fd5b5051604080516020808252855182820152855193945084937fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b938793928392918301919085019080838360005b8381101561064457818101518382015260200161062c565b50505050905090810190601f1680156106715780820380516001836020036101000a031916815260200191505b509250505060405180910390a250505050505050565b6001546001600160a01b031633146106d4576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600360f81b60208201526001600160a01b0384166021820152604181018390524360618083019190915282518083039091018152608190910190915261071d90610721565b5050565b600080548251602080850191909120604080516302bbfad160e01b8152600860048201523360248201526044810192909252516101009093046001600160a01b0316936302bbfad193606480840194939192918390030190829087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d60208110156107b457600080fd5b505160408051602080825284518282015284517fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b938693928392918301919085019080838360005b838110156108145781810151838201526020016107fc565b50505050905090810190601f1680156108415780820380516001836020036101000a031916815260200191505b509250505060405180910390a25056fea264697066735822122088b967009dc1bb1421c1227dab50fdedd3f9c23f8c919c0cced5186e63410eae64736f6c634300060b0033", + Bin: "0x608060405234801561001057600080fd5b506000805460ff191660011790556108878061002d6000396000f3fe608060405234801561001057600080fd5b506004361061006d5760003560e01c806316b9109b1461007257806330a826b414610091578063485cc955146100ae5780636f791d29146100dc5780638b8ca199146100f8578063bc49accb14610130578063f03c04a5146101bc575b600080fd5b61008f6004803603602081101561008857600080fd5b50356101e8565b005b61008f600480360360208110156100a757600080fd5b5035610269565b61008f600480360360408110156100c457600080fd5b506001600160a01b03813581169160200135166102e7565b6100e461036c565b604080519115158252519081900360200190f35b61008f6004803603608081101561010e57600080fd5b50803590602081013590604081013590606001356001600160a01b0316610375565b61008f6004803603608081101561014657600080fd5b8135916020810135916001600160a01b03604083013516919081019060808101606082013564010000000081111561017d57600080fd5b82018360208201111561018f57600080fd5b803590602001918460018302840111640100000000831117156101b157600080fd5b50909250905061041c565b61008f600480360360408110156101d257600080fd5b506001600160a01b038135169060200135610687565b6001546001600160a01b03163314610235576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600160f81b6020820152602180820184905282518083039091018152604190910190915261026690610721565b50565b6001546001600160a01b031633146102b6576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600160f91b6020820152602180820184905282518083039091018152604190910190915261026690610721565b6001546001600160a01b031615610334576040805162461bcd60e51b815260206004820152600c60248201526b1053149150511657d253925560a21b604482015290519081900360640190fd5b60008054610100600160a81b0319166101006001600160a01b0394851602179055600180546001600160a01b03191691909216179055565b60005460ff1690565b6001546001600160a01b031633146103c2576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600060208201526021810186905260418101859052436061820152608181018490526001600160a01b03831660a1808301919091528251808303909101815260c190910190915261041690610721565b50505050565b6001546001600160a01b03163314610469576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051774368616c6c656e6765506572696f64457468426c6f636b7360401b815281519081900360180181207214dc195959131a5b5a5d14195c94d958dbdb99606a1b825291519081900360130190206060919087906064880460405180806921b430b4b727bbb732b960b11b815250600a01905060405180910390208860601b60601c6001600160a01b03168888604051602001808981526020018881526020018781526020018681526020018581526020018481526020018383808284376040805191909301818103601f190182528084526000805483516020808601919091206302bbfad160e01b8552600b60048601526024850184905260448501529551939f50909d5061010090046001600160a01b03169b506302bbfad19a5060648082019a509398509096508690039091019350849250899150889050803b1580156105b557600080fd5b505af11580156105c9573d6000803e3d6000fd5b505050506040513d60208110156105df57600080fd5b5051604080516020808252855182820152855193945084937fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b938793928392918301919085019080838360005b8381101561064457818101518382015260200161062c565b50505050905090810190601f1680156106715780820380516001836020036101000a031916815260200191505b509250505060405180910390a250505050505050565b6001546001600160a01b031633146106d4576040805162461bcd60e51b815260206004820152600b60248201526a04f4e4c595f524f4c4c55560ac1b604482015290519081900360640190fd5b60408051600360f81b60208201526001600160a01b0384166021820152604181018390524360618083019190915282518083039091018152608190910190915261071d90610721565b5050565b600080548251602080850191909120604080516302bbfad160e01b8152600860048201523360248201526044810192909252516101009093046001600160a01b0316936302bbfad193606480840194939192918390030190829087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d60208110156107b457600080fd5b505160408051602080825284518282015284517fff64905f73a67fb594e0f940a8075a860db489ad991e032f48c81123eb52d60b938693928392918301919085019080838360005b838110156108145781810151838201526020016107fc565b50505050905090810190601f1680156108415780820380516001836020036101000a031916815260200191505b509250505060405180910390a25056fea2646970667358221220a755ba5ccf304c7666c33cc08ebec0c9a35dec519ac6a7982dfa609c5f66081a64736f6c634300060b0033", } // RollupEventBridgeABI is the input ABI used to generate the binding from. From 76dba52773be3889798636942eb63b66d3562731 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Tue, 30 Aug 2022 21:05:43 -0500 Subject: [PATCH 84/86] Don't batch confirmations past a differing number of stakers --- .../arb-node-core/ethbridge/rollupWatcher.go | 13 +++++++++++++ packages/arb-node-core/staker/validator.go | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/packages/arb-node-core/ethbridge/rollupWatcher.go b/packages/arb-node-core/ethbridge/rollupWatcher.go index 6961ce3f20..d024e2a89c 100644 --- a/packages/arb-node-core/ethbridge/rollupWatcher.go +++ b/packages/arb-node-core/ethbridge/rollupWatcher.go @@ -243,6 +243,19 @@ func (r *RollupWatcher) LookupChallengedNode(ctx context.Context, address common return challenge.ChallengedNode, nil } +func (r *RollupWatcher) GetNodeStakerCount(ctx context.Context, nodeNum *big.Int) (*big.Int, error) { + callOpts := r.getCallOpts(ctx) + nodeAddr, err := r.con.GetNode(callOpts, nodeNum) + if err != nil { + return nil, err + } + nodeContract, err := ethbridgecontracts.NewINode(nodeAddr, r.client) + if err != nil { + return nil, err + } + return nodeContract.StakerCount(callOpts) +} + func (r *RollupWatcher) StakerInfo(ctx context.Context, staker common.Address) (*StakerInfo, error) { info, err := r.con.StakerMap(r.getCallOpts(ctx), staker.ToEthAddress()) if err != nil { diff --git a/packages/arb-node-core/staker/validator.go b/packages/arb-node-core/staker/validator.go index fa91f4db3c..8657b0868b 100644 --- a/packages/arb-node-core/staker/validator.go +++ b/packages/arb-node-core/staker/validator.go @@ -159,11 +159,28 @@ func (v *Validator) resolveNextNode(ctx context.Context, info *ethbridge.StakerI confCount = 10 } totalSendSize := 0 + var lastStakerCount *big.Int for i := 0; i < confCount && unresolvedNodeIndex.Cmp(latestNodeCreated) <= 0; i++ { nodeInfo, err := v.rollup.RollupWatcher.LookupNode(ctx, unresolvedNodeIndex) if err != nil { return err } + stakerCount, err := v.rollup.RollupWatcher.GetNodeStakerCount(ctx, unresolvedNodeIndex) + if err != nil { + return err + } + if lastStakerCount != nil { + if lastStakerCount.Cmp(stakerCount) != 0 { + logger. + Info(). + Int64("stakerCount", stakerCount.Int64()). + Int64("lastStakerCount", lastStakerCount.Int64()). + Msg("not batching further confirmations as number of stakers changed") + break + } + } else { + lastStakerCount = stakerCount + } sendCount := new(big.Int).Sub(nodeInfo.Assertion.After.TotalSendCount, nodeInfo.Assertion.Before.TotalSendCount) sends, err := v.lookup.GetSends(nodeInfo.Assertion.Before.TotalSendCount, sendCount) if err != nil { From 429076a7f3a4e7e67e49bffc0c8f6de52f6b29f2 Mon Sep 17 00:00:00 2001 From: gzeon <95478735+gzeoneth@users.noreply.github.com> Date: Wed, 31 Aug 2022 14:49:23 +0800 Subject: [PATCH 85/86] chore: bump typescript-eslint --- packages/arb-bridge-peripherals/package.json | 6 +- yarn.lock | 219 +++++-------------- 2 files changed, 54 insertions(+), 171 deletions(-) diff --git a/packages/arb-bridge-peripherals/package.json b/packages/arb-bridge-peripherals/package.json index b56cbe047d..b2186803aa 100644 --- a/packages/arb-bridge-peripherals/package.json +++ b/packages/arb-bridge-peripherals/package.json @@ -45,9 +45,9 @@ "@types/chai": "^4.2.15", "@types/mocha": "^9.0.0", "@types/node": "^14.14.28", - "@typescript-eslint/eslint-plugin": "^4.29.0", - "@typescript-eslint/eslint-plugin-tslint": "^5.30.6", - "@typescript-eslint/parser": "^4.29.0", + "@typescript-eslint/eslint-plugin": "^5.32.0", + "@typescript-eslint/eslint-plugin-tslint": "^5.32.0", + "@typescript-eslint/parser": "^5.32.0", "arb-upgrades": "0.0.1", "chai": "^4.2.0", "dotenv": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index 9617c0b7ff..4663e82c4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -982,13 +982,6 @@ dependencies: antlr4ts "^0.5.0-alpha.4" -"@solidity-parser/parser@^0.14.2": - version "0.14.3" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.3.tgz#0d627427b35a40d8521aaa933cc3df7d07bfa36f" - integrity sha512-29g2SZ29HtsqA58pLCtopI1P/cPy5/UAzlcAXO6T/CNJimG6yA8kx4NaseMyJULiC+TEs02Y9/yeHzClqoA0hw== - dependencies: - antlr4ts "^0.5.0-alpha.4" - "@szmarczak/http-timer@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" @@ -1279,19 +1272,13 @@ "@typescript-eslint/utils" "5.30.6" lodash "^4.17.21" -"@typescript-eslint/eslint-plugin@^4.29.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" - integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== +"@typescript-eslint/eslint-plugin-tslint@^5.32.0": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-5.36.1.tgz#24f4a209b49d8603a60e0eb1b6b91cb26a845dcc" + integrity sha512-cOpdXK60QxSxMMr71Rn0AMLaEK2K6zyqK/Dfb9GxruJ+sHYrPsJFW2cy+XkeY1fL6As4Q8yO13Gkjget45I5aw== dependencies: - "@typescript-eslint/experimental-utils" "4.33.0" - "@typescript-eslint/scope-manager" "4.33.0" - debug "^4.3.1" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.1.0" - semver "^7.3.5" - tsutils "^3.21.0" + "@typescript-eslint/utils" "5.36.1" + lodash "^4.17.21" "@typescript-eslint/eslint-plugin@^5.32.0": version "5.32.0" @@ -1308,16 +1295,6 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^4.29.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899" - integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== - dependencies: - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - debug "^4.3.1" - "@typescript-eslint/parser@^5.32.0": version "5.32.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.32.0.tgz#1de243443bc6186fb153b9e395b842e46877ca5d" @@ -1328,14 +1305,6 @@ "@typescript-eslint/typescript-estree" "5.32.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" - integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - "@typescript-eslint/scope-manager@5.30.6": version "5.30.6" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.6.tgz#ce1b49ff5ce47f55518d63dbe8fc9181ddbd1a33" @@ -1352,6 +1321,14 @@ "@typescript-eslint/types" "5.32.0" "@typescript-eslint/visitor-keys" "5.32.0" +"@typescript-eslint/scope-manager@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.36.1.tgz#23c49b7ddbcffbe09082e6694c2524950766513f" + integrity sha512-pGC2SH3/tXdu9IH3ItoqciD3f3RRGCh7hb9zPdN2Drsr341zgd6VbhP5OHQO/reUqihNltfPpMpTNihFMarP2w== + dependencies: + "@typescript-eslint/types" "5.36.1" + "@typescript-eslint/visitor-keys" "5.36.1" + "@typescript-eslint/type-utils@5.32.0": version "5.32.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.32.0.tgz#45a14506fe3fb908600b4cef2f70778f7b5cdc79" @@ -1361,11 +1338,6 @@ debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" - integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== - "@typescript-eslint/types@5.30.6": version "5.30.6" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.6.tgz#86369d0a7af8c67024115ac1da3e8fb2d38907e1" @@ -1376,18 +1348,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.32.0.tgz#484273021eeeae87ddb288f39586ef5efeb6dcd8" integrity sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ== -"@typescript-eslint/typescript-estree@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" - integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" - tsutils "^3.21.0" +"@typescript-eslint/types@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.36.1.tgz#1cf0e28aed1cb3ee676917966eb23c2f8334ce2c" + integrity sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg== "@typescript-eslint/typescript-estree@5.30.6": version "5.30.6" @@ -1415,6 +1379,19 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.1.tgz#b857f38d6200f7f3f4c65cd0a5afd5ae723f2adb" + integrity sha512-ih7V52zvHdiX6WcPjsOdmADhYMDN15SylWRZrT2OMy80wzKbc79n8wFW0xpWpU0x3VpBz/oDgTm2xwDAnFTl+g== + dependencies: + "@typescript-eslint/types" "5.36.1" + "@typescript-eslint/visitor-keys" "5.36.1" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/utils@5.30.6": version "5.30.6" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.6.tgz#1de2da14f678e7d187daa6f2e4cdb558ed0609dc" @@ -1439,13 +1416,17 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" - integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== +"@typescript-eslint/utils@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.36.1.tgz#136d5208cc7a3314b11c646957f8f0b5c01e07ad" + integrity sha512-lNj4FtTiXm5c+u0pUehozaUWhh7UYKnwryku0nxJlYUEWetyG92uw2pr+2Iy4M/u0ONMKzfrx7AsGBTCzORmIg== dependencies: - "@typescript-eslint/types" "4.33.0" - eslint-visitor-keys "^2.0.0" + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.36.1" + "@typescript-eslint/types" "5.36.1" + "@typescript-eslint/typescript-estree" "5.36.1" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" "@typescript-eslint/visitor-keys@5.30.6": version "5.30.6" @@ -1463,6 +1444,14 @@ "@typescript-eslint/types" "5.32.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.1.tgz#7731175312d65738e501780f923896d200ad1615" + integrity sha512-ojB9aRyRFzVMN3b5joSYni6FAS10BBSCAfKJhjJAV08t/a95aM6tAhz+O1jF+EtgxktuSO3wJysp2R+Def/IWQ== + dependencies: + "@typescript-eslint/types" "5.36.1" + eslint-visitor-keys "^3.3.0" + "@ungap/promise-all-settled@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" @@ -2633,13 +2622,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - braces@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" @@ -3478,7 +3460,7 @@ debug@3.2.6: dependencies: ms "^2.1.1" -debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -5552,7 +5534,7 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.3, globby@^11.1.0: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -5740,60 +5722,6 @@ hardhat@2.9.9: uuid "^8.3.2" ws "^7.4.6" -hardhat@^2.6.4: - version "2.10.2" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.10.2.tgz#ff94ee4cb144a9c114641581ff5e4d7bea5f93a9" - integrity sha512-L/KvDDT/MA6332uAtYTqdcHoSABljw4pPjHQe5SHdIJ+xKfaSc6vDKw03CmrQ5Xup0gHs8XnVSBpZo1AbbIW7g== - dependencies: - "@ethereumjs/block" "^3.6.2" - "@ethereumjs/blockchain" "^5.5.2" - "@ethereumjs/common" "^2.6.4" - "@ethereumjs/tx" "^3.5.1" - "@ethereumjs/vm" "^5.9.0" - "@ethersproject/abi" "^5.1.2" - "@metamask/eth-sig-util" "^4.0.0" - "@sentry/node" "^5.18.1" - "@solidity-parser/parser" "^0.14.2" - "@types/bn.js" "^5.1.0" - "@types/lru-cache" "^5.1.0" - abort-controller "^3.0.0" - adm-zip "^0.4.16" - aggregate-error "^3.0.0" - ansi-escapes "^4.3.0" - chalk "^2.4.2" - chokidar "^3.4.0" - ci-info "^2.0.0" - debug "^4.1.1" - enquirer "^2.3.0" - env-paths "^2.2.0" - ethereum-cryptography "^1.0.3" - ethereumjs-abi "^0.6.8" - ethereumjs-util "^7.1.4" - find-up "^2.1.0" - fp-ts "1.19.3" - fs-extra "^7.0.1" - glob "7.2.0" - immutable "^4.0.0-rc.12" - io-ts "1.10.4" - lodash "^4.17.11" - merkle-patricia-tree "^4.2.4" - mnemonist "^0.38.0" - mocha "^10.0.0" - p-map "^4.0.0" - qs "^6.7.0" - raw-body "^2.4.1" - resolve "1.17.0" - semver "^6.3.0" - slash "^3.0.0" - solc "0.7.3" - source-map-support "^0.5.13" - stacktrace-parser "^0.1.10" - "true-case-path" "^2.2.1" - tsort "0.0.1" - undici "^5.4.0" - uuid "^8.3.2" - ws "^7.4.6" - hardhat@^2.6.6: version "2.9.7" resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.9.7.tgz#b31302b089486ec1c13c5a3dff18fe71f955f33b" @@ -7588,13 +7516,6 @@ minimatch@4.2.1: dependencies: brace-expansion "^1.1.7" -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6, minimist@~1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" @@ -7672,34 +7593,6 @@ mocha-junit-reporter@^2.0.0: strip-ansi "^6.0.1" xml "^1.0.0" -mocha@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" - integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - nanoid "3.3.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - mocha@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" @@ -7854,11 +7747,6 @@ nanoid@3.3.1: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -11591,11 +11479,6 @@ workerpool@6.2.0: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" From 450c08241ba5e1cd4fdd7636dc42f763fa7ee16e Mon Sep 17 00:00:00 2001 From: Harry Kalodner Date: Wed, 31 Aug 2022 07:57:39 -0400 Subject: [PATCH 86/86] Fix retryable test --- packages/MACHINEHASH | 2 +- packages/arb-node-core/ethbridge/inbox_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/MACHINEHASH b/packages/MACHINEHASH index b8db2a5201..a293cde00f 100644 --- a/packages/MACHINEHASH +++ b/packages/MACHINEHASH @@ -1 +1 @@ -0x3197f955bbd671d5074ea6de2e2b2172798b56fb3ac0a1ddb9a13f446aef14b7 \ No newline at end of file +0x1e9ccb390c15a084d695ad2fe83b27bc6212ca120213f2769fe39f6ba3899a17 \ No newline at end of file diff --git a/packages/arb-node-core/ethbridge/inbox_test.go b/packages/arb-node-core/ethbridge/inbox_test.go index b8e5349829..0353bb2c75 100644 --- a/packages/arb-node-core/ethbridge/inbox_test.go +++ b/packages/arb-node-core/ethbridge/inbox_test.go @@ -47,9 +47,9 @@ func TestRetryable(t *testing.T) { test.FailIfError(t, err) arbTx := message.RetryableTx{ Destination: common.RandAddress(), - Value: common.RandBigInt(), - Deposit: big.NewInt(1000), - MaxSubmissionCost: common.RandBigInt(), + Value: big.NewInt(13425), + Deposit: big.NewInt(10000000000), + MaxSubmissionCost: big.NewInt(100000), CreditBack: common.RandAddress(), Beneficiary: common.RandAddress(), MaxGas: common.RandBigInt(),