From 554d5f97df55779beed35ef73214e80b386d7927 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Thu, 26 Jul 2018 22:09:55 -0700 Subject: Add combinatorial tests for internal Exchange functions (#807) * WIP add combinatorial tests for internal Exchange functions * Change combinitorial testing strategy based on feedback * Check value of filled[orderHash] in updateFilledState tests * Add combinatorial tests for addFillResults * Add combinatorial tests for getPartialAmount * Implement generic `testWithReferenceFuncAsync` * Implement generic `testCombinatoriallyWithReferenceFuncAsync` * Add combinatorial tests for isRoundingError * Add combinatorial tests for calculateFillResults * Add support for Geth in internal contract tests * Fix contract artifacts * Change DECIMAL_PLACES to 78 and add a note. * Document new functions in utils * Optimize tests by only reseting state when needed * Rename/move some files * Print parameter names on failure in testWithReferenceFuncAsync * Add to changelog for utils package * Appease various linters * Rename some more things related to FillOrderCombinatorialUtils * Remove .only from test/exchange/internal.ts * Remove old test for isRoundingError and getPartialAmount * Appease linters again * Remove old todos * Fix typos, add comments, rename some things * Re-add some LibMath tests * Update contract internal tests to use new SafeMath revert reasons * Apply PR feedback from Amir * Apply PR feedback from Remco * Re-add networks to ZRXToken artifact * Remove duplicate Whitelist in compiler.json --- packages/contracts/compiler.json | 3 +- packages/contracts/package.json | 4 +- .../2.0.0/protocol/Exchange/MixinExchangeCore.sol | 1 - .../TestExchangeInternals.sol | 120 +++ packages/contracts/test/exchange/fill_order.ts | 51 +- packages/contracts/test/exchange/internal.ts | 305 +++++++ packages/contracts/test/exchange/libs.ts | 121 +-- packages/contracts/test/utils/artifacts.ts | 2 + packages/contracts/test/utils/assertions.ts | 27 + .../contracts/test/utils/combinatorial_utils.ts | 113 +++ .../test/utils/core_combinatorial_utils.ts | 878 --------------------- .../test/utils/fill_order_combinatorial_utils.ts | 878 +++++++++++++++++++++ .../contracts/test/utils/test_with_reference.ts | 119 +++ .../artifacts/2.0.0/AssetProxyOwner.json | 8 +- .../migrations/artifacts/2.0.0/ERC20Proxy.json | 8 +- .../migrations/artifacts/2.0.0/ERC721Proxy.json | 8 +- .../migrations/artifacts/2.0.0/ERC721Token.json | 379 --------- packages/migrations/artifacts/2.0.0/Exchange.json | 10 +- ...tWithTimeLockExceptRemoveAuthorizedAddress.json | 723 ----------------- packages/migrations/artifacts/2.0.0/WETH9.json | 8 +- packages/migrations/artifacts/2.0.0/ZRXToken.json | 2 +- packages/types/src/index.ts | 1 + packages/utils/CHANGELOG.json | 9 + packages/utils/src/configured_bignumber.ts | 9 +- 24 files changed, 1649 insertions(+), 2138 deletions(-) create mode 100644 packages/contracts/src/2.0.0/test/TestExchangeInternals/TestExchangeInternals.sol create mode 100644 packages/contracts/test/exchange/internal.ts create mode 100644 packages/contracts/test/utils/combinatorial_utils.ts delete mode 100644 packages/contracts/test/utils/core_combinatorial_utils.ts create mode 100644 packages/contracts/test/utils/fill_order_combinatorial_utils.ts create mode 100644 packages/contracts/test/utils/test_with_reference.ts delete mode 100644 packages/migrations/artifacts/2.0.0/ERC721Token.json delete mode 100644 packages/migrations/artifacts/2.0.0/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json (limited to 'packages') diff --git a/packages/contracts/compiler.json b/packages/contracts/compiler.json index dba836bde..ad35fc5b3 100644 --- a/packages/contracts/compiler.json +++ b/packages/contracts/compiler.json @@ -42,12 +42,13 @@ "TestConstants", "TestLibBytes", "TestLibs", + "TestExchangeInternals", "TestSignatureValidator", "TokenRegistry", "Validator", "Wallet", - "Whitelist", "WETH9", + "Whitelist", "ZRXToken" ] } diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 9fe8046b1..014210d33 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -33,7 +33,7 @@ "lint-contracts": "solhint src/2.0.0/**/**/**/**/*.sol" }, "config": { - "abis": "../migrations/artifacts/2.0.0/@(AssetProxyOwner|DummyERC20Token|DummyERC721Receiver|DummyERC721Token|ERC20Proxy|ERC721Proxy|Forwarder|Exchange|ExchangeWrapper|IAssetData|IAssetProxy|MixinAuthorizable|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestAssetProxyDispatcher|TestConstants|TestLibBytes|TestLibs|TestSignatureValidator|Validator|Wallet|TokenRegistry|Whitelist|WETH9|ZRXToken).json" + "abis": "../migrations/artifacts/2.0.0/@(AssetProxyOwner|DummyERC20Token|DummyERC721Receiver|DummyERC721Token|ERC20Proxy|ERC721Proxy|Forwarder|Exchange|ExchangeWrapper|IAssetData|IAssetProxy|MixinAuthorizable|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestAssetProxyDispatcher|TestConstants|TestExchangeInternals|TestLibBytes|TestLibs|TestSignatureValidator|Validator|Wallet|TokenRegistry|Whitelist|WETH9|ZRXToken).json" }, "repository": { "type": "git", @@ -79,11 +79,13 @@ "@0xproject/typescript-typings": "^1.0.3", "@0xproject/utils": "^1.0.4", "@0xproject/web3-wrapper": "^1.1.2", + "@types/js-combinatorics": "^0.5.29", "bn.js": "^4.11.8", "ethereum-types": "^1.0.3", "ethereumjs-abi": "0.6.5", "ethereumjs-util": "^5.1.1", "ethers": "3.0.22", + "js-combinatorics": "^0.5.3", "lodash": "^4.17.4" } } diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol index 354d0e9c3..ab5c6e507 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol @@ -207,7 +207,6 @@ contract MixinExchangeCore is /// @param order that was filled. /// @param takerAddress Address of taker who filled the order. /// @param orderTakerAssetFilledAmount Amount of order already filled. - /// @return fillResults Amounts filled and fees paid by maker and taker. function updateFilledState( Order memory order, address takerAddress, diff --git a/packages/contracts/src/2.0.0/test/TestExchangeInternals/TestExchangeInternals.sol b/packages/contracts/src/2.0.0/test/TestExchangeInternals/TestExchangeInternals.sol new file mode 100644 index 000000000..923bac97d --- /dev/null +++ b/packages/contracts/src/2.0.0/test/TestExchangeInternals/TestExchangeInternals.sol @@ -0,0 +1,120 @@ +/* + + Copyright 2018 ZeroEx Intl. + + 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.4.24; +pragma experimental ABIEncoderV2; + +import "../../protocol/Exchange/Exchange.sol"; + + +contract TestExchangeInternals is + Exchange +{ + constructor () + public + Exchange("") + {} + + /// @dev Adds properties of both FillResults instances. + /// Modifies the first FillResults instance specified. + /// Note that this function has been modified from the original + // internal version to return the FillResults. + /// @param totalFillResults Fill results instance that will be added onto. + /// @param singleFillResults Fill results instance that will be added to totalFillResults. + /// @return newTotalFillResults The result of adding singleFillResults to totalFilResults. + function publicAddFillResults(FillResults memory totalFillResults, FillResults memory singleFillResults) + public + pure + returns (FillResults memory) + { + addFillResults(totalFillResults, singleFillResults); + return totalFillResults; + } + + /// @dev Calculates amounts filled and fees paid by maker and taker. + /// @param order to be filled. + /// @param takerAssetFilledAmount Amount of takerAsset that will be filled. + /// @return fillResults Amounts filled and fees paid by maker and taker. + function publicCalculateFillResults( + Order memory order, + uint256 takerAssetFilledAmount + ) + public + pure + returns (FillResults memory fillResults) + { + return calculateFillResults(order, takerAssetFilledAmount); + } + + /// @dev Calculates partial value given a numerator and denominator. + /// @param numerator Numerator. + /// @param denominator Denominator. + /// @param target Value to calculate partial of. + /// @return Partial value of target. + function publicGetPartialAmount( + uint256 numerator, + uint256 denominator, + uint256 target + ) + public + pure + returns (uint256 partialAmount) + { + return getPartialAmount(numerator, denominator, target); + } + + /// @dev Checks if rounding error > 0.1%. + /// @param numerator Numerator. + /// @param denominator Denominator. + /// @param target Value to multiply with numerator/denominator. + /// @return Rounding error is present. + function publicIsRoundingError( + uint256 numerator, + uint256 denominator, + uint256 target + ) + public + pure + returns (bool isError) + { + return isRoundingError(numerator, denominator, target); + } + + /// @dev Updates state with results of a fill order. + /// @param order that was filled. + /// @param takerAddress Address of taker who filled the order. + /// @param orderTakerAssetFilledAmount Amount of order already filled. + /// @return fillResults Amounts filled and fees paid by maker and taker. + function publicUpdateFilledState( + Order memory order, + address takerAddress, + bytes32 orderHash, + uint256 orderTakerAssetFilledAmount, + FillResults memory fillResults + ) + public + { + updateFilledState( + order, + takerAddress, + orderHash, + orderTakerAssetFilledAmount, + fillResults + ); + } +} diff --git a/packages/contracts/test/exchange/fill_order.ts b/packages/contracts/test/exchange/fill_order.ts index 029bd66e2..1494fe093 100644 --- a/packages/contracts/test/exchange/fill_order.ts +++ b/packages/contracts/test/exchange/fill_order.ts @@ -2,7 +2,10 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; import * as _ from 'lodash'; import { chaiSetup } from '../utils/chai_setup'; -import { CoreCombinatorialUtils, coreCombinatorialUtilsFactoryAsync } from '../utils/core_combinatorial_utils'; +import { + FillOrderCombinatorialUtils, + fillOrderCombinatorialUtilsFactoryAsync, +} from '../utils/fill_order_combinatorial_utils'; import { AllowanceAmountScenario, AssetDataScenario, @@ -47,11 +50,11 @@ const defaultFillScenario = { }; describe('FillOrder Tests', () => { - let coreCombinatorialUtils: CoreCombinatorialUtils; + let fillOrderCombinatorialUtils: FillOrderCombinatorialUtils; before(async () => { await blockchainLifecycle.startAsync(); - coreCombinatorialUtils = await coreCombinatorialUtilsFactoryAsync(web3Wrapper, txDefaults); + fillOrderCombinatorialUtils = await fillOrderCombinatorialUtilsFactoryAsync(web3Wrapper, txDefaults); }); after(async () => { await blockchainLifecycle.revertAsync(); @@ -67,19 +70,19 @@ describe('FillOrder Tests', () => { _.forEach(fillScenarios, fillScenario => { const description = `Combinatorial OrderFill: ${JSON.stringify(fillScenario)}`; it(description, async () => { - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); }); }; - const allFillScenarios = CoreCombinatorialUtils.generateFillOrderCombinations(); + const allFillScenarios = FillOrderCombinatorialUtils.generateFillOrderCombinations(); describe('Combinatorially generated fills orders', () => test(allFillScenarios)); it('should transfer the correct amounts when makerAssetAmount === takerAssetAmount', async () => { const fillScenario = { ...defaultFillScenario, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should transfer the correct amounts when makerAssetAmount > takerAssetAmount', async () => { const fillScenario = { @@ -89,7 +92,7 @@ describe('FillOrder Tests', () => { takerAssetAmountScenario: OrderAssetAmountScenario.Small, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should transfer the correct amounts when makerAssetAmount < takerAssetAmount', async () => { const fillScenario = { @@ -99,7 +102,7 @@ describe('FillOrder Tests', () => { makerAssetAmountScenario: OrderAssetAmountScenario.Small, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should transfer the correct amounts when taker is specified and order is claimed by taker', async () => { const fillScenario = { @@ -109,14 +112,14 @@ describe('FillOrder Tests', () => { takerScenario: TakerScenario.CorrectlySpecified, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should fill remaining value if takerAssetFillAmount > remaining takerAssetAmount', async () => { const fillScenario = { ...defaultFillScenario, takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should throw when taker is specified and order is claimed by other', async () => { const fillScenario = { @@ -126,7 +129,7 @@ describe('FillOrder Tests', () => { takerScenario: TakerScenario.IncorrectlySpecified, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should throw if makerAssetAmount is 0', async () => { @@ -138,7 +141,7 @@ describe('FillOrder Tests', () => { }, takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should throw if takerAssetAmount is 0', async () => { @@ -150,7 +153,7 @@ describe('FillOrder Tests', () => { }, takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should throw if takerAssetFillAmount is 0', async () => { @@ -158,7 +161,7 @@ describe('FillOrder Tests', () => { ...defaultFillScenario, takerAssetFillAmountScenario: TakerAssetFillAmountScenario.Zero, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should throw if an order is expired', async () => { @@ -169,7 +172,7 @@ describe('FillOrder Tests', () => { expirationTimeSecondsScenario: ExpirationTimeSecondsScenario.InPast, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should throw if maker erc20Balances are too low to fill order', async () => { @@ -180,7 +183,7 @@ describe('FillOrder Tests', () => { traderAssetBalance: BalanceAmountScenario.TooLow, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should throw if taker erc20Balances are too low to fill order', async () => { @@ -191,7 +194,7 @@ describe('FillOrder Tests', () => { traderAssetBalance: BalanceAmountScenario.TooLow, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should throw if maker allowances are too low to fill order', async () => { @@ -202,7 +205,7 @@ describe('FillOrder Tests', () => { traderAssetAllowance: AllowanceAmountScenario.TooLow, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should throw if taker allowances are too low to fill order', async () => { @@ -213,7 +216,7 @@ describe('FillOrder Tests', () => { traderAssetAllowance: AllowanceAmountScenario.TooLow, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); }); @@ -228,7 +231,7 @@ describe('FillOrder Tests', () => { }, takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should successfully fill order when makerAsset is ERC721 and takerAsset is ERC20', async () => { @@ -241,7 +244,7 @@ describe('FillOrder Tests', () => { }, takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario, true); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario, true); }); it('should successfully fill order when makerAsset is ERC20 and takerAsset is ERC721', async () => { @@ -254,7 +257,7 @@ describe('FillOrder Tests', () => { }, takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should successfully fill order when makerAsset is ERC721 and approveAll is set for it', async () => { @@ -271,7 +274,7 @@ describe('FillOrder Tests', () => { traderAssetAllowance: AllowanceAmountScenario.Unlimited, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); it('should successfully fill order when makerAsset and takerAsset are ERC721 and approveAll is set for them', async () => { @@ -292,7 +295,7 @@ describe('FillOrder Tests', () => { traderAssetAllowance: AllowanceAmountScenario.Unlimited, }, }; - await coreCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); }); }); diff --git a/packages/contracts/test/exchange/internal.ts b/packages/contracts/test/exchange/internal.ts new file mode 100644 index 000000000..67d1d2d2c --- /dev/null +++ b/packages/contracts/test/exchange/internal.ts @@ -0,0 +1,305 @@ +import { BlockchainLifecycle } from '@0xproject/dev-utils'; +import { Order, RevertReason, SignedOrder } from '@0xproject/types'; +import { BigNumber } from '@0xproject/utils'; +import * as _ from 'lodash'; + +import { TestExchangeInternalsContract } from '../../generated_contract_wrappers/test_exchange_internals'; +import { artifacts } from '../utils/artifacts'; +import { + getInvalidOpcodeErrorMessageForCallAsync, + getRevertReasonOrErrorMessageForSendTransactionAsync, +} from '../utils/assertions'; +import { chaiSetup } from '../utils/chai_setup'; +import { bytes32Values, testCombinatoriallyWithReferenceFuncAsync, uint256Values } from '../utils/combinatorial_utils'; +import { constants } from '../utils/constants'; +import { FillResults } from '../utils/types'; +import { provider, txDefaults, web3Wrapper } from '../utils/web3_wrapper'; + +chaiSetup.configure(); +const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); + +const MAX_UINT256 = new BigNumber(2).pow(256).minus(1); + +const emptyOrder: Order = { + senderAddress: constants.NULL_ADDRESS, + makerAddress: constants.NULL_ADDRESS, + takerAddress: constants.NULL_ADDRESS, + makerFee: new BigNumber(0), + takerFee: new BigNumber(0), + makerAssetAmount: new BigNumber(0), + takerAssetAmount: new BigNumber(0), + makerAssetData: '0x', + takerAssetData: '0x', + salt: new BigNumber(0), + exchangeAddress: constants.NULL_ADDRESS, + feeRecipientAddress: constants.NULL_ADDRESS, + expirationTimeSeconds: new BigNumber(0), +}; + +const emptySignedOrder: SignedOrder = { + ...emptyOrder, + signature: '', +}; + +const overflowErrorForCall = new Error(RevertReason.Uint256Overflow); + +async function referenceGetPartialAmountAsync( + numerator: BigNumber, + denominator: BigNumber, + target: BigNumber, +): Promise { + const invalidOpcodeErrorForCall = new Error(await getInvalidOpcodeErrorMessageForCallAsync()); + const product = numerator.mul(target); + if (product.greaterThan(MAX_UINT256)) { + throw overflowErrorForCall; + } + if (denominator.eq(0)) { + throw invalidOpcodeErrorForCall; + } + return product.dividedToIntegerBy(denominator); +} + +describe('Exchange core internal functions', () => { + let testExchange: TestExchangeInternalsContract; + let invalidOpcodeErrorForCall: Error | undefined; + let overflowErrorForSendTransaction: Error | undefined; + + before(async () => { + await blockchainLifecycle.startAsync(); + }); + after(async () => { + await blockchainLifecycle.revertAsync(); + }); + before(async () => { + testExchange = await TestExchangeInternalsContract.deployFrom0xArtifactAsync( + artifacts.TestExchangeInternals, + provider, + txDefaults, + ); + overflowErrorForSendTransaction = new Error( + await getRevertReasonOrErrorMessageForSendTransactionAsync(RevertReason.Uint256Overflow), + ); + invalidOpcodeErrorForCall = new Error(await getInvalidOpcodeErrorMessageForCallAsync()); + }); + // Note(albrow): Don't forget to add beforeEach and afterEach calls to reset + // the blockchain state for any tests which modify it! + + describe('addFillResults', async () => { + function makeFillResults(value: BigNumber): FillResults { + return { + makerAssetFilledAmount: value, + takerAssetFilledAmount: value, + makerFeePaid: value, + takerFeePaid: value, + }; + } + async function referenceAddFillResultsAsync( + totalValue: BigNumber, + singleValue: BigNumber, + ): Promise { + // Note(albrow): Here, each of totalFillResults and + // singleFillResults will consist of fields with the same values. + // This should be safe because none of the fields in a given + // FillResults are ever used together in a mathemetical operation. + // They are only used with the corresponding field from *the other* + // FillResults, which are different. + const totalFillResults = makeFillResults(totalValue); + const singleFillResults = makeFillResults(singleValue); + // HACK(albrow): _.mergeWith mutates the first argument! To + // workaround this we use _.cloneDeep. + return _.mergeWith( + _.cloneDeep(totalFillResults), + singleFillResults, + (totalVal: BigNumber, singleVal: BigNumber) => { + const newTotal = totalVal.add(singleVal); + if (newTotal.greaterThan(MAX_UINT256)) { + throw overflowErrorForCall; + } + return newTotal; + }, + ); + } + async function testAddFillResultsAsync(totalValue: BigNumber, singleValue: BigNumber): Promise { + const totalFillResults = makeFillResults(totalValue); + const singleFillResults = makeFillResults(singleValue); + return testExchange.publicAddFillResults.callAsync(totalFillResults, singleFillResults); + } + await testCombinatoriallyWithReferenceFuncAsync( + 'addFillResults', + referenceAddFillResultsAsync, + testAddFillResultsAsync, + [uint256Values, uint256Values], + ); + }); + + describe('calculateFillResults', async () => { + function makeOrder( + makerAssetAmount: BigNumber, + takerAssetAmount: BigNumber, + makerFee: BigNumber, + takerFee: BigNumber, + ): Order { + return { + ...emptyOrder, + makerAssetAmount, + takerAssetAmount, + makerFee, + takerFee, + }; + } + async function referenceCalculateFillResultsAsync( + orderTakerAssetAmount: BigNumber, + takerAssetFilledAmount: BigNumber, + otherAmount: BigNumber, + ): Promise { + // Note(albrow): Here we are re-using the same value (otherAmount) + // for order.makerAssetAmount, order.makerFee, and order.takerFee. + // This should be safe because they are never used with each other + // in any mathematical operation in either the reference TypeScript + // implementation or the Solidity implementation of + // calculateFillResults. + return { + makerAssetFilledAmount: await referenceGetPartialAmountAsync( + takerAssetFilledAmount, + orderTakerAssetAmount, + otherAmount, + ), + takerAssetFilledAmount, + makerFeePaid: await referenceGetPartialAmountAsync( + takerAssetFilledAmount, + orderTakerAssetAmount, + otherAmount, + ), + takerFeePaid: await referenceGetPartialAmountAsync( + takerAssetFilledAmount, + orderTakerAssetAmount, + otherAmount, + ), + }; + } + async function testCalculateFillResultsAsync( + orderTakerAssetAmount: BigNumber, + takerAssetFilledAmount: BigNumber, + otherAmount: BigNumber, + ): Promise { + const order = makeOrder(otherAmount, orderTakerAssetAmount, otherAmount, otherAmount); + return testExchange.publicCalculateFillResults.callAsync(order, takerAssetFilledAmount); + } + await testCombinatoriallyWithReferenceFuncAsync( + 'calculateFillResults', + referenceCalculateFillResultsAsync, + testCalculateFillResultsAsync, + [uint256Values, uint256Values, uint256Values], + ); + }); + + describe('getPartialAmount', async () => { + async function testGetPartialAmountAsync( + numerator: BigNumber, + denominator: BigNumber, + target: BigNumber, + ): Promise { + return testExchange.publicGetPartialAmount.callAsync(numerator, denominator, target); + } + await testCombinatoriallyWithReferenceFuncAsync( + 'getPartialAmount', + referenceGetPartialAmountAsync, + testGetPartialAmountAsync, + [uint256Values, uint256Values, uint256Values], + ); + }); + + describe('isRoundingError', async () => { + async function referenceIsRoundingErrorAsync( + numerator: BigNumber, + denominator: BigNumber, + target: BigNumber, + ): Promise { + const product = numerator.mul(target); + if (denominator.eq(0)) { + throw invalidOpcodeErrorForCall; + } + const remainder = product.mod(denominator); + if (remainder.eq(0)) { + return false; + } + if (product.greaterThan(MAX_UINT256)) { + throw overflowErrorForCall; + } + if (product.eq(0)) { + throw invalidOpcodeErrorForCall; + } + const remainderTimes1000000 = remainder.mul('1000000'); + if (remainderTimes1000000.greaterThan(MAX_UINT256)) { + throw overflowErrorForCall; + } + const errPercentageTimes1000000 = remainderTimes1000000.dividedToIntegerBy(product); + return errPercentageTimes1000000.greaterThan('1000'); + } + async function testIsRoundingErrorAsync( + numerator: BigNumber, + denominator: BigNumber, + target: BigNumber, + ): Promise { + return testExchange.publicIsRoundingError.callAsync(numerator, denominator, target); + } + await testCombinatoriallyWithReferenceFuncAsync( + 'isRoundingError', + referenceIsRoundingErrorAsync, + testIsRoundingErrorAsync, + [uint256Values, uint256Values, uint256Values], + ); + }); + + describe('updateFilledState', async () => { + // Note(albrow): Since updateFilledState modifies the state by calling + // sendTransaction, we must reset the state after each test. + beforeEach(async () => { + await blockchainLifecycle.startAsync(); + }); + afterEach(async () => { + await blockchainLifecycle.revertAsync(); + }); + async function referenceUpdateFilledStateAsync( + takerAssetFilledAmount: BigNumber, + orderTakerAssetFilledAmount: BigNumber, + // tslint:disable-next-line:no-unused-variable + orderHash: string, + ): Promise { + const totalFilledAmount = takerAssetFilledAmount.add(orderTakerAssetFilledAmount); + if (totalFilledAmount.greaterThan(MAX_UINT256)) { + throw overflowErrorForSendTransaction; + } + return totalFilledAmount; + } + async function testUpdateFilledStateAsync( + takerAssetFilledAmount: BigNumber, + orderTakerAssetFilledAmount: BigNumber, + orderHash: string, + ): Promise { + const fillResults = { + makerAssetFilledAmount: new BigNumber(0), + takerAssetFilledAmount, + makerFeePaid: new BigNumber(0), + takerFeePaid: new BigNumber(0), + }; + await web3Wrapper.awaitTransactionSuccessAsync( + await testExchange.publicUpdateFilledState.sendTransactionAsync( + emptySignedOrder, + constants.NULL_ADDRESS, + orderHash, + orderTakerAssetFilledAmount, + fillResults, + ), + constants.AWAIT_TRANSACTION_MINED_MS, + ); + return testExchange.filled.callAsync(orderHash); + } + await testCombinatoriallyWithReferenceFuncAsync( + 'updateFilledState', + referenceUpdateFilledStateAsync, + testUpdateFilledStateAsync, + [uint256Values, uint256Values, bytes32Values], + ); + }); +}); diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts index 51794d8a3..5c9f9aac7 100644 --- a/packages/contracts/test/exchange/libs.ts +++ b/packages/contracts/test/exchange/libs.ts @@ -67,6 +67,35 @@ describe('Exchange libs', () => { }); }); }); + // Note(albrow): These tests are designed to be supplemental to the + // combinatorial tests in test/exchange/internal. They test specific edge + // cases that are not covered by the combinatorial tests. + describe('LibMath', () => { + it('should return false if there is a rounding error of 0.1%', async () => { + const numerator = new BigNumber(20); + const denominator = new BigNumber(999); + const target = new BigNumber(50); + // rounding error = ((20*50/999) - floor(20*50/999)) / (20*50/999) = 0.1% + const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target); + expect(isRoundingError).to.be.false(); + }); + it('should return false if there is a rounding of 0.09%', async () => { + const numerator = new BigNumber(20); + const denominator = new BigNumber(9991); + const target = new BigNumber(500); + // rounding error = ((20*500/9991) - floor(20*500/9991)) / (20*500/9991) = 0.09% + const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target); + expect(isRoundingError).to.be.false(); + }); + it('should return true if there is a rounding error of 0.11%', async () => { + const numerator = new BigNumber(20); + const denominator = new BigNumber(9989); + const target = new BigNumber(500); + // rounding error = ((20*500/9989) - floor(20*500/9989)) / (20*500/9989) = 0.011% + const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target); + expect(isRoundingError).to.be.true(); + }); + }); describe('LibOrder', () => { describe('getOrderSchema', () => { @@ -93,96 +122,4 @@ describe('Exchange libs', () => { }); }); }); - - describe('LibMath', () => { - describe('isRoundingError', () => { - it('should return false if there is a rounding error of 0.1%', async () => { - const numerator = new BigNumber(20); - const denominator = new BigNumber(999); - const target = new BigNumber(50); - // rounding error = ((20*50/999) - floor(20*50/999)) / (20*50/999) = 0.1% - const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target); - expect(isRoundingError).to.be.false(); - }); - - it('should return false if there is a rounding of 0.09%', async () => { - const numerator = new BigNumber(20); - const denominator = new BigNumber(9991); - const target = new BigNumber(500); - // rounding error = ((20*500/9991) - floor(20*500/9991)) / (20*500/9991) = 0.09% - const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target); - expect(isRoundingError).to.be.false(); - }); - - it('should return true if there is a rounding error of 0.11%', async () => { - const numerator = new BigNumber(20); - const denominator = new BigNumber(9989); - const target = new BigNumber(500); - // rounding error = ((20*500/9989) - floor(20*500/9989)) / (20*500/9989) = 0.011% - const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target); - expect(isRoundingError).to.be.true(); - }); - - it('should return true if there is a rounding error > 0.1%', async () => { - const numerator = new BigNumber(3); - const denominator = new BigNumber(7); - const target = new BigNumber(10); - // rounding error = ((3*10/7) - floor(3*10/7)) / (3*10/7) = 6.67% - const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target); - expect(isRoundingError).to.be.true(); - }); - - it('should return false when there is no rounding error', async () => { - const numerator = new BigNumber(1); - const denominator = new BigNumber(2); - const target = new BigNumber(10); - - const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target); - expect(isRoundingError).to.be.false(); - }); - - it('should return false when there is rounding error <= 0.1%', async () => { - // randomly generated numbers - const numerator = new BigNumber(76564); - const denominator = new BigNumber(676373677); - const target = new BigNumber(105762562); - // rounding error = ((76564*105762562/676373677) - floor(76564*105762562/676373677)) / - // (76564*105762562/676373677) = 0.0007% - const isRoundingError = await libs.publicIsRoundingError.callAsync(numerator, denominator, target); - expect(isRoundingError).to.be.false(); - }); - }); - - describe('getPartialAmount', () => { - it('should return the numerator/denominator*target', async () => { - const numerator = new BigNumber(1); - const denominator = new BigNumber(2); - const target = new BigNumber(10); - - const partialAmount = await libs.publicGetPartialAmount.callAsync(numerator, denominator, target); - const expectedPartialAmount = 5; - expect(partialAmount).to.be.bignumber.equal(expectedPartialAmount); - }); - - it('should round down', async () => { - const numerator = new BigNumber(2); - const denominator = new BigNumber(3); - const target = new BigNumber(10); - - const partialAmount = await libs.publicGetPartialAmount.callAsync(numerator, denominator, target); - const expectedPartialAmount = 6; - expect(partialAmount).to.be.bignumber.equal(expectedPartialAmount); - }); - - it('should round .5 down', async () => { - const numerator = new BigNumber(1); - const denominator = new BigNumber(20); - const target = new BigNumber(10); - - const partialAmount = await libs.publicGetPartialAmount.callAsync(numerator, denominator, target); - const expectedPartialAmount = 0; - expect(partialAmount).to.be.bignumber.equal(expectedPartialAmount); - }); - }); - }); }); diff --git a/packages/contracts/test/utils/artifacts.ts b/packages/contracts/test/utils/artifacts.ts index 63bd555a4..e608ee174 100644 --- a/packages/contracts/test/utils/artifacts.ts +++ b/packages/contracts/test/utils/artifacts.ts @@ -16,6 +16,7 @@ import * as MultiSigWalletWithTimeLock from '../../artifacts/MultiSigWalletWithT import * as TestAssetProxyDispatcher from '../../artifacts/TestAssetProxyDispatcher.json'; import * as TestAssetProxyOwner from '../../artifacts/TestAssetProxyOwner.json'; import * as TestConstants from '../../artifacts/TestConstants.json'; +import * as TestExchangeInternals from '../../artifacts/TestExchangeInternals.json'; import * as TestLibBytes from '../../artifacts/TestLibBytes.json'; import * as TestLibs from '../../artifacts/TestLibs.json'; import * as TestSignatureValidator from '../../artifacts/TestSignatureValidator.json'; @@ -46,6 +47,7 @@ export const artifacts = { TestConstants: (TestConstants as any) as ContractArtifact, TestLibBytes: (TestLibBytes as any) as ContractArtifact, TestLibs: (TestLibs as any) as ContractArtifact, + TestExchangeInternals: (TestExchangeInternals as any) as ContractArtifact, TestSignatureValidator: (TestSignatureValidator as any) as ContractArtifact, Validator: (Validator as any) as ContractArtifact, Wallet: (Wallet as any) as ContractArtifact, diff --git a/packages/contracts/test/utils/assertions.ts b/packages/contracts/test/utils/assertions.ts index 112a470f6..61df800c8 100644 --- a/packages/contracts/test/utils/assertions.ts +++ b/packages/contracts/test/utils/assertions.ts @@ -15,6 +15,14 @@ let nodeType: NodeType | undefined; // resolve with either a transaction receipt or a transaction hash. export type sendTransactionResult = Promise; +/** + * Returns ganacheError if the backing Ethereum node is Ganache and gethError + * if it is Geth. + * @param ganacheError the error to be returned if the backing node is Ganache. + * @param gethError the error to be returned if the backing node is Geth. + * @returns either the given ganacheError or gethError depending on the backing + * node. + */ async function _getGanacheOrGethError(ganacheError: string, gethError: string): Promise { if (_.isUndefined(nodeType)) { nodeType = await web3Wrapper.getNodeTypeAsync(); @@ -41,6 +49,25 @@ async function _getContractCallFailedErrorMessageAsync(): Promise { return _getGanacheOrGethError('revert', 'Contract call failed'); } +/** + * Returns the expected error message for an 'invalid opcode' resulting from a + * contract call. The exact error message depends on the backing Ethereum node. + */ +export async function getInvalidOpcodeErrorMessageForCallAsync(): Promise { + return _getGanacheOrGethError('invalid opcode', 'Contract call failed'); +} + +/** + * Returns the expected error message for the given revert reason resulting from + * a sendTransaction call. The exact error message depends on the backing + * Ethereum node and whether it supports revert reasons. + * @param reason a specific revert reason. + * @returns the expected error message. + */ +export async function getRevertReasonOrErrorMessageForSendTransactionAsync(reason: RevertReason): Promise { + return _getGanacheOrGethError(reason, 'always failing transaction'); +} + /** * Rejects if the given Promise does not reject with an error indicating * insufficient funds. diff --git a/packages/contracts/test/utils/combinatorial_utils.ts b/packages/contracts/test/utils/combinatorial_utils.ts new file mode 100644 index 000000000..d72b41f8a --- /dev/null +++ b/packages/contracts/test/utils/combinatorial_utils.ts @@ -0,0 +1,113 @@ +import { BigNumber } from '@0xproject/utils'; +import * as combinatorics from 'js-combinatorics'; + +import { testWithReferenceFuncAsync } from './test_with_reference'; + +// A set of values corresponding to the uint256 type in Solidity. This set +// contains some notable edge cases, including some values which will overflow +// the uint256 type when used in different mathematical operations. +export const uint256Values = [ + new BigNumber(0), + new BigNumber(1), + new BigNumber(2), + // Non-trivial big number. + new BigNumber(2).pow(64), + // Max that does not overflow when squared. + new BigNumber(2).pow(128).minus(1), + // Min that does overflow when squared. + new BigNumber(2).pow(128), + // Max that does not overflow when doubled. + new BigNumber(2).pow(255).minus(1), + // Min that does overflow when doubled. + new BigNumber(2).pow(255), + // Max that does not overflow. + new BigNumber(2).pow(256).minus(1), +]; + +// A set of values corresponding to the bytes32 type in Solidity. +export const bytes32Values = [ + // Min + '0x0000000000000000000000000000000000000000000000000000000000000000', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000002', + // Non-trivial big number. + '0x000000000000f000000000000000000000000000000000000000000000000000', + // Max + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', +]; + +export async function testCombinatoriallyWithReferenceFuncAsync( + name: string, + referenceFunc: (p0: P0, p1: P1) => Promise, + testFunc: (p0: P0, p1: P1) => Promise, + allValues: [P0[], P1[]], +): Promise; +export async function testCombinatoriallyWithReferenceFuncAsync( + name: string, + referenceFunc: (p0: P0, p1: P1, p2: P2) => Promise, + testFunc: (p0: P0, p1: P1, p2: P2) => Promise, + allValues: [P0[], P1[], P2[]], +): Promise; +export async function testCombinatoriallyWithReferenceFuncAsync( + name: string, + referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise, + testFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise, + allValues: [P0[], P1[], P2[], P3[]], +): Promise; +export async function testCombinatoriallyWithReferenceFuncAsync( + name: string, + referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise, + testFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise, + allValues: [P0[], P1[], P2[], P3[], P4[]], +): Promise; + +/** + * Uses combinatorics to test the behavior of a test function by comparing it to + * the expected behavior (defined by a reference function) for a large number of + * possible input values. + * + * First generates test cases by taking the cartesian product of the given + * values. Each test case is a set of N values corresponding to the N arguments + * for the test func and the reference func. For each test case, first the + * reference function will be called to obtain an "expected result", or if the + * reference function throws/rejects, an "expected error". Next, the test + * function will be called to obtain an "actual result", or if the test function + * throws/rejects, an "actual error". Each test case passes if at least one of + * the following conditions is met: + * + * 1) Neither the reference function or the test function throw and the + * "expected result" equals the "actual result". + * + * 2) Both the reference function and the test function throw and the "actual + * error" message *contains* the "expected error" message. + * + * The first test case which does not meet one of these conditions will cause + * the entire test to fail and this function will throw/reject. + * + * @param referenceFuncAsync a reference function implemented in pure + * JavaScript/TypeScript which accepts N arguments and returns the "expected + * result" or "expected error" for a given test case. + * @param testFuncAsync a test function which, e.g., makes a call or sends a + * transaction to a contract. It accepts the same N arguments returns the + * "actual result" or "actual error" for a given test case. + * @param values an array of N arrays. Each inner array is a set of possible + * values which are passed into both the reference function and the test + * function. + * @return A Promise that resolves if the test passes and rejects if the test + * fails, according to the rules described above. + */ +export async function testCombinatoriallyWithReferenceFuncAsync( + name: string, + referenceFuncAsync: (...args: any[]) => Promise, + testFuncAsync: (...args: any[]) => Promise, + allValues: any[], +): Promise { + const testCases = combinatorics.cartesianProduct(...allValues); + let counter = 0; + testCases.forEach(async testCase => { + counter += 1; + it(`${name} ${counter}/${testCases.length}`, async () => { + await testWithReferenceFuncAsync(referenceFuncAsync, testFuncAsync, testCase as any); + }); + }); +} diff --git a/packages/contracts/test/utils/core_combinatorial_utils.ts b/packages/contracts/test/utils/core_combinatorial_utils.ts deleted file mode 100644 index 44a5199c0..000000000 --- a/packages/contracts/test/utils/core_combinatorial_utils.ts +++ /dev/null @@ -1,878 +0,0 @@ -import { - assetDataUtils, - BalanceAndProxyAllowanceLazyStore, - ExchangeTransferSimulator, - orderHashUtils, - OrderStateUtils, - OrderValidationUtils, -} from '@0xproject/order-utils'; -import { AssetProxyId, RevertReason, SignatureType, SignedOrder } from '@0xproject/types'; -import { BigNumber, errorUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import * as chai from 'chai'; -import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types'; -import * as _ from 'lodash'; -import 'make-promises-safe'; - -import { ExchangeContract, ExchangeFillEventArgs } from '../../generated_contract_wrappers/exchange'; - -import { artifacts } from './artifacts'; -import { expectTransactionFailedAsync } from './assertions'; -import { AssetWrapper } from './asset_wrapper'; -import { chaiSetup } from './chai_setup'; -import { constants } from './constants'; -import { ERC20Wrapper } from './erc20_wrapper'; -import { ERC721Wrapper } from './erc721_wrapper'; -import { ExchangeWrapper } from './exchange_wrapper'; -import { OrderFactoryFromScenario } from './order_factory_from_scenario'; -import { orderUtils } from './order_utils'; -import { signingUtils } from './signing_utils'; -import { SimpleAssetBalanceAndProxyAllowanceFetcher } from './simple_asset_balance_and_proxy_allowance_fetcher'; -import { SimpleOrderFilledCancelledFetcher } from './simple_order_filled_cancelled_fetcher'; -import { - AllowanceAmountScenario, - AssetDataScenario, - BalanceAmountScenario, - ExpirationTimeSecondsScenario, - FeeRecipientAddressScenario, - FillScenario, - OrderAssetAmountScenario, - TakerAssetFillAmountScenario, - TakerScenario, - TraderStateScenario, -} from './types'; - -chaiSetup.configure(); -const expect = chai.expect; - -/** - * Instantiates a new instance of CoreCombinatorialUtils. Since this method has some - * required async setup, a factory method is required. - * @param web3Wrapper Web3Wrapper instance - * @param txDefaults Default Ethereum tx options - * @return CoreCombinatorialUtils instance - */ -export async function coreCombinatorialUtilsFactoryAsync( - web3Wrapper: Web3Wrapper, - txDefaults: Partial, -): Promise { - const accounts = await web3Wrapper.getAvailableAddressesAsync(); - const userAddresses = _.slice(accounts, 0, 5); - const [ownerAddress, makerAddress, takerAddress] = userAddresses; - const makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[userAddresses.indexOf(makerAddress)]; - - const provider = web3Wrapper.getProvider(); - const erc20Wrapper = new ERC20Wrapper(provider, userAddresses, ownerAddress); - const erc721Wrapper = new ERC721Wrapper(provider, userAddresses, ownerAddress); - - const erc20EighteenDecimalTokenCount = 3; - const eighteenDecimals = new BigNumber(18); - const [ - erc20EighteenDecimalTokenA, - erc20EighteenDecimalTokenB, - zrxToken, - ] = await erc20Wrapper.deployDummyTokensAsync(erc20EighteenDecimalTokenCount, eighteenDecimals); - const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address); - - const erc20FiveDecimalTokenCount = 2; - const fiveDecimals = new BigNumber(5); - const [erc20FiveDecimalTokenA, erc20FiveDecimalTokenB] = await erc20Wrapper.deployDummyTokensAsync( - erc20FiveDecimalTokenCount, - fiveDecimals, - ); - const erc20Proxy = await erc20Wrapper.deployProxyAsync(); - await erc20Wrapper.setBalancesAndAllowancesAsync(); - - const [erc721Token] = await erc721Wrapper.deployDummyTokensAsync(); - const erc721Proxy = await erc721Wrapper.deployProxyAsync(); - await erc721Wrapper.setBalancesAndAllowancesAsync(); - const erc721Balances = await erc721Wrapper.getBalancesAsync(); - - const assetWrapper = new AssetWrapper([erc20Wrapper, erc721Wrapper]); - - const exchangeContract = await ExchangeContract.deployFrom0xArtifactAsync( - artifacts.Exchange, - provider, - txDefaults, - zrxAssetData, - ); - const exchangeWrapper = new ExchangeWrapper(exchangeContract, provider); - await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, ownerAddress); - await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, ownerAddress); - - await web3Wrapper.awaitTransactionSuccessAsync( - await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeContract.address, { - from: ownerAddress, - }), - constants.AWAIT_TRANSACTION_MINED_MS, - ); - await web3Wrapper.awaitTransactionSuccessAsync( - await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeContract.address, { - from: ownerAddress, - }), - constants.AWAIT_TRANSACTION_MINED_MS, - ); - - const orderFactory = new OrderFactoryFromScenario( - userAddresses, - zrxToken.address, - [erc20EighteenDecimalTokenA.address, erc20EighteenDecimalTokenB.address], - [erc20FiveDecimalTokenA.address, erc20FiveDecimalTokenB.address], - erc721Token, - erc721Balances, - exchangeContract.address, - ); - - const coreCombinatorialUtils = new CoreCombinatorialUtils( - orderFactory, - ownerAddress, - makerAddress, - makerPrivateKey, - takerAddress, - zrxAssetData, - exchangeWrapper, - assetWrapper, - ); - return coreCombinatorialUtils; -} - -export class CoreCombinatorialUtils { - public orderFactory: OrderFactoryFromScenario; - public ownerAddress: string; - public makerAddress: string; - public makerPrivateKey: Buffer; - public takerAddress: string; - public zrxAssetData: string; - public exchangeWrapper: ExchangeWrapper; - public assetWrapper: AssetWrapper; - public static generateFillOrderCombinations(): FillScenario[] { - const takerScenarios = [ - TakerScenario.Unspecified, - // TakerScenario.CorrectlySpecified, - // TakerScenario.IncorrectlySpecified, - ]; - const feeRecipientScenarios = [ - FeeRecipientAddressScenario.EthUserAddress, - // FeeRecipientAddressScenario.BurnAddress, - ]; - const makerAssetAmountScenario = [ - OrderAssetAmountScenario.Large, - // OrderAssetAmountScenario.Zero, - // OrderAssetAmountScenario.Small, - ]; - const takerAssetAmountScenario = [ - OrderAssetAmountScenario.Large, - // OrderAssetAmountScenario.Zero, - // OrderAssetAmountScenario.Small, - ]; - const makerFeeScenario = [ - OrderAssetAmountScenario.Large, - // OrderAssetAmountScenario.Small, - // OrderAssetAmountScenario.Zero, - ]; - const takerFeeScenario = [ - OrderAssetAmountScenario.Large, - // OrderAssetAmountScenario.Small, - // OrderAssetAmountScenario.Zero, - ]; - const expirationTimeSecondsScenario = [ - ExpirationTimeSecondsScenario.InFuture, - ExpirationTimeSecondsScenario.InPast, - ]; - const makerAssetDataScenario = [ - AssetDataScenario.ERC20FiveDecimals, - AssetDataScenario.ERC20NonZRXEighteenDecimals, - AssetDataScenario.ERC721, - AssetDataScenario.ZRXFeeToken, - ]; - const takerAssetDataScenario = [ - AssetDataScenario.ERC20FiveDecimals, - AssetDataScenario.ERC20NonZRXEighteenDecimals, - AssetDataScenario.ERC721, - AssetDataScenario.ZRXFeeToken, - ]; - const takerAssetFillAmountScenario = [ - TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount, - // TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount, - // TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount, - ]; - const makerAssetBalanceScenario = [ - BalanceAmountScenario.Higher, - // BalanceAmountScenario.Exact, - // BalanceAmountScenario.TooLow, - ]; - const makerAssetAllowanceScenario = [ - AllowanceAmountScenario.Higher, - // AllowanceAmountScenario.Exact, - // AllowanceAmountScenario.TooLow, - // AllowanceAmountScenario.Unlimited, - ]; - const makerZRXBalanceScenario = [ - BalanceAmountScenario.Higher, - // BalanceAmountScenario.Exact, - // BalanceAmountScenario.TooLow, - ]; - const makerZRXAllowanceScenario = [ - AllowanceAmountScenario.Higher, - // AllowanceAmountScenario.Exact, - // AllowanceAmountScenario.TooLow, - // AllowanceAmountScenario.Unlimited, - ]; - const takerAssetBalanceScenario = [ - BalanceAmountScenario.Higher, - // BalanceAmountScenario.Exact, - // BalanceAmountScenario.TooLow, - ]; - const takerAssetAllowanceScenario = [ - AllowanceAmountScenario.Higher, - // AllowanceAmountScenario.Exact, - // AllowanceAmountScenario.TooLow, - // AllowanceAmountScenario.Unlimited, - ]; - const takerZRXBalanceScenario = [ - BalanceAmountScenario.Higher, - // BalanceAmountScenario.Exact, - // BalanceAmountScenario.TooLow, - ]; - const takerZRXAllowanceScenario = [ - AllowanceAmountScenario.Higher, - // AllowanceAmountScenario.Exact, - // AllowanceAmountScenario.TooLow, - // AllowanceAmountScenario.Unlimited, - ]; - const fillScenarioArrays = CoreCombinatorialUtils._getAllCombinations([ - takerScenarios, - feeRecipientScenarios, - makerAssetAmountScenario, - takerAssetAmountScenario, - makerFeeScenario, - takerFeeScenario, - expirationTimeSecondsScenario, - makerAssetDataScenario, - takerAssetDataScenario, - takerAssetFillAmountScenario, - makerAssetBalanceScenario, - makerAssetAllowanceScenario, - makerZRXBalanceScenario, - makerZRXAllowanceScenario, - takerAssetBalanceScenario, - takerAssetAllowanceScenario, - takerZRXBalanceScenario, - takerZRXAllowanceScenario, - ]); - - const fillScenarios = _.map(fillScenarioArrays, fillScenarioArray => { - // tslint:disable:custom-no-magic-numbers - const fillScenario: FillScenario = { - orderScenario: { - takerScenario: fillScenarioArray[0] as TakerScenario, - feeRecipientScenario: fillScenarioArray[1] as FeeRecipientAddressScenario, - makerAssetAmountScenario: fillScenarioArray[2] as OrderAssetAmountScenario, - takerAssetAmountScenario: fillScenarioArray[3] as OrderAssetAmountScenario, - makerFeeScenario: fillScenarioArray[4] as OrderAssetAmountScenario, - takerFeeScenario: fillScenarioArray[5] as OrderAssetAmountScenario, - expirationTimeSecondsScenario: fillScenarioArray[6] as ExpirationTimeSecondsScenario, - makerAssetDataScenario: fillScenarioArray[7] as AssetDataScenario, - takerAssetDataScenario: fillScenarioArray[8] as AssetDataScenario, - }, - takerAssetFillAmountScenario: fillScenarioArray[9] as TakerAssetFillAmountScenario, - makerStateScenario: { - traderAssetBalance: fillScenarioArray[10] as BalanceAmountScenario, - traderAssetAllowance: fillScenarioArray[11] as AllowanceAmountScenario, - zrxFeeBalance: fillScenarioArray[12] as BalanceAmountScenario, - zrxFeeAllowance: fillScenarioArray[13] as AllowanceAmountScenario, - }, - takerStateScenario: { - traderAssetBalance: fillScenarioArray[14] as BalanceAmountScenario, - traderAssetAllowance: fillScenarioArray[15] as AllowanceAmountScenario, - zrxFeeBalance: fillScenarioArray[16] as BalanceAmountScenario, - zrxFeeAllowance: fillScenarioArray[17] as AllowanceAmountScenario, - }, - }; - // tslint:enable:custom-no-magic-numbers - return fillScenario; - }); - - return fillScenarios; - } - /** - * Recursive implementation of generating all combinations of the supplied - * string-containing arrays. - */ - private static _getAllCombinations(arrays: string[][]): string[][] { - // Base case - if (arrays.length === 1) { - const remainingValues = _.map(arrays[0], val => { - return [val]; - }); - return remainingValues; - } else { - const result = []; - const restOfArrays = arrays.slice(1); - const allCombinationsOfRemaining = CoreCombinatorialUtils._getAllCombinations(restOfArrays); // recur with the rest of array - // tslint:disable:prefer-for-of - for (let i = 0; i < allCombinationsOfRemaining.length; i++) { - for (let j = 0; j < arrays[0].length; j++) { - result.push([arrays[0][j], ...allCombinationsOfRemaining[i]]); - } - } - // tslint:enable:prefer-for-of - return result; - } - } - constructor( - orderFactory: OrderFactoryFromScenario, - ownerAddress: string, - makerAddress: string, - makerPrivateKey: Buffer, - takerAddress: string, - zrxAssetData: string, - exchangeWrapper: ExchangeWrapper, - assetWrapper: AssetWrapper, - ) { - this.orderFactory = orderFactory; - this.ownerAddress = ownerAddress; - this.makerAddress = makerAddress; - this.makerPrivateKey = makerPrivateKey; - this.takerAddress = takerAddress; - this.zrxAssetData = zrxAssetData; - this.exchangeWrapper = exchangeWrapper; - this.assetWrapper = assetWrapper; - } - public async testFillOrderScenarioAsync( - provider: Provider, - fillScenario: FillScenario, - isVerbose: boolean = false, - ): Promise { - // 1. Generate order - const order = this.orderFactory.generateOrder(fillScenario.orderScenario); - - // 2. Sign order - const orderHashBuff = orderHashUtils.getOrderHashBuffer(order); - const signature = signingUtils.signMessage(orderHashBuff, this.makerPrivateKey, SignatureType.EthSign); - const signedOrder = { - ...order, - signature: `0x${signature.toString('hex')}`, - }; - - const balanceAndProxyAllowanceFetcher = new SimpleAssetBalanceAndProxyAllowanceFetcher(this.assetWrapper); - const orderFilledCancelledFetcher = new SimpleOrderFilledCancelledFetcher( - this.exchangeWrapper, - this.zrxAssetData, - ); - - // 3. Figure out fill amount - const takerAssetFillAmount = await this._getTakerAssetFillAmountAsync( - signedOrder, - fillScenario.takerAssetFillAmountScenario, - balanceAndProxyAllowanceFetcher, - orderFilledCancelledFetcher, - ); - - // 4. Permutate the maker and taker balance/allowance scenarios - await this._modifyTraderStateAsync( - fillScenario.makerStateScenario, - fillScenario.takerStateScenario, - signedOrder, - takerAssetFillAmount, - ); - - // 5. If I fill it by X, what are the resulting balances/allowances/filled amounts expected? - const orderValidationUtils = new OrderValidationUtils(orderFilledCancelledFetcher); - const lazyStore = new BalanceAndProxyAllowanceLazyStore(balanceAndProxyAllowanceFetcher); - const exchangeTransferSimulator = new ExchangeTransferSimulator(lazyStore); - - let fillRevertReasonIfExists; - try { - await orderValidationUtils.validateFillOrderThrowIfInvalidAsync( - exchangeTransferSimulator, - provider, - signedOrder, - takerAssetFillAmount, - this.takerAddress, - this.zrxAssetData, - ); - if (isVerbose) { - logUtils.log(`Expecting fillOrder to succeed.`); - } - } catch (err) { - fillRevertReasonIfExists = err.message; - if (isVerbose) { - logUtils.log(`Expecting fillOrder to fail with:`); - logUtils.log(err); - } - } - - // 6. Fill the order - await this._fillOrderAndAssertOutcomeAsync( - signedOrder, - takerAssetFillAmount, - lazyStore, - fillRevertReasonIfExists, - ); - } - private async _fillOrderAndAssertOutcomeAsync( - signedOrder: SignedOrder, - takerAssetFillAmount: BigNumber, - lazyStore: BalanceAndProxyAllowanceLazyStore, - fillRevertReasonIfExists: RevertReason | undefined, - ): Promise { - if (!_.isUndefined(fillRevertReasonIfExists)) { - return expectTransactionFailedAsync( - this.exchangeWrapper.fillOrderAsync(signedOrder, this.takerAddress, { takerAssetFillAmount }), - fillRevertReasonIfExists, - ); - } - - const makerAddress = signedOrder.makerAddress; - const makerAssetData = signedOrder.makerAssetData; - const takerAssetData = signedOrder.takerAssetData; - const feeRecipient = signedOrder.feeRecipientAddress; - - const expMakerAssetBalanceOfMaker = await lazyStore.getBalanceAsync(makerAssetData, makerAddress); - const expMakerAssetAllowanceOfMaker = await lazyStore.getProxyAllowanceAsync(makerAssetData, makerAddress); - const expTakerAssetBalanceOfMaker = await lazyStore.getBalanceAsync(takerAssetData, makerAddress); - const expZRXAssetBalanceOfMaker = await lazyStore.getBalanceAsync(this.zrxAssetData, makerAddress); - const expZRXAssetAllowanceOfMaker = await lazyStore.getProxyAllowanceAsync(this.zrxAssetData, makerAddress); - const expTakerAssetBalanceOfTaker = await lazyStore.getBalanceAsync(takerAssetData, this.takerAddress); - const expTakerAssetAllowanceOfTaker = await lazyStore.getProxyAllowanceAsync(takerAssetData, this.takerAddress); - const expMakerAssetBalanceOfTaker = await lazyStore.getBalanceAsync(makerAssetData, this.takerAddress); - const expZRXAssetBalanceOfTaker = await lazyStore.getBalanceAsync(this.zrxAssetData, this.takerAddress); - const expZRXAssetAllowanceOfTaker = await lazyStore.getProxyAllowanceAsync( - this.zrxAssetData, - this.takerAddress, - ); - const expZRXAssetBalanceOfFeeRecipient = await lazyStore.getBalanceAsync(this.zrxAssetData, feeRecipient); - - const orderHash = orderHashUtils.getOrderHashHex(signedOrder); - const alreadyFilledTakerAmount = await this.exchangeWrapper.getTakerAssetFilledAmountAsync(orderHash); - const remainingTakerAmountToFill = signedOrder.takerAssetAmount.minus(alreadyFilledTakerAmount); - const expFilledTakerAmount = takerAssetFillAmount.gt(remainingTakerAmountToFill) - ? remainingTakerAmountToFill - : alreadyFilledTakerAmount.add(takerAssetFillAmount); - - const expFilledMakerAmount = orderUtils.getPartialAmount( - expFilledTakerAmount, - signedOrder.takerAssetAmount, - signedOrder.makerAssetAmount, - ); - - // - Let's fill the order! - const txReceipt = await this.exchangeWrapper.fillOrderAsync(signedOrder, this.takerAddress, { - takerAssetFillAmount, - }); - - const actFilledTakerAmount = await this.exchangeWrapper.getTakerAssetFilledAmountAsync(orderHash); - expect(actFilledTakerAmount).to.be.bignumber.equal(expFilledTakerAmount, 'filledTakerAmount'); - - expect(txReceipt.logs.length).to.be.equal(1, 'logs length'); - // tslint:disable-next-line:no-unnecessary-type-assertion - const log = txReceipt.logs[0] as LogWithDecodedArgs; - expect(log.args.makerAddress).to.be.equal(makerAddress, 'log.args.makerAddress'); - expect(log.args.takerAddress).to.be.equal(this.takerAddress, 'log.args.this.takerAddress'); - expect(log.args.feeRecipientAddress).to.be.equal(feeRecipient, 'log.args.feeRecipientAddress'); - expect(log.args.makerAssetFilledAmount).to.be.bignumber.equal( - expFilledMakerAmount, - 'log.args.makerAssetFilledAmount', - ); - expect(log.args.takerAssetFilledAmount).to.be.bignumber.equal( - expFilledTakerAmount, - 'log.args.takerAssetFilledAmount', - ); - const expMakerFeePaid = orderUtils.getPartialAmount( - expFilledTakerAmount, - signedOrder.takerAssetAmount, - signedOrder.makerFee, - ); - expect(log.args.makerFeePaid).to.be.bignumber.equal(expMakerFeePaid, 'log.args.makerFeePaid'); - const expTakerFeePaid = orderUtils.getPartialAmount( - expFilledTakerAmount, - signedOrder.takerAssetAmount, - signedOrder.takerFee, - ); - expect(log.args.takerFeePaid).to.be.bignumber.equal(expTakerFeePaid, 'logs.args.takerFeePaid'); - expect(log.args.orderHash).to.be.equal(orderHash, 'log.args.orderHash'); - expect(log.args.makerAssetData).to.be.equal(makerAssetData, 'log.args.makerAssetData'); - expect(log.args.takerAssetData).to.be.equal(takerAssetData, 'log.args.takerAssetData'); - - const actMakerAssetBalanceOfMaker = await this.assetWrapper.getBalanceAsync(makerAddress, makerAssetData); - expect(actMakerAssetBalanceOfMaker).to.be.bignumber.equal( - expMakerAssetBalanceOfMaker, - 'makerAssetBalanceOfMaker', - ); - - const actMakerAssetAllowanceOfMaker = await this.assetWrapper.getProxyAllowanceAsync( - makerAddress, - makerAssetData, - ); - expect(actMakerAssetAllowanceOfMaker).to.be.bignumber.equal( - expMakerAssetAllowanceOfMaker, - 'makerAssetAllowanceOfMaker', - ); - - const actTakerAssetBalanceOfMaker = await this.assetWrapper.getBalanceAsync(makerAddress, takerAssetData); - expect(actTakerAssetBalanceOfMaker).to.be.bignumber.equal( - expTakerAssetBalanceOfMaker, - 'takerAssetBalanceOfMaker', - ); - - const actZRXAssetBalanceOfMaker = await this.assetWrapper.getBalanceAsync(makerAddress, this.zrxAssetData); - expect(actZRXAssetBalanceOfMaker).to.be.bignumber.equal(expZRXAssetBalanceOfMaker, 'ZRXAssetBalanceOfMaker'); - - const actZRXAssetAllowanceOfMaker = await this.assetWrapper.getProxyAllowanceAsync( - makerAddress, - this.zrxAssetData, - ); - expect(actZRXAssetAllowanceOfMaker).to.be.bignumber.equal( - expZRXAssetAllowanceOfMaker, - 'ZRXAssetAllowanceOfMaker', - ); - - const actTakerAssetBalanceOfTaker = await this.assetWrapper.getBalanceAsync(this.takerAddress, takerAssetData); - expect(actTakerAssetBalanceOfTaker).to.be.bignumber.equal( - expTakerAssetBalanceOfTaker, - 'TakerAssetBalanceOfTaker', - ); - - const actTakerAssetAllowanceOfTaker = await this.assetWrapper.getProxyAllowanceAsync( - this.takerAddress, - takerAssetData, - ); - - expect(actTakerAssetAllowanceOfTaker).to.be.bignumber.equal( - expTakerAssetAllowanceOfTaker, - 'TakerAssetAllowanceOfTaker', - ); - - const actMakerAssetBalanceOfTaker = await this.assetWrapper.getBalanceAsync(this.takerAddress, makerAssetData); - expect(actMakerAssetBalanceOfTaker).to.be.bignumber.equal( - expMakerAssetBalanceOfTaker, - 'MakerAssetBalanceOfTaker', - ); - - const actZRXAssetBalanceOfTaker = await this.assetWrapper.getBalanceAsync(this.takerAddress, this.zrxAssetData); - expect(actZRXAssetBalanceOfTaker).to.be.bignumber.equal(expZRXAssetBalanceOfTaker, 'ZRXAssetBalanceOfTaker'); - - const actZRXAssetAllowanceOfTaker = await this.assetWrapper.getProxyAllowanceAsync( - this.takerAddress, - this.zrxAssetData, - ); - expect(actZRXAssetAllowanceOfTaker).to.be.bignumber.equal( - expZRXAssetAllowanceOfTaker, - 'ZRXAssetAllowanceOfTaker', - ); - - const actZRXAssetBalanceOfFeeRecipient = await this.assetWrapper.getBalanceAsync( - feeRecipient, - this.zrxAssetData, - ); - expect(actZRXAssetBalanceOfFeeRecipient).to.be.bignumber.equal( - expZRXAssetBalanceOfFeeRecipient, - 'ZRXAssetBalanceOfFeeRecipient', - ); - } - private async _getTakerAssetFillAmountAsync( - signedOrder: SignedOrder, - takerAssetFillAmountScenario: TakerAssetFillAmountScenario, - balanceAndProxyAllowanceFetcher: SimpleAssetBalanceAndProxyAllowanceFetcher, - orderFilledCancelledFetcher: SimpleOrderFilledCancelledFetcher, - ): Promise { - const orderStateUtils = new OrderStateUtils(balanceAndProxyAllowanceFetcher, orderFilledCancelledFetcher); - const fillableTakerAssetAmount = await orderStateUtils.getMaxFillableTakerAssetAmountAsync( - signedOrder, - this.takerAddress, - ); - - let takerAssetFillAmount; - switch (takerAssetFillAmountScenario) { - case TakerAssetFillAmountScenario.Zero: - takerAssetFillAmount = new BigNumber(0); - break; - - case TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount: - takerAssetFillAmount = fillableTakerAssetAmount; - break; - - case TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount: - takerAssetFillAmount = fillableTakerAssetAmount.add(1); - break; - - case TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount: - const takerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.takerAssetData); - const makerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.makerAssetData); - const isEitherAssetERC721 = - takerAssetProxyId === AssetProxyId.ERC721 || makerAssetProxyId === AssetProxyId.ERC721; - if (isEitherAssetERC721) { - throw new Error( - 'Cannot test `TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount` together with ERC721 assets since orders involving ERC721 must always be filled exactly.', - ); - } - takerAssetFillAmount = fillableTakerAssetAmount.div(2).floor(); - break; - - default: - throw errorUtils.spawnSwitchErr('TakerAssetFillAmountScenario', takerAssetFillAmountScenario); - } - - return takerAssetFillAmount; - } - private async _modifyTraderStateAsync( - makerStateScenario: TraderStateScenario, - takerStateScenario: TraderStateScenario, - signedOrder: SignedOrder, - takerAssetFillAmount: BigNumber, - ): Promise { - const makerAssetFillAmount = orderUtils.getPartialAmount( - takerAssetFillAmount, - signedOrder.takerAssetAmount, - signedOrder.makerAssetAmount, - ); - switch (makerStateScenario.traderAssetBalance) { - case BalanceAmountScenario.Higher: - break; // Noop since this is already the default - - case BalanceAmountScenario.TooLow: - if (makerAssetFillAmount.eq(0)) { - throw new Error(`Cannot set makerAssetBalanceOfMaker TooLow if makerAssetFillAmount is 0`); - } - const tooLowBalance = makerAssetFillAmount.minus(1); - await this.assetWrapper.setBalanceAsync( - signedOrder.makerAddress, - signedOrder.makerAssetData, - tooLowBalance, - ); - break; - - case BalanceAmountScenario.Exact: - const exactBalance = makerAssetFillAmount; - await this.assetWrapper.setBalanceAsync( - signedOrder.makerAddress, - signedOrder.makerAssetData, - exactBalance, - ); - break; - - default: - throw errorUtils.spawnSwitchErr( - 'makerStateScenario.traderAssetBalance', - makerStateScenario.traderAssetBalance, - ); - } - - const makerFee = orderUtils.getPartialAmount( - takerAssetFillAmount, - signedOrder.takerAssetAmount, - signedOrder.makerFee, - ); - switch (makerStateScenario.zrxFeeBalance) { - case BalanceAmountScenario.Higher: - break; // Noop since this is already the default - - case BalanceAmountScenario.TooLow: - if (makerFee.eq(0)) { - throw new Error(`Cannot set zrxAsserBalanceOfMaker TooLow if makerFee is 0`); - } - const tooLowBalance = makerFee.minus(1); - await this.assetWrapper.setBalanceAsync(signedOrder.makerAddress, this.zrxAssetData, tooLowBalance); - break; - - case BalanceAmountScenario.Exact: - const exactBalance = makerFee; - await this.assetWrapper.setBalanceAsync(signedOrder.makerAddress, this.zrxAssetData, exactBalance); - break; - - default: - throw errorUtils.spawnSwitchErr('makerStateScenario.zrxFeeBalance', makerStateScenario.zrxFeeBalance); - } - - switch (makerStateScenario.traderAssetAllowance) { - case AllowanceAmountScenario.Higher: - break; // Noop since this is already the default - - case AllowanceAmountScenario.TooLow: - const tooLowAllowance = makerAssetFillAmount.minus(1); - await this.assetWrapper.setProxyAllowanceAsync( - signedOrder.makerAddress, - signedOrder.makerAssetData, - tooLowAllowance, - ); - break; - - case AllowanceAmountScenario.Exact: - const exactAllowance = makerAssetFillAmount; - await this.assetWrapper.setProxyAllowanceAsync( - signedOrder.makerAddress, - signedOrder.makerAssetData, - exactAllowance, - ); - break; - - case AllowanceAmountScenario.Unlimited: - await this.assetWrapper.setProxyAllowanceAsync( - signedOrder.makerAddress, - signedOrder.makerAssetData, - constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, - ); - break; - - default: - throw errorUtils.spawnSwitchErr( - 'makerStateScenario.traderAssetAllowance', - makerStateScenario.traderAssetAllowance, - ); - } - - switch (makerStateScenario.zrxFeeAllowance) { - case AllowanceAmountScenario.Higher: - break; // Noop since this is already the default - - case AllowanceAmountScenario.TooLow: - const tooLowAllowance = makerFee.minus(1); - await this.assetWrapper.setProxyAllowanceAsync( - signedOrder.makerAddress, - this.zrxAssetData, - tooLowAllowance, - ); - break; - - case AllowanceAmountScenario.Exact: - const exactAllowance = makerFee; - await this.assetWrapper.setProxyAllowanceAsync( - signedOrder.makerAddress, - this.zrxAssetData, - exactAllowance, - ); - break; - - case AllowanceAmountScenario.Unlimited: - await this.assetWrapper.setProxyAllowanceAsync( - signedOrder.makerAddress, - this.zrxAssetData, - constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, - ); - break; - - default: - throw errorUtils.spawnSwitchErr( - 'makerStateScenario.zrxFeeAllowance', - makerStateScenario.zrxFeeAllowance, - ); - } - - switch (takerStateScenario.traderAssetBalance) { - case BalanceAmountScenario.Higher: - break; // Noop since this is already the default - - case BalanceAmountScenario.TooLow: - if (takerAssetFillAmount.eq(0)) { - throw new Error(`Cannot set takerAssetBalanceOfTaker TooLow if takerAssetFillAmount is 0`); - } - const tooLowBalance = takerAssetFillAmount.minus(1); - await this.assetWrapper.setBalanceAsync(this.takerAddress, signedOrder.takerAssetData, tooLowBalance); - break; - - case BalanceAmountScenario.Exact: - const exactBalance = takerAssetFillAmount; - await this.assetWrapper.setBalanceAsync(this.takerAddress, signedOrder.takerAssetData, exactBalance); - break; - - default: - throw errorUtils.spawnSwitchErr( - 'takerStateScenario.traderAssetBalance', - takerStateScenario.traderAssetBalance, - ); - } - - const takerFee = orderUtils.getPartialAmount( - takerAssetFillAmount, - signedOrder.takerAssetAmount, - signedOrder.takerFee, - ); - switch (takerStateScenario.zrxFeeBalance) { - case BalanceAmountScenario.Higher: - break; // Noop since this is already the default - - case BalanceAmountScenario.TooLow: - if (takerFee.eq(0)) { - throw new Error(`Cannot set zrxAssetBalanceOfTaker TooLow if takerFee is 0`); - } - const tooLowBalance = takerFee.minus(1); - await this.assetWrapper.setBalanceAsync(this.takerAddress, this.zrxAssetData, tooLowBalance); - break; - - case BalanceAmountScenario.Exact: - const exactBalance = takerFee; - await this.assetWrapper.setBalanceAsync(this.takerAddress, this.zrxAssetData, exactBalance); - break; - - default: - throw errorUtils.spawnSwitchErr('takerStateScenario.zrxFeeBalance', takerStateScenario.zrxFeeBalance); - } - - switch (takerStateScenario.traderAssetAllowance) { - case AllowanceAmountScenario.Higher: - break; // Noop since this is already the default - - case AllowanceAmountScenario.TooLow: - const tooLowAllowance = takerAssetFillAmount.minus(1); - await this.assetWrapper.setProxyAllowanceAsync( - this.takerAddress, - signedOrder.takerAssetData, - tooLowAllowance, - ); - break; - - case AllowanceAmountScenario.Exact: - const exactAllowance = takerAssetFillAmount; - await this.assetWrapper.setProxyAllowanceAsync( - this.takerAddress, - signedOrder.takerAssetData, - exactAllowance, - ); - break; - - case AllowanceAmountScenario.Unlimited: - await this.assetWrapper.setProxyAllowanceAsync( - this.takerAddress, - signedOrder.takerAssetData, - constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, - ); - break; - - default: - throw errorUtils.spawnSwitchErr( - 'takerStateScenario.traderAssetAllowance', - takerStateScenario.traderAssetAllowance, - ); - } - - switch (takerStateScenario.zrxFeeAllowance) { - case AllowanceAmountScenario.Higher: - break; // Noop since this is already the default - - case AllowanceAmountScenario.TooLow: - const tooLowAllowance = takerFee.minus(1); - await this.assetWrapper.setProxyAllowanceAsync(this.takerAddress, this.zrxAssetData, tooLowAllowance); - break; - - case AllowanceAmountScenario.Exact: - const exactAllowance = takerFee; - await this.assetWrapper.setProxyAllowanceAsync(this.takerAddress, this.zrxAssetData, exactAllowance); - break; - - case AllowanceAmountScenario.Unlimited: - await this.assetWrapper.setProxyAllowanceAsync( - this.takerAddress, - this.zrxAssetData, - constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, - ); - break; - - default: - throw errorUtils.spawnSwitchErr( - 'takerStateScenario.zrxFeeAllowance', - takerStateScenario.zrxFeeAllowance, - ); - } - } -} // tslint:disable:max-file-line-count diff --git a/packages/contracts/test/utils/fill_order_combinatorial_utils.ts b/packages/contracts/test/utils/fill_order_combinatorial_utils.ts new file mode 100644 index 000000000..bdd1e62a2 --- /dev/null +++ b/packages/contracts/test/utils/fill_order_combinatorial_utils.ts @@ -0,0 +1,878 @@ +import { + assetDataUtils, + BalanceAndProxyAllowanceLazyStore, + ExchangeTransferSimulator, + orderHashUtils, + OrderStateUtils, + OrderValidationUtils, +} from '@0xproject/order-utils'; +import { AssetProxyId, RevertReason, SignatureType, SignedOrder } from '@0xproject/types'; +import { BigNumber, errorUtils, logUtils } from '@0xproject/utils'; +import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import * as chai from 'chai'; +import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types'; +import * as _ from 'lodash'; +import 'make-promises-safe'; + +import { ExchangeContract, ExchangeFillEventArgs } from '../../generated_contract_wrappers/exchange'; + +import { artifacts } from './artifacts'; +import { expectTransactionFailedAsync } from './assertions'; +import { AssetWrapper } from './asset_wrapper'; +import { chaiSetup } from './chai_setup'; +import { constants } from './constants'; +import { ERC20Wrapper } from './erc20_wrapper'; +import { ERC721Wrapper } from './erc721_wrapper'; +import { ExchangeWrapper } from './exchange_wrapper'; +import { OrderFactoryFromScenario } from './order_factory_from_scenario'; +import { orderUtils } from './order_utils'; +import { signingUtils } from './signing_utils'; +import { SimpleAssetBalanceAndProxyAllowanceFetcher } from './simple_asset_balance_and_proxy_allowance_fetcher'; +import { SimpleOrderFilledCancelledFetcher } from './simple_order_filled_cancelled_fetcher'; +import { + AllowanceAmountScenario, + AssetDataScenario, + BalanceAmountScenario, + ExpirationTimeSecondsScenario, + FeeRecipientAddressScenario, + FillScenario, + OrderAssetAmountScenario, + TakerAssetFillAmountScenario, + TakerScenario, + TraderStateScenario, +} from './types'; + +chaiSetup.configure(); +const expect = chai.expect; + +/** + * Instantiates a new instance of FillOrderCombinatorialUtils. Since this method has some + * required async setup, a factory method is required. + * @param web3Wrapper Web3Wrapper instance + * @param txDefaults Default Ethereum tx options + * @return FillOrderCombinatorialUtils instance + */ +export async function fillOrderCombinatorialUtilsFactoryAsync( + web3Wrapper: Web3Wrapper, + txDefaults: Partial, +): Promise { + const accounts = await web3Wrapper.getAvailableAddressesAsync(); + const userAddresses = _.slice(accounts, 0, 5); + const [ownerAddress, makerAddress, takerAddress] = userAddresses; + const makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[userAddresses.indexOf(makerAddress)]; + + const provider = web3Wrapper.getProvider(); + const erc20Wrapper = new ERC20Wrapper(provider, userAddresses, ownerAddress); + const erc721Wrapper = new ERC721Wrapper(provider, userAddresses, ownerAddress); + + const erc20EighteenDecimalTokenCount = 3; + const eighteenDecimals = new BigNumber(18); + const [ + erc20EighteenDecimalTokenA, + erc20EighteenDecimalTokenB, + zrxToken, + ] = await erc20Wrapper.deployDummyTokensAsync(erc20EighteenDecimalTokenCount, eighteenDecimals); + const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address); + + const erc20FiveDecimalTokenCount = 2; + const fiveDecimals = new BigNumber(5); + const [erc20FiveDecimalTokenA, erc20FiveDecimalTokenB] = await erc20Wrapper.deployDummyTokensAsync( + erc20FiveDecimalTokenCount, + fiveDecimals, + ); + const erc20Proxy = await erc20Wrapper.deployProxyAsync(); + await erc20Wrapper.setBalancesAndAllowancesAsync(); + + const [erc721Token] = await erc721Wrapper.deployDummyTokensAsync(); + const erc721Proxy = await erc721Wrapper.deployProxyAsync(); + await erc721Wrapper.setBalancesAndAllowancesAsync(); + const erc721Balances = await erc721Wrapper.getBalancesAsync(); + + const assetWrapper = new AssetWrapper([erc20Wrapper, erc721Wrapper]); + + const exchangeContract = await ExchangeContract.deployFrom0xArtifactAsync( + artifacts.Exchange, + provider, + txDefaults, + zrxAssetData, + ); + const exchangeWrapper = new ExchangeWrapper(exchangeContract, provider); + await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, ownerAddress); + await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, ownerAddress); + + await web3Wrapper.awaitTransactionSuccessAsync( + await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeContract.address, { + from: ownerAddress, + }), + constants.AWAIT_TRANSACTION_MINED_MS, + ); + await web3Wrapper.awaitTransactionSuccessAsync( + await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeContract.address, { + from: ownerAddress, + }), + constants.AWAIT_TRANSACTION_MINED_MS, + ); + + const orderFactory = new OrderFactoryFromScenario( + userAddresses, + zrxToken.address, + [erc20EighteenDecimalTokenA.address, erc20EighteenDecimalTokenB.address], + [erc20FiveDecimalTokenA.address, erc20FiveDecimalTokenB.address], + erc721Token, + erc721Balances, + exchangeContract.address, + ); + + const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils( + orderFactory, + ownerAddress, + makerAddress, + makerPrivateKey, + takerAddress, + zrxAssetData, + exchangeWrapper, + assetWrapper, + ); + return fillOrderCombinatorialUtils; +} + +export class FillOrderCombinatorialUtils { + public orderFactory: OrderFactoryFromScenario; + public ownerAddress: string; + public makerAddress: string; + public makerPrivateKey: Buffer; + public takerAddress: string; + public zrxAssetData: string; + public exchangeWrapper: ExchangeWrapper; + public assetWrapper: AssetWrapper; + public static generateFillOrderCombinations(): FillScenario[] { + const takerScenarios = [ + TakerScenario.Unspecified, + // TakerScenario.CorrectlySpecified, + // TakerScenario.IncorrectlySpecified, + ]; + const feeRecipientScenarios = [ + FeeRecipientAddressScenario.EthUserAddress, + // FeeRecipientAddressScenario.BurnAddress, + ]; + const makerAssetAmountScenario = [ + OrderAssetAmountScenario.Large, + // OrderAssetAmountScenario.Zero, + // OrderAssetAmountScenario.Small, + ]; + const takerAssetAmountScenario = [ + OrderAssetAmountScenario.Large, + // OrderAssetAmountScenario.Zero, + // OrderAssetAmountScenario.Small, + ]; + const makerFeeScenario = [ + OrderAssetAmountScenario.Large, + // OrderAssetAmountScenario.Small, + // OrderAssetAmountScenario.Zero, + ]; + const takerFeeScenario = [ + OrderAssetAmountScenario.Large, + // OrderAssetAmountScenario.Small, + // OrderAssetAmountScenario.Zero, + ]; + const expirationTimeSecondsScenario = [ + ExpirationTimeSecondsScenario.InFuture, + ExpirationTimeSecondsScenario.InPast, + ]; + const makerAssetDataScenario = [ + AssetDataScenario.ERC20FiveDecimals, + AssetDataScenario.ERC20NonZRXEighteenDecimals, + AssetDataScenario.ERC721, + AssetDataScenario.ZRXFeeToken, + ]; + const takerAssetDataScenario = [ + AssetDataScenario.ERC20FiveDecimals, + AssetDataScenario.ERC20NonZRXEighteenDecimals, + AssetDataScenario.ERC721, + AssetDataScenario.ZRXFeeToken, + ]; + const takerAssetFillAmountScenario = [ + TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount, + // TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount, + // TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount, + ]; + const makerAssetBalanceScenario = [ + BalanceAmountScenario.Higher, + // BalanceAmountScenario.Exact, + // BalanceAmountScenario.TooLow, + ]; + const makerAssetAllowanceScenario = [ + AllowanceAmountScenario.Higher, + // AllowanceAmountScenario.Exact, + // AllowanceAmountScenario.TooLow, + // AllowanceAmountScenario.Unlimited, + ]; + const makerZRXBalanceScenario = [ + BalanceAmountScenario.Higher, + // BalanceAmountScenario.Exact, + // BalanceAmountScenario.TooLow, + ]; + const makerZRXAllowanceScenario = [ + AllowanceAmountScenario.Higher, + // AllowanceAmountScenario.Exact, + // AllowanceAmountScenario.TooLow, + // AllowanceAmountScenario.Unlimited, + ]; + const takerAssetBalanceScenario = [ + BalanceAmountScenario.Higher, + // BalanceAmountScenario.Exact, + // BalanceAmountScenario.TooLow, + ]; + const takerAssetAllowanceScenario = [ + AllowanceAmountScenario.Higher, + // AllowanceAmountScenario.Exact, + // AllowanceAmountScenario.TooLow, + // AllowanceAmountScenario.Unlimited, + ]; + const takerZRXBalanceScenario = [ + BalanceAmountScenario.Higher, + // BalanceAmountScenario.Exact, + // BalanceAmountScenario.TooLow, + ]; + const takerZRXAllowanceScenario = [ + AllowanceAmountScenario.Higher, + // AllowanceAmountScenario.Exact, + // AllowanceAmountScenario.TooLow, + // AllowanceAmountScenario.Unlimited, + ]; + const fillScenarioArrays = FillOrderCombinatorialUtils._getAllCombinations([ + takerScenarios, + feeRecipientScenarios, + makerAssetAmountScenario, + takerAssetAmountScenario, + makerFeeScenario, + takerFeeScenario, + expirationTimeSecondsScenario, + makerAssetDataScenario, + takerAssetDataScenario, + takerAssetFillAmountScenario, + makerAssetBalanceScenario, + makerAssetAllowanceScenario, + makerZRXBalanceScenario, + makerZRXAllowanceScenario, + takerAssetBalanceScenario, + takerAssetAllowanceScenario, + takerZRXBalanceScenario, + takerZRXAllowanceScenario, + ]); + + const fillScenarios = _.map(fillScenarioArrays, fillScenarioArray => { + // tslint:disable:custom-no-magic-numbers + const fillScenario: FillScenario = { + orderScenario: { + takerScenario: fillScenarioArray[0] as TakerScenario, + feeRecipientScenario: fillScenarioArray[1] as FeeRecipientAddressScenario, + makerAssetAmountScenario: fillScenarioArray[2] as OrderAssetAmountScenario, + takerAssetAmountScenario: fillScenarioArray[3] as OrderAssetAmountScenario, + makerFeeScenario: fillScenarioArray[4] as OrderAssetAmountScenario, + takerFeeScenario: fillScenarioArray[5] as OrderAssetAmountScenario, + expirationTimeSecondsScenario: fillScenarioArray[6] as ExpirationTimeSecondsScenario, + makerAssetDataScenario: fillScenarioArray[7] as AssetDataScenario, + takerAssetDataScenario: fillScenarioArray[8] as AssetDataScenario, + }, + takerAssetFillAmountScenario: fillScenarioArray[9] as TakerAssetFillAmountScenario, + makerStateScenario: { + traderAssetBalance: fillScenarioArray[10] as BalanceAmountScenario, + traderAssetAllowance: fillScenarioArray[11] as AllowanceAmountScenario, + zrxFeeBalance: fillScenarioArray[12] as BalanceAmountScenario, + zrxFeeAllowance: fillScenarioArray[13] as AllowanceAmountScenario, + }, + takerStateScenario: { + traderAssetBalance: fillScenarioArray[14] as BalanceAmountScenario, + traderAssetAllowance: fillScenarioArray[15] as AllowanceAmountScenario, + zrxFeeBalance: fillScenarioArray[16] as BalanceAmountScenario, + zrxFeeAllowance: fillScenarioArray[17] as AllowanceAmountScenario, + }, + }; + // tslint:enable:custom-no-magic-numbers + return fillScenario; + }); + + return fillScenarios; + } + /** + * Recursive implementation of generating all combinations of the supplied + * string-containing arrays. + */ + private static _getAllCombinations(arrays: string[][]): string[][] { + // Base case + if (arrays.length === 1) { + const remainingValues = _.map(arrays[0], val => { + return [val]; + }); + return remainingValues; + } else { + const result = []; + const restOfArrays = arrays.slice(1); + const allCombinationsOfRemaining = FillOrderCombinatorialUtils._getAllCombinations(restOfArrays); // recur with the rest of array + // tslint:disable:prefer-for-of + for (let i = 0; i < allCombinationsOfRemaining.length; i++) { + for (let j = 0; j < arrays[0].length; j++) { + result.push([arrays[0][j], ...allCombinationsOfRemaining[i]]); + } + } + // tslint:enable:prefer-for-of + return result; + } + } + constructor( + orderFactory: OrderFactoryFromScenario, + ownerAddress: string, + makerAddress: string, + makerPrivateKey: Buffer, + takerAddress: string, + zrxAssetData: string, + exchangeWrapper: ExchangeWrapper, + assetWrapper: AssetWrapper, + ) { + this.orderFactory = orderFactory; + this.ownerAddress = ownerAddress; + this.makerAddress = makerAddress; + this.makerPrivateKey = makerPrivateKey; + this.takerAddress = takerAddress; + this.zrxAssetData = zrxAssetData; + this.exchangeWrapper = exchangeWrapper; + this.assetWrapper = assetWrapper; + } + public async testFillOrderScenarioAsync( + provider: Provider, + fillScenario: FillScenario, + isVerbose: boolean = false, + ): Promise { + // 1. Generate order + const order = this.orderFactory.generateOrder(fillScenario.orderScenario); + + // 2. Sign order + const orderHashBuff = orderHashUtils.getOrderHashBuffer(order); + const signature = signingUtils.signMessage(orderHashBuff, this.makerPrivateKey, SignatureType.EthSign); + const signedOrder = { + ...order, + signature: `0x${signature.toString('hex')}`, + }; + + const balanceAndProxyAllowanceFetcher = new SimpleAssetBalanceAndProxyAllowanceFetcher(this.assetWrapper); + const orderFilledCancelledFetcher = new SimpleOrderFilledCancelledFetcher( + this.exchangeWrapper, + this.zrxAssetData, + ); + + // 3. Figure out fill amount + const takerAssetFillAmount = await this._getTakerAssetFillAmountAsync( + signedOrder, + fillScenario.takerAssetFillAmountScenario, + balanceAndProxyAllowanceFetcher, + orderFilledCancelledFetcher, + ); + + // 4. Permutate the maker and taker balance/allowance scenarios + await this._modifyTraderStateAsync( + fillScenario.makerStateScenario, + fillScenario.takerStateScenario, + signedOrder, + takerAssetFillAmount, + ); + + // 5. If I fill it by X, what are the resulting balances/allowances/filled amounts expected? + const orderValidationUtils = new OrderValidationUtils(orderFilledCancelledFetcher); + const lazyStore = new BalanceAndProxyAllowanceLazyStore(balanceAndProxyAllowanceFetcher); + const exchangeTransferSimulator = new ExchangeTransferSimulator(lazyStore); + + let fillRevertReasonIfExists; + try { + await orderValidationUtils.validateFillOrderThrowIfInvalidAsync( + exchangeTransferSimulator, + provider, + signedOrder, + takerAssetFillAmount, + this.takerAddress, + this.zrxAssetData, + ); + if (isVerbose) { + logUtils.log(`Expecting fillOrder to succeed.`); + } + } catch (err) { + fillRevertReasonIfExists = err.message; + if (isVerbose) { + logUtils.log(`Expecting fillOrder to fail with:`); + logUtils.log(err); + } + } + + // 6. Fill the order + await this._fillOrderAndAssertOutcomeAsync( + signedOrder, + takerAssetFillAmount, + lazyStore, + fillRevertReasonIfExists, + ); + } + private async _fillOrderAndAssertOutcomeAsync( + signedOrder: SignedOrder, + takerAssetFillAmount: BigNumber, + lazyStore: BalanceAndProxyAllowanceLazyStore, + fillRevertReasonIfExists: RevertReason | undefined, + ): Promise { + if (!_.isUndefined(fillRevertReasonIfExists)) { + return expectTransactionFailedAsync( + this.exchangeWrapper.fillOrderAsync(signedOrder, this.takerAddress, { takerAssetFillAmount }), + fillRevertReasonIfExists, + ); + } + + const makerAddress = signedOrder.makerAddress; + const makerAssetData = signedOrder.makerAssetData; + const takerAssetData = signedOrder.takerAssetData; + const feeRecipient = signedOrder.feeRecipientAddress; + + const expMakerAssetBalanceOfMaker = await lazyStore.getBalanceAsync(makerAssetData, makerAddress); + const expMakerAssetAllowanceOfMaker = await lazyStore.getProxyAllowanceAsync(makerAssetData, makerAddress); + const expTakerAssetBalanceOfMaker = await lazyStore.getBalanceAsync(takerAssetData, makerAddress); + const expZRXAssetBalanceOfMaker = await lazyStore.getBalanceAsync(this.zrxAssetData, makerAddress); + const expZRXAssetAllowanceOfMaker = await lazyStore.getProxyAllowanceAsync(this.zrxAssetData, makerAddress); + const expTakerAssetBalanceOfTaker = await lazyStore.getBalanceAsync(takerAssetData, this.takerAddress); + const expTakerAssetAllowanceOfTaker = await lazyStore.getProxyAllowanceAsync(takerAssetData, this.takerAddress); + const expMakerAssetBalanceOfTaker = await lazyStore.getBalanceAsync(makerAssetData, this.takerAddress); + const expZRXAssetBalanceOfTaker = await lazyStore.getBalanceAsync(this.zrxAssetData, this.takerAddress); + const expZRXAssetAllowanceOfTaker = await lazyStore.getProxyAllowanceAsync( + this.zrxAssetData, + this.takerAddress, + ); + const expZRXAssetBalanceOfFeeRecipient = await lazyStore.getBalanceAsync(this.zrxAssetData, feeRecipient); + + const orderHash = orderHashUtils.getOrderHashHex(signedOrder); + const alreadyFilledTakerAmount = await this.exchangeWrapper.getTakerAssetFilledAmountAsync(orderHash); + const remainingTakerAmountToFill = signedOrder.takerAssetAmount.minus(alreadyFilledTakerAmount); + const expFilledTakerAmount = takerAssetFillAmount.gt(remainingTakerAmountToFill) + ? remainingTakerAmountToFill + : alreadyFilledTakerAmount.add(takerAssetFillAmount); + + const expFilledMakerAmount = orderUtils.getPartialAmount( + expFilledTakerAmount, + signedOrder.takerAssetAmount, + signedOrder.makerAssetAmount, + ); + + // - Let's fill the order! + const txReceipt = await this.exchangeWrapper.fillOrderAsync(signedOrder, this.takerAddress, { + takerAssetFillAmount, + }); + + const actFilledTakerAmount = await this.exchangeWrapper.getTakerAssetFilledAmountAsync(orderHash); + expect(actFilledTakerAmount).to.be.bignumber.equal(expFilledTakerAmount, 'filledTakerAmount'); + + expect(txReceipt.logs.length).to.be.equal(1, 'logs length'); + // tslint:disable-next-line:no-unnecessary-type-assertion + const log = txReceipt.logs[0] as LogWithDecodedArgs; + expect(log.args.makerAddress).to.be.equal(makerAddress, 'log.args.makerAddress'); + expect(log.args.takerAddress).to.be.equal(this.takerAddress, 'log.args.this.takerAddress'); + expect(log.args.feeRecipientAddress).to.be.equal(feeRecipient, 'log.args.feeRecipientAddress'); + expect(log.args.makerAssetFilledAmount).to.be.bignumber.equal( + expFilledMakerAmount, + 'log.args.makerAssetFilledAmount', + ); + expect(log.args.takerAssetFilledAmount).to.be.bignumber.equal( + expFilledTakerAmount, + 'log.args.takerAssetFilledAmount', + ); + const expMakerFeePaid = orderUtils.getPartialAmount( + expFilledTakerAmount, + signedOrder.takerAssetAmount, + signedOrder.makerFee, + ); + expect(log.args.makerFeePaid).to.be.bignumber.equal(expMakerFeePaid, 'log.args.makerFeePaid'); + const expTakerFeePaid = orderUtils.getPartialAmount( + expFilledTakerAmount, + signedOrder.takerAssetAmount, + signedOrder.takerFee, + ); + expect(log.args.takerFeePaid).to.be.bignumber.equal(expTakerFeePaid, 'logs.args.takerFeePaid'); + expect(log.args.orderHash).to.be.equal(orderHash, 'log.args.orderHash'); + expect(log.args.makerAssetData).to.be.equal(makerAssetData, 'log.args.makerAssetData'); + expect(log.args.takerAssetData).to.be.equal(takerAssetData, 'log.args.takerAssetData'); + + const actMakerAssetBalanceOfMaker = await this.assetWrapper.getBalanceAsync(makerAddress, makerAssetData); + expect(actMakerAssetBalanceOfMaker).to.be.bignumber.equal( + expMakerAssetBalanceOfMaker, + 'makerAssetBalanceOfMaker', + ); + + const actMakerAssetAllowanceOfMaker = await this.assetWrapper.getProxyAllowanceAsync( + makerAddress, + makerAssetData, + ); + expect(actMakerAssetAllowanceOfMaker).to.be.bignumber.equal( + expMakerAssetAllowanceOfMaker, + 'makerAssetAllowanceOfMaker', + ); + + const actTakerAssetBalanceOfMaker = await this.assetWrapper.getBalanceAsync(makerAddress, takerAssetData); + expect(actTakerAssetBalanceOfMaker).to.be.bignumber.equal( + expTakerAssetBalanceOfMaker, + 'takerAssetBalanceOfMaker', + ); + + const actZRXAssetBalanceOfMaker = await this.assetWrapper.getBalanceAsync(makerAddress, this.zrxAssetData); + expect(actZRXAssetBalanceOfMaker).to.be.bignumber.equal(expZRXAssetBalanceOfMaker, 'ZRXAssetBalanceOfMaker'); + + const actZRXAssetAllowanceOfMaker = await this.assetWrapper.getProxyAllowanceAsync( + makerAddress, + this.zrxAssetData, + ); + expect(actZRXAssetAllowanceOfMaker).to.be.bignumber.equal( + expZRXAssetAllowanceOfMaker, + 'ZRXAssetAllowanceOfMaker', + ); + + const actTakerAssetBalanceOfTaker = await this.assetWrapper.getBalanceAsync(this.takerAddress, takerAssetData); + expect(actTakerAssetBalanceOfTaker).to.be.bignumber.equal( + expTakerAssetBalanceOfTaker, + 'TakerAssetBalanceOfTaker', + ); + + const actTakerAssetAllowanceOfTaker = await this.assetWrapper.getProxyAllowanceAsync( + this.takerAddress, + takerAssetData, + ); + + expect(actTakerAssetAllowanceOfTaker).to.be.bignumber.equal( + expTakerAssetAllowanceOfTaker, + 'TakerAssetAllowanceOfTaker', + ); + + const actMakerAssetBalanceOfTaker = await this.assetWrapper.getBalanceAsync(this.takerAddress, makerAssetData); + expect(actMakerAssetBalanceOfTaker).to.be.bignumber.equal( + expMakerAssetBalanceOfTaker, + 'MakerAssetBalanceOfTaker', + ); + + const actZRXAssetBalanceOfTaker = await this.assetWrapper.getBalanceAsync(this.takerAddress, this.zrxAssetData); + expect(actZRXAssetBalanceOfTaker).to.be.bignumber.equal(expZRXAssetBalanceOfTaker, 'ZRXAssetBalanceOfTaker'); + + const actZRXAssetAllowanceOfTaker = await this.assetWrapper.getProxyAllowanceAsync( + this.takerAddress, + this.zrxAssetData, + ); + expect(actZRXAssetAllowanceOfTaker).to.be.bignumber.equal( + expZRXAssetAllowanceOfTaker, + 'ZRXAssetAllowanceOfTaker', + ); + + const actZRXAssetBalanceOfFeeRecipient = await this.assetWrapper.getBalanceAsync( + feeRecipient, + this.zrxAssetData, + ); + expect(actZRXAssetBalanceOfFeeRecipient).to.be.bignumber.equal( + expZRXAssetBalanceOfFeeRecipient, + 'ZRXAssetBalanceOfFeeRecipient', + ); + } + private async _getTakerAssetFillAmountAsync( + signedOrder: SignedOrder, + takerAssetFillAmountScenario: TakerAssetFillAmountScenario, + balanceAndProxyAllowanceFetcher: SimpleAssetBalanceAndProxyAllowanceFetcher, + orderFilledCancelledFetcher: SimpleOrderFilledCancelledFetcher, + ): Promise { + const orderStateUtils = new OrderStateUtils(balanceAndProxyAllowanceFetcher, orderFilledCancelledFetcher); + const fillableTakerAssetAmount = await orderStateUtils.getMaxFillableTakerAssetAmountAsync( + signedOrder, + this.takerAddress, + ); + + let takerAssetFillAmount; + switch (takerAssetFillAmountScenario) { + case TakerAssetFillAmountScenario.Zero: + takerAssetFillAmount = new BigNumber(0); + break; + + case TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount: + takerAssetFillAmount = fillableTakerAssetAmount; + break; + + case TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount: + takerAssetFillAmount = fillableTakerAssetAmount.add(1); + break; + + case TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount: + const takerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.takerAssetData); + const makerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.makerAssetData); + const isEitherAssetERC721 = + takerAssetProxyId === AssetProxyId.ERC721 || makerAssetProxyId === AssetProxyId.ERC721; + if (isEitherAssetERC721) { + throw new Error( + 'Cannot test `TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount` together with ERC721 assets since orders involving ERC721 must always be filled exactly.', + ); + } + takerAssetFillAmount = fillableTakerAssetAmount.div(2).floor(); + break; + + default: + throw errorUtils.spawnSwitchErr('TakerAssetFillAmountScenario', takerAssetFillAmountScenario); + } + + return takerAssetFillAmount; + } + private async _modifyTraderStateAsync( + makerStateScenario: TraderStateScenario, + takerStateScenario: TraderStateScenario, + signedOrder: SignedOrder, + takerAssetFillAmount: BigNumber, + ): Promise { + const makerAssetFillAmount = orderUtils.getPartialAmount( + takerAssetFillAmount, + signedOrder.takerAssetAmount, + signedOrder.makerAssetAmount, + ); + switch (makerStateScenario.traderAssetBalance) { + case BalanceAmountScenario.Higher: + break; // Noop since this is already the default + + case BalanceAmountScenario.TooLow: + if (makerAssetFillAmount.eq(0)) { + throw new Error(`Cannot set makerAssetBalanceOfMaker TooLow if makerAssetFillAmount is 0`); + } + const tooLowBalance = makerAssetFillAmount.minus(1); + await this.assetWrapper.setBalanceAsync( + signedOrder.makerAddress, + signedOrder.makerAssetData, + tooLowBalance, + ); + break; + + case BalanceAmountScenario.Exact: + const exactBalance = makerAssetFillAmount; + await this.assetWrapper.setBalanceAsync( + signedOrder.makerAddress, + signedOrder.makerAssetData, + exactBalance, + ); + break; + + default: + throw errorUtils.spawnSwitchErr( + 'makerStateScenario.traderAssetBalance', + makerStateScenario.traderAssetBalance, + ); + } + + const makerFee = orderUtils.getPartialAmount( + takerAssetFillAmount, + signedOrder.takerAssetAmount, + signedOrder.makerFee, + ); + switch (makerStateScenario.zrxFeeBalance) { + case BalanceAmountScenario.Higher: + break; // Noop since this is already the default + + case BalanceAmountScenario.TooLow: + if (makerFee.eq(0)) { + throw new Error(`Cannot set zrxAsserBalanceOfMaker TooLow if makerFee is 0`); + } + const tooLowBalance = makerFee.minus(1); + await this.assetWrapper.setBalanceAsync(signedOrder.makerAddress, this.zrxAssetData, tooLowBalance); + break; + + case BalanceAmountScenario.Exact: + const exactBalance = makerFee; + await this.assetWrapper.setBalanceAsync(signedOrder.makerAddress, this.zrxAssetData, exactBalance); + break; + + default: + throw errorUtils.spawnSwitchErr('makerStateScenario.zrxFeeBalance', makerStateScenario.zrxFeeBalance); + } + + switch (makerStateScenario.traderAssetAllowance) { + case AllowanceAmountScenario.Higher: + break; // Noop since this is already the default + + case AllowanceAmountScenario.TooLow: + const tooLowAllowance = makerAssetFillAmount.minus(1); + await this.assetWrapper.setProxyAllowanceAsync( + signedOrder.makerAddress, + signedOrder.makerAssetData, + tooLowAllowance, + ); + break; + + case AllowanceAmountScenario.Exact: + const exactAllowance = makerAssetFillAmount; + await this.assetWrapper.setProxyAllowanceAsync( + signedOrder.makerAddress, + signedOrder.makerAssetData, + exactAllowance, + ); + break; + + case AllowanceAmountScenario.Unlimited: + await this.assetWrapper.setProxyAllowanceAsync( + signedOrder.makerAddress, + signedOrder.makerAssetData, + constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, + ); + break; + + default: + throw errorUtils.spawnSwitchErr( + 'makerStateScenario.traderAssetAllowance', + makerStateScenario.traderAssetAllowance, + ); + } + + switch (makerStateScenario.zrxFeeAllowance) { + case AllowanceAmountScenario.Higher: + break; // Noop since this is already the default + + case AllowanceAmountScenario.TooLow: + const tooLowAllowance = makerFee.minus(1); + await this.assetWrapper.setProxyAllowanceAsync( + signedOrder.makerAddress, + this.zrxAssetData, + tooLowAllowance, + ); + break; + + case AllowanceAmountScenario.Exact: + const exactAllowance = makerFee; + await this.assetWrapper.setProxyAllowanceAsync( + signedOrder.makerAddress, + this.zrxAssetData, + exactAllowance, + ); + break; + + case AllowanceAmountScenario.Unlimited: + await this.assetWrapper.setProxyAllowanceAsync( + signedOrder.makerAddress, + this.zrxAssetData, + constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, + ); + break; + + default: + throw errorUtils.spawnSwitchErr( + 'makerStateScenario.zrxFeeAllowance', + makerStateScenario.zrxFeeAllowance, + ); + } + + switch (takerStateScenario.traderAssetBalance) { + case BalanceAmountScenario.Higher: + break; // Noop since this is already the default + + case BalanceAmountScenario.TooLow: + if (takerAssetFillAmount.eq(0)) { + throw new Error(`Cannot set takerAssetBalanceOfTaker TooLow if takerAssetFillAmount is 0`); + } + const tooLowBalance = takerAssetFillAmount.minus(1); + await this.assetWrapper.setBalanceAsync(this.takerAddress, signedOrder.takerAssetData, tooLowBalance); + break; + + case BalanceAmountScenario.Exact: + const exactBalance = takerAssetFillAmount; + await this.assetWrapper.setBalanceAsync(this.takerAddress, signedOrder.takerAssetData, exactBalance); + break; + + default: + throw errorUtils.spawnSwitchErr( + 'takerStateScenario.traderAssetBalance', + takerStateScenario.traderAssetBalance, + ); + } + + const takerFee = orderUtils.getPartialAmount( + takerAssetFillAmount, + signedOrder.takerAssetAmount, + signedOrder.takerFee, + ); + switch (takerStateScenario.zrxFeeBalance) { + case BalanceAmountScenario.Higher: + break; // Noop since this is already the default + + case BalanceAmountScenario.TooLow: + if (takerFee.eq(0)) { + throw new Error(`Cannot set zrxAssetBalanceOfTaker TooLow if takerFee is 0`); + } + const tooLowBalance = takerFee.minus(1); + await this.assetWrapper.setBalanceAsync(this.takerAddress, this.zrxAssetData, tooLowBalance); + break; + + case BalanceAmountScenario.Exact: + const exactBalance = takerFee; + await this.assetWrapper.setBalanceAsync(this.takerAddress, this.zrxAssetData, exactBalance); + break; + + default: + throw errorUtils.spawnSwitchErr('takerStateScenario.zrxFeeBalance', takerStateScenario.zrxFeeBalance); + } + + switch (takerStateScenario.traderAssetAllowance) { + case AllowanceAmountScenario.Higher: + break; // Noop since this is already the default + + case AllowanceAmountScenario.TooLow: + const tooLowAllowance = takerAssetFillAmount.minus(1); + await this.assetWrapper.setProxyAllowanceAsync( + this.takerAddress, + signedOrder.takerAssetData, + tooLowAllowance, + ); + break; + + case AllowanceAmountScenario.Exact: + const exactAllowance = takerAssetFillAmount; + await this.assetWrapper.setProxyAllowanceAsync( + this.takerAddress, + signedOrder.takerAssetData, + exactAllowance, + ); + break; + + case AllowanceAmountScenario.Unlimited: + await this.assetWrapper.setProxyAllowanceAsync( + this.takerAddress, + signedOrder.takerAssetData, + constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, + ); + break; + + default: + throw errorUtils.spawnSwitchErr( + 'takerStateScenario.traderAssetAllowance', + takerStateScenario.traderAssetAllowance, + ); + } + + switch (takerStateScenario.zrxFeeAllowance) { + case AllowanceAmountScenario.Higher: + break; // Noop since this is already the default + + case AllowanceAmountScenario.TooLow: + const tooLowAllowance = takerFee.minus(1); + await this.assetWrapper.setProxyAllowanceAsync(this.takerAddress, this.zrxAssetData, tooLowAllowance); + break; + + case AllowanceAmountScenario.Exact: + const exactAllowance = takerFee; + await this.assetWrapper.setProxyAllowanceAsync(this.takerAddress, this.zrxAssetData, exactAllowance); + break; + + case AllowanceAmountScenario.Unlimited: + await this.assetWrapper.setProxyAllowanceAsync( + this.takerAddress, + this.zrxAssetData, + constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS, + ); + break; + + default: + throw errorUtils.spawnSwitchErr( + 'takerStateScenario.zrxFeeAllowance', + takerStateScenario.zrxFeeAllowance, + ); + } + } +} // tslint:disable:max-file-line-count diff --git a/packages/contracts/test/utils/test_with_reference.ts b/packages/contracts/test/utils/test_with_reference.ts new file mode 100644 index 000000000..599b1eed4 --- /dev/null +++ b/packages/contracts/test/utils/test_with_reference.ts @@ -0,0 +1,119 @@ +import * as chai from 'chai'; +import * as _ from 'lodash'; + +import { chaiSetup } from './chai_setup'; + +chaiSetup.configure(); +const expect = chai.expect; + +export async function testWithReferenceFuncAsync( + referenceFunc: (p0: P0) => Promise, + testFunc: (p0: P0) => Promise, + values: [P0], +): Promise; +export async function testWithReferenceFuncAsync( + referenceFunc: (p0: P0, p1: P1) => Promise, + testFunc: (p0: P0, p1: P1) => Promise, + values: [P0, P1], +): Promise; +export async function testWithReferenceFuncAsync( + referenceFunc: (p0: P0, p1: P1, p2: P2) => Promise, + testFunc: (p0: P0, p1: P1, p2: P2) => Promise, + values: [P0, P1, P2], +): Promise; +export async function testWithReferenceFuncAsync( + referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise, + testFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise, + values: [P0, P1, P2, P3], +): Promise; +export async function testWithReferenceFuncAsync( + referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise, + testFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise, + values: [P0, P1, P2, P3, P4], +): Promise; + +/** + * Tests the behavior of a test function by comparing it to the expected + * behavior (defined by a reference function). + * + * First the reference function will be called to obtain an "expected result", + * or if the reference function throws/rejects, an "expected error". Next, the + * test function will be called to obtain an "actual result", or if the test + * function throws/rejects, an "actual error". The test passes if at least one + * of the following conditions is met: + * + * 1) Neither the reference function or the test function throw and the + * "expected result" equals the "actual result". + * + * 2) Both the reference function and the test function throw and the "actual + * error" message *contains* the "expected error" message. + * + * @param referenceFuncAsync a reference function implemented in pure + * JavaScript/TypeScript which accepts N arguments and returns the "expected + * result" or throws/rejects with the "expected error". + * @param testFuncAsync a test function which, e.g., makes a call or sends a + * transaction to a contract. It accepts the same N arguments returns the + * "actual result" or throws/rejects with the "actual error". + * @param values an array of N values, where each value corresponds in-order to + * an argument to both the test function and the reference function. + * @return A Promise that resolves if the test passes and rejects if the test + * fails, according to the rules described above. + */ +export async function testWithReferenceFuncAsync( + referenceFuncAsync: (...args: any[]) => Promise, + testFuncAsync: (...args: any[]) => Promise, + values: any[], +): Promise { + let expectedResult: any; + let expectedErr: string | undefined; + try { + expectedResult = await referenceFuncAsync(...values); + } catch (e) { + expectedErr = e.message; + } + let actualResult: any | undefined; + try { + actualResult = await testFuncAsync(...values); + if (!_.isUndefined(expectedErr)) { + throw new Error( + `Expected error containing ${expectedErr} but got no error\n\tTest case: ${_getTestCaseString( + referenceFuncAsync, + values, + )}`, + ); + } + } catch (e) { + if (_.isUndefined(expectedErr)) { + throw new Error(`${e.message}\n\tTest case: ${_getTestCaseString(referenceFuncAsync, values)}`); + } else { + expect(e.message).to.contain( + expectedErr, + `${e.message}\n\tTest case: ${_getTestCaseString(referenceFuncAsync, values)}`, + ); + } + } + if (!_.isUndefined(actualResult) && !_.isUndefined(expectedResult)) { + expect(actualResult).to.deep.equal( + expectedResult, + `Test case: ${_getTestCaseString(referenceFuncAsync, values)}`, + ); + } +} + +function _getTestCaseString(referenceFuncAsync: (...args: any[]) => Promise, values: any[]): string { + const paramNames = _getParameterNames(referenceFuncAsync); + return JSON.stringify(_.zipObject(paramNames, values)); +} + +// Source: https://stackoverflow.com/questions/1007981/how-to-get-function-parameter-names-values-dynamically +function _getParameterNames(func: (...args: any[]) => any): string[] { + return _.toString(func) + .replace(/[/][/].*$/gm, '') // strip single-line comments + .replace(/\s+/g, '') // strip white space + .replace(/[/][*][^/*]*[*][/]/g, '') // strip multi-line comments + .split('){', 1)[0] + .replace(/^[^(]*[(]/, '') // extract the parameters + .replace(/=[^,]+/g, '') // strip any ES6 defaults + .split(',') + .filter(Boolean); // split & filter [""] +} diff --git a/packages/migrations/artifacts/2.0.0/AssetProxyOwner.json b/packages/migrations/artifacts/2.0.0/AssetProxyOwner.json index 80751855b..f00f47779 100644 --- a/packages/migrations/artifacts/2.0.0/AssetProxyOwner.json +++ b/packages/migrations/artifacts/2.0.0/AssetProxyOwner.json @@ -44468,11 +44468,5 @@ } } }, - "networks": { - "50": { - "address": "0x34d402f14d58e001d8efbe6585051bf9706aa064", - "links": {}, - "constructorArgs": "[[\"0x5409ed021d9299bf6814279a6a1411a7e866a631\",\"0x6ecbe1db9ef729cbe972c83fb886247691fb6beb\"],[\"0x1dc4c1cefef38a777b15aa20260a54e584b16c48\",\"0x1d7022f5b17d2f8b695918fb48fa1089c9f85401\"],\"2\",\"0\"]" - } - } + "networks": {} } \ No newline at end of file diff --git a/packages/migrations/artifacts/2.0.0/ERC20Proxy.json b/packages/migrations/artifacts/2.0.0/ERC20Proxy.json index ed755fbed..82175bfb4 100644 --- a/packages/migrations/artifacts/2.0.0/ERC20Proxy.json +++ b/packages/migrations/artifacts/2.0.0/ERC20Proxy.json @@ -252,11 +252,5 @@ } } }, - "networks": { - "50": { - "address": "0x1dc4c1cefef38a777b15aa20260a54e584b16c48", - "links": {}, - "constructorArgs": "[]" - } - } + "networks": {} } \ No newline at end of file diff --git a/packages/migrations/artifacts/2.0.0/ERC721Proxy.json b/packages/migrations/artifacts/2.0.0/ERC721Proxy.json index 8421a6499..50a2c176b 100644 --- a/packages/migrations/artifacts/2.0.0/ERC721Proxy.json +++ b/packages/migrations/artifacts/2.0.0/ERC721Proxy.json @@ -252,11 +252,5 @@ } } }, - "networks": { - "50": { - "address": "0x1d7022f5b17d2f8b695918fb48fa1089c9f85401", - "links": {}, - "constructorArgs": "[]" - } - } + "networks": {} } \ No newline at end of file diff --git a/packages/migrations/artifacts/2.0.0/ERC721Token.json b/packages/migrations/artifacts/2.0.0/ERC721Token.json deleted file mode 100644 index 5597bc0ed..000000000 --- a/packages/migrations/artifacts/2.0.0/ERC721Token.json +++ /dev/null @@ -1,379 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "ERC721Token", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "exists", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_tokenId", - "type": "uint256" - }, - { - "name": "_data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "_name", - "type": "string" - }, - { - "name": "_symbol", - "type": "string" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_from", - "type": "address" - }, - { - "indexed": true, - "name": "_to", - "type": "address" - }, - { - "indexed": false, - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_approved", - "type": "address" - }, - { - "indexed": false, - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_operator", - "type": "address" - }, - { - "indexed": false, - "name": "_approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "0x608060405234801561001057600080fd5b506040516200102d3803806200102d83398101604052805160208083015191830180519093929092019161004a9160009190850190610066565b50805161005e906001906020840190610066565b505050610101565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100a757805160ff19168380011785556100d4565b828001600101855582156100d4579182015b828111156100d45782518255916020019190600101906100b9565b506100e09291506100e4565b5090565b6100fe91905b808211156100e057600081556001016100ea565b90565b610f1c80620001116000396000f3006080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063081812fc14610148578063095ea7b31461018957806323b872dd146101bc57806342842e0e146101f35780634f558e791461022a5780636352211e1461025657806370a082311461026e57806395d89b41146102ae578063a22cb465146102c3578063b88d4fde146102f6578063e985e9c514610372575b600080fd5b3480156100ca57600080fd5b506100d36103a6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010d5781810151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015457600080fd5b5061016060043561045a565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561019557600080fd5b506101ba73ffffffffffffffffffffffffffffffffffffffff60043516602435610482565b005b3480156101c857600080fd5b506101ba73ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356105c0565b3480156101ff57600080fd5b506101ba73ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356106a3565b34801561023657600080fd5b506102426004356106db565b604080519115158252519081900360200190f35b34801561026257600080fd5b50610160600435610705565b34801561027a57600080fd5b5061029c73ffffffffffffffffffffffffffffffffffffffff6004351661073c565b60408051918252519081900360200190f35b3480156102ba57600080fd5b506100d3610789565b3480156102cf57600080fd5b506101ba73ffffffffffffffffffffffffffffffffffffffff600435166024351515610807565b34801561030257600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526101ba9473ffffffffffffffffffffffffffffffffffffffff81358116956024803590921695604435953695608494019181908401838280828437509497506108c39650505050505050565b34801561037e57600080fd5b5061024273ffffffffffffffffffffffffffffffffffffffff60043581169060243516610902565b60008054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104505780601f1061042557610100808354040283529160200191610450565b820191906000526020600020905b81548152906001019060200180831161043357829003601f168201915b5050505050905090565b60009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600061048d82610705565b905073ffffffffffffffffffffffffffffffffffffffff83811690821614156104b557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff821614806104de57506104de8133610902565b15156104e957600080fd5b60006104f48361045a565b73ffffffffffffffffffffffffffffffffffffffff1614158061052c575073ffffffffffffffffffffffffffffffffffffffff831615155b156105bb5760008281526003602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff878116918217909255835186815293519093918516927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35b505050565b806105cb338261093d565b15156105d657600080fd5b73ffffffffffffffffffffffffffffffffffffffff841615156105f857600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316151561061a57600080fd5b61062484836109d0565b61062e8483610abd565b6106388383610b8c565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050565b806106ae338261093d565b15156106b957600080fd5b6106d584848460206040519081016040528060008152506108c3565b50505050565b60009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16151590565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1680151561073657600080fd5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff8216151561076057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156104505780601f1061042557610100808354040283529160200191610450565b73ffffffffffffffffffffffffffffffffffffffff821633141561082a57600080fd5b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b816108ce338261093d565b15156108d957600080fd5b6108e48585856105c0565b6108f085858585610c4f565b15156108fb57600080fd5b5050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b60008061094983610705565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806109b857508373ffffffffffffffffffffffffffffffffffffffff166109a08461045a565b73ffffffffffffffffffffffffffffffffffffffff16145b806109c857506109c88185610902565b949350505050565b8173ffffffffffffffffffffffffffffffffffffffff166109f082610705565b73ffffffffffffffffffffffffffffffffffffffff1614610a1057600080fd5b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610ab957600081815260036020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690558051848152905173ffffffffffffffffffffffffffffffffffffffff8616927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35b5050565b8173ffffffffffffffffffffffffffffffffffffffff16610add82610705565b73ffffffffffffffffffffffffffffffffffffffff1614610afd57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054610b2e906001610df6565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526004602090815260408083209490945591815260029091522080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610bbb57600080fd5b600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff871690811790915583526004909152902054610c22906001610e6d565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526004602052604090209190915550565b600080610c5b85610ee8565b1515610c6a5760019150610ded565b8473ffffffffffffffffffffffffffffffffffffffff1663f0b9e5ba8786866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d29578181015183820152602001610d11565b50505050905090810190601f168015610d565780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610d7757600080fd5b505af1158015610d8b573d6000803e3d6000fd5b505050506040513d6020811015610da157600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000081167ff0b9e5ba0000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b600082821115610e6757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f55494e543235365f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b50900390565b600082820183811015610ee157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b9392505050565b6000903b11905600a165627a7a72305820aacec74571ad3fdadc48934e85686b1de73bc8471f19f195a66397983622eed90029", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x102D CODESIZE SUB DUP1 PUSH3 0x102D DUP4 CODECOPY DUP2 ADD PUSH1 0x40 MSTORE DUP1 MLOAD PUSH1 0x20 DUP1 DUP4 ADD MLOAD SWAP2 DUP4 ADD DUP1 MLOAD SWAP1 SWAP4 SWAP3 SWAP1 SWAP3 ADD SWAP2 PUSH2 0x4A SWAP2 PUSH1 0x0 SWAP2 SWAP1 DUP6 ADD SWAP1 PUSH2 0x66 JUMP JUMPDEST POP DUP1 MLOAD PUSH2 0x5E SWAP1 PUSH1 0x1 SWAP1 PUSH1 0x20 DUP5 ADD SWAP1 PUSH2 0x66 JUMP JUMPDEST POP POP POP PUSH2 0x101 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0xA7 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0xD4 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0xD4 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0xD4 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0xB9 JUMP JUMPDEST POP PUSH2 0xE0 SWAP3 SWAP2 POP PUSH2 0xE4 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH2 0xFE SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0xE0 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0xEA JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH2 0xF1C DUP1 PUSH3 0x111 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xB9 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x6FDDE03 DUP2 EQ PUSH2 0xBE JUMPI DUP1 PUSH4 0x81812FC EQ PUSH2 0x148 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x189 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1BC JUMPI DUP1 PUSH4 0x42842E0E EQ PUSH2 0x1F3 JUMPI DUP1 PUSH4 0x4F558E79 EQ PUSH2 0x22A JUMPI DUP1 PUSH4 0x6352211E EQ PUSH2 0x256 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x26E JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x2AE JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x2C3 JUMPI DUP1 PUSH4 0xB88D4FDE EQ PUSH2 0x2F6 JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0x372 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD3 PUSH2 0x3A6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x10D JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xF5 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x13A JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x154 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x160 PUSH1 0x4 CALLDATALOAD PUSH2 0x45A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x195 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1BA PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x482 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1C8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1BA PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x5C0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1BA PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x6A3 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x236 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x242 PUSH1 0x4 CALLDATALOAD PUSH2 0x6DB JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x262 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x160 PUSH1 0x4 CALLDATALOAD PUSH2 0x705 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x27A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x29C PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x73C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2BA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD3 PUSH2 0x789 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2CF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1BA PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD ISZERO ISZERO PUSH2 0x807 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x302 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x64 CALLDATALOAD PUSH1 0x4 DUP2 DUP2 ADD CALLDATALOAD SWAP3 DUP4 ADD DUP5 SWAP1 DIV DUP5 MUL DUP6 ADD DUP5 ADD SWAP1 SWAP6 MSTORE DUP2 DUP5 MSTORE PUSH2 0x1BA SWAP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 CALLDATALOAD DUP2 AND SWAP6 PUSH1 0x24 DUP1 CALLDATALOAD SWAP1 SWAP3 AND SWAP6 PUSH1 0x44 CALLDATALOAD SWAP6 CALLDATASIZE SWAP6 PUSH1 0x84 SWAP5 ADD SWAP2 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY POP SWAP5 SWAP8 POP PUSH2 0x8C3 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x37E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x242 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x902 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x450 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x425 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x450 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x433 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x48D DUP3 PUSH2 0x705 JUMP JUMPDEST SWAP1 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 AND SWAP1 DUP3 AND EQ ISZERO PUSH2 0x4B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ DUP1 PUSH2 0x4DE JUMPI POP PUSH2 0x4DE DUP2 CALLER PUSH2 0x902 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x4E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x4F4 DUP4 PUSH2 0x45A JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO DUP1 PUSH2 0x52C JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND ISZERO ISZERO JUMPDEST ISZERO PUSH2 0x5BB JUMPI PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP8 DUP2 AND SWAP2 DUP3 OR SWAP1 SWAP3 SSTORE DUP4 MLOAD DUP7 DUP2 MSTORE SWAP4 MLOAD SWAP1 SWAP4 SWAP2 DUP6 AND SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 DUP3 SWAP1 SUB ADD SWAP1 LOG3 JUMPDEST POP POP POP JUMP JUMPDEST DUP1 PUSH2 0x5CB CALLER DUP3 PUSH2 0x93D JUMP JUMPDEST ISZERO ISZERO PUSH2 0x5D6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND ISZERO ISZERO PUSH2 0x5F8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND ISZERO ISZERO PUSH2 0x61A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x624 DUP5 DUP4 PUSH2 0x9D0 JUMP JUMPDEST PUSH2 0x62E DUP5 DUP4 PUSH2 0xABD JUMP JUMPDEST PUSH2 0x638 DUP4 DUP4 PUSH2 0xB8C JUMP JUMPDEST DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP5 PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST DUP1 PUSH2 0x6AE CALLER DUP3 PUSH2 0x93D JUMP JUMPDEST ISZERO ISZERO PUSH2 0x6B9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x6D5 DUP5 DUP5 DUP5 PUSH1 0x20 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x8C3 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP1 ISZERO ISZERO PUSH2 0x736 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND ISZERO ISZERO PUSH2 0x760 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH2 0x100 DUP8 DUP10 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x450 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x425 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x450 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND CALLER EQ ISZERO PUSH2 0x82A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP8 AND DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND DUP7 ISZERO ISZERO SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 MLOAD SWAP1 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP4 SWAP3 PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP POP JUMP JUMPDEST DUP2 PUSH2 0x8CE CALLER DUP3 PUSH2 0x93D JUMP JUMPDEST ISZERO ISZERO PUSH2 0x8D9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x8E4 DUP6 DUP6 DUP6 PUSH2 0x5C0 JUMP JUMPDEST PUSH2 0x8F0 DUP6 DUP6 DUP6 DUP6 PUSH2 0xC4F JUMP JUMPDEST ISZERO ISZERO PUSH2 0x8FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x949 DUP4 PUSH2 0x705 JUMP JUMPDEST SWAP1 POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x9B8 JUMPI POP DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x9A0 DUP5 PUSH2 0x45A JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST DUP1 PUSH2 0x9C8 JUMPI POP PUSH2 0x9C8 DUP2 DUP6 PUSH2 0x902 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x9F0 DUP3 PUSH2 0x705 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xA10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO PUSH2 0xAB9 JUMPI PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP1 SSTORE DUP1 MLOAD DUP5 DUP2 MSTORE SWAP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP7 AND SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 DUP3 SWAP1 SUB ADD SWAP1 LOG3 JUMPDEST POP POP JUMP JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xADD DUP3 PUSH2 0x705 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xAFD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0xB2E SWAP1 PUSH1 0x1 PUSH2 0xDF6 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE SWAP2 DUP2 MSTORE PUSH1 0x2 SWAP1 SWAP2 MSTORE KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO PUSH2 0xBBB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP8 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP4 MSTORE PUSH1 0x4 SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0xC22 SWAP1 PUSH1 0x1 PUSH2 0xE6D JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xC5B DUP6 PUSH2 0xEE8 JUMP JUMPDEST ISZERO ISZERO PUSH2 0xC6A JUMPI PUSH1 0x1 SWAP2 POP PUSH2 0xDED JUMP JUMPDEST DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0xF0B9E5BA DUP8 DUP7 DUP7 PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH29 0x100000000000000000000000000000000000000000000000000000000 MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD29 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xD11 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xD56 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xD77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xD8B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xDA1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND PUSH32 0xF0B9E5BA00000000000000000000000000000000000000000000000000000000 EQ SWAP3 POP SWAP1 POP JUMPDEST POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0xE67 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x55494E543235365F554E444552464C4F57000000000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0xEE1 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x10 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x55494E543235365F4F564552464C4F5700000000000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 EXTCODESIZE GT SWAP1 JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xaa 0xce 0xc7 GASLIMIT PUSH18 0xAD3FDADC48934E85686B1DE73BC8471F19F1 SWAP6 0xa6 PUSH4 0x97983622 0xee 0xd9 STOP 0x29 ", - "sourceMap": "1506:12636:0:-;;;2797:136;8:9:-1;5:2;;;30:1;27;20:12;5:2;2797:136:0;;;;;;;;;;;;;;;;;;;;;;;;2886:13;;2797:136;;;;;;;2886:13;;:5;;:13;;;;;:::i;:::-;-1:-1:-1;2909:17:0;;;;:7;;:17;;;;;:::i;:::-;;2797:136;;1506:12636;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1506:12636:0;;;-1:-1:-1;1506:12636:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;" - }, - "deployedBytecode": { - "linkReferences": {}, - "object": "0x6080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063081812fc14610148578063095ea7b31461018957806323b872dd146101bc57806342842e0e146101f35780634f558e791461022a5780636352211e1461025657806370a082311461026e57806395d89b41146102ae578063a22cb465146102c3578063b88d4fde146102f6578063e985e9c514610372575b600080fd5b3480156100ca57600080fd5b506100d36103a6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010d5781810151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015457600080fd5b5061016060043561045a565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561019557600080fd5b506101ba73ffffffffffffffffffffffffffffffffffffffff60043516602435610482565b005b3480156101c857600080fd5b506101ba73ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356105c0565b3480156101ff57600080fd5b506101ba73ffffffffffffffffffffffffffffffffffffffff600435811690602435166044356106a3565b34801561023657600080fd5b506102426004356106db565b604080519115158252519081900360200190f35b34801561026257600080fd5b50610160600435610705565b34801561027a57600080fd5b5061029c73ffffffffffffffffffffffffffffffffffffffff6004351661073c565b60408051918252519081900360200190f35b3480156102ba57600080fd5b506100d3610789565b3480156102cf57600080fd5b506101ba73ffffffffffffffffffffffffffffffffffffffff600435166024351515610807565b34801561030257600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526101ba9473ffffffffffffffffffffffffffffffffffffffff81358116956024803590921695604435953695608494019181908401838280828437509497506108c39650505050505050565b34801561037e57600080fd5b5061024273ffffffffffffffffffffffffffffffffffffffff60043581169060243516610902565b60008054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104505780601f1061042557610100808354040283529160200191610450565b820191906000526020600020905b81548152906001019060200180831161043357829003601f168201915b5050505050905090565b60009081526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600061048d82610705565b905073ffffffffffffffffffffffffffffffffffffffff83811690821614156104b557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff821614806104de57506104de8133610902565b15156104e957600080fd5b60006104f48361045a565b73ffffffffffffffffffffffffffffffffffffffff1614158061052c575073ffffffffffffffffffffffffffffffffffffffff831615155b156105bb5760008281526003602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff878116918217909255835186815293519093918516927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35b505050565b806105cb338261093d565b15156105d657600080fd5b73ffffffffffffffffffffffffffffffffffffffff841615156105f857600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316151561061a57600080fd5b61062484836109d0565b61062e8483610abd565b6106388383610b8c565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050565b806106ae338261093d565b15156106b957600080fd5b6106d584848460206040519081016040528060008152506108c3565b50505050565b60009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16151590565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1680151561073657600080fd5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff8216151561076057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156104505780601f1061042557610100808354040283529160200191610450565b73ffffffffffffffffffffffffffffffffffffffff821633141561082a57600080fd5b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b816108ce338261093d565b15156108d957600080fd5b6108e48585856105c0565b6108f085858585610c4f565b15156108fb57600080fd5b5050505050565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b60008061094983610705565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806109b857508373ffffffffffffffffffffffffffffffffffffffff166109a08461045a565b73ffffffffffffffffffffffffffffffffffffffff16145b806109c857506109c88185610902565b949350505050565b8173ffffffffffffffffffffffffffffffffffffffff166109f082610705565b73ffffffffffffffffffffffffffffffffffffffff1614610a1057600080fd5b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610ab957600081815260036020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690558051848152905173ffffffffffffffffffffffffffffffffffffffff8616927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35b5050565b8173ffffffffffffffffffffffffffffffffffffffff16610add82610705565b73ffffffffffffffffffffffffffffffffffffffff1614610afd57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054610b2e906001610df6565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526004602090815260408083209490945591815260029091522080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615610bbb57600080fd5b600081815260026020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff871690811790915583526004909152902054610c22906001610e6d565b73ffffffffffffffffffffffffffffffffffffffff90921660009081526004602052604090209190915550565b600080610c5b85610ee8565b1515610c6a5760019150610ded565b8473ffffffffffffffffffffffffffffffffffffffff1663f0b9e5ba8786866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d29578181015183820152602001610d11565b50505050905090810190601f168015610d565780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b158015610d7757600080fd5b505af1158015610d8b573d6000803e3d6000fd5b505050506040513d6020811015610da157600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000081167ff0b9e5ba0000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b600082821115610e6757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f55494e543235365f554e444552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b50900390565b600082820183811015610ee157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f55494e543235365f4f564552464c4f5700000000000000000000000000000000604482015290519081900360640190fd5b9392505050565b6000903b11905600a165627a7a72305820aacec74571ad3fdadc48934e85686b1de73bc8471f19f195a66397983622eed90029", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xB9 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x6FDDE03 DUP2 EQ PUSH2 0xBE JUMPI DUP1 PUSH4 0x81812FC EQ PUSH2 0x148 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x189 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1BC JUMPI DUP1 PUSH4 0x42842E0E EQ PUSH2 0x1F3 JUMPI DUP1 PUSH4 0x4F558E79 EQ PUSH2 0x22A JUMPI DUP1 PUSH4 0x6352211E EQ PUSH2 0x256 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x26E JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x2AE JUMPI DUP1 PUSH4 0xA22CB465 EQ PUSH2 0x2C3 JUMPI DUP1 PUSH4 0xB88D4FDE EQ PUSH2 0x2F6 JUMPI DUP1 PUSH4 0xE985E9C5 EQ PUSH2 0x372 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xCA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD3 PUSH2 0x3A6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x10D JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xF5 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x13A JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x154 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x160 PUSH1 0x4 CALLDATALOAD PUSH2 0x45A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x195 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1BA PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x482 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1C8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1BA PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x5C0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1BA PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x6A3 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x236 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x242 PUSH1 0x4 CALLDATALOAD PUSH2 0x6DB JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x262 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x160 PUSH1 0x4 CALLDATALOAD PUSH2 0x705 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x27A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x29C PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x73C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2BA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD3 PUSH2 0x789 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2CF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1BA PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD ISZERO ISZERO PUSH2 0x807 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x302 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x64 CALLDATALOAD PUSH1 0x4 DUP2 DUP2 ADD CALLDATALOAD SWAP3 DUP4 ADD DUP5 SWAP1 DIV DUP5 MUL DUP6 ADD DUP5 ADD SWAP1 SWAP6 MSTORE DUP2 DUP5 MSTORE PUSH2 0x1BA SWAP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 CALLDATALOAD DUP2 AND SWAP6 PUSH1 0x24 DUP1 CALLDATALOAD SWAP1 SWAP3 AND SWAP6 PUSH1 0x44 CALLDATALOAD SWAP6 CALLDATASIZE SWAP6 PUSH1 0x84 SWAP5 ADD SWAP2 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY POP SWAP5 SWAP8 POP PUSH2 0x8C3 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x37E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x242 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x902 JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x450 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x425 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x450 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x433 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x48D DUP3 PUSH2 0x705 JUMP JUMPDEST SWAP1 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 DUP2 AND SWAP1 DUP3 AND EQ ISZERO PUSH2 0x4B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND EQ DUP1 PUSH2 0x4DE JUMPI POP PUSH2 0x4DE DUP2 CALLER PUSH2 0x902 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x4E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x4F4 DUP4 PUSH2 0x45A JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO DUP1 PUSH2 0x52C JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND ISZERO ISZERO JUMPDEST ISZERO PUSH2 0x5BB JUMPI PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP8 DUP2 AND SWAP2 DUP3 OR SWAP1 SWAP3 SSTORE DUP4 MLOAD DUP7 DUP2 MSTORE SWAP4 MLOAD SWAP1 SWAP4 SWAP2 DUP6 AND SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 DUP3 SWAP1 SUB ADD SWAP1 LOG3 JUMPDEST POP POP POP JUMP JUMPDEST DUP1 PUSH2 0x5CB CALLER DUP3 PUSH2 0x93D JUMP JUMPDEST ISZERO ISZERO PUSH2 0x5D6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND ISZERO ISZERO PUSH2 0x5F8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND ISZERO ISZERO PUSH2 0x61A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x624 DUP5 DUP4 PUSH2 0x9D0 JUMP JUMPDEST PUSH2 0x62E DUP5 DUP4 PUSH2 0xABD JUMP JUMPDEST PUSH2 0x638 DUP4 DUP4 PUSH2 0xB8C JUMP JUMPDEST DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP5 PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 POP POP POP POP JUMP JUMPDEST DUP1 PUSH2 0x6AE CALLER DUP3 PUSH2 0x93D JUMP JUMPDEST ISZERO ISZERO PUSH2 0x6B9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x6D5 DUP5 DUP5 DUP5 PUSH1 0x20 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP PUSH2 0x8C3 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO ISZERO SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP1 ISZERO ISZERO PUSH2 0x736 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND ISZERO ISZERO PUSH2 0x760 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH2 0x100 DUP8 DUP10 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x450 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x425 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x450 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND CALLER EQ ISZERO PUSH2 0x82A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP8 AND DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND DUP7 ISZERO ISZERO SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 MLOAD SWAP1 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP4 SWAP3 PUSH32 0x17307EAB39AB6107E8899845AD3D59BD9653F200F220920489CA2B5937696C31 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP POP JUMP JUMPDEST DUP2 PUSH2 0x8CE CALLER DUP3 PUSH2 0x93D JUMP JUMPDEST ISZERO ISZERO PUSH2 0x8D9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x8E4 DUP6 DUP6 DUP6 PUSH2 0x5C0 JUMP JUMPDEST PUSH2 0x8F0 DUP6 DUP6 DUP6 DUP6 PUSH2 0xC4F JUMP JUMPDEST ISZERO ISZERO PUSH2 0x8FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x949 DUP4 PUSH2 0x705 JUMP JUMPDEST SWAP1 POP DUP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ DUP1 PUSH2 0x9B8 JUMPI POP DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x9A0 DUP5 PUSH2 0x45A JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ JUMPDEST DUP1 PUSH2 0x9C8 JUMPI POP PUSH2 0x9C8 DUP2 DUP6 PUSH2 0x902 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0x9F0 DUP3 PUSH2 0x705 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xA10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO PUSH2 0xAB9 JUMPI PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x3 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP1 SSTORE DUP1 MLOAD DUP5 DUP2 MSTORE SWAP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP7 AND SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 DUP3 SWAP1 SUB ADD SWAP1 LOG3 JUMPDEST POP POP JUMP JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH2 0xADD DUP3 PUSH2 0x705 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ PUSH2 0xAFD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0xB2E SWAP1 PUSH1 0x1 PUSH2 0xDF6 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE SWAP2 DUP2 MSTORE PUSH1 0x2 SWAP1 SWAP2 MSTORE KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO PUSH2 0xBBB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP8 AND SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP4 MSTORE PUSH1 0x4 SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0xC22 SWAP1 PUSH1 0x1 PUSH2 0xE6D JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SWAP2 SWAP1 SWAP2 SSTORE POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xC5B DUP6 PUSH2 0xEE8 JUMP JUMPDEST ISZERO ISZERO PUSH2 0xC6A JUMPI PUSH1 0x1 SWAP2 POP PUSH2 0xDED JUMP JUMPDEST DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH4 0xF0B9E5BA DUP8 DUP7 DUP7 PUSH1 0x40 MLOAD DUP5 PUSH4 0xFFFFFFFF AND PUSH29 0x100000000000000000000000000000000000000000000000000000000 MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP4 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xD29 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0xD11 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0xD56 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP5 POP POP POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xD77 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xD8B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xDA1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH32 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000 DUP2 AND PUSH32 0xF0B9E5BA00000000000000000000000000000000000000000000000000000000 EQ SWAP3 POP SWAP1 POP JUMPDEST POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0xE67 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x11 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x55494E543235365F554E444552464C4F57000000000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0xEE1 JUMPI PUSH1 0x40 DUP1 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x10 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x55494E543235365F4F564552464C4F5700000000000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x64 ADD SWAP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 SWAP1 EXTCODESIZE GT SWAP1 JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xaa 0xce 0xc7 GASLIMIT PUSH18 0xAD3FDADC48934E85686B1DE73BC8471F19F1 SWAP6 0xa6 PUSH4 0x97983622 0xee 0xd9 STOP 0x29 ", - "sourceMap": "1506:12636:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3034:102;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3034:102:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3034:102:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5587:145;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5587:145:0;;;;;;;;;;;;;;;;;;;;;;;;4949:401;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4949:401:0;;;;;;;;;;;7191:362;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7191:362:0;;;;;;;;;;;;;;8184:254;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8184:254:0;;;;;;;;;;;;;;4340:178;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4340:178:0;;;;;;;;;;;;;;;;;;;;;;;3948:206;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3948:206:0;;;;;3547:180;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3547:180:0;;;;;;;;;;;;;;;;;;;;;;;3241:106;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3241:106:0;;;;6026:231;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6026:231:0;;;;;;;;;;;9140:339;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9140:339:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9140:339:0;;-1:-1:-1;9140:339:0;;-1:-1:-1;;;;;;;9140:339:0;6575:176;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6575:176:0;;;;;;;;;;;;3034:102;3124:5;3117:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3095:6;;3117:12;;3124:5;;3117:12;;3124:5;3117:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3034:102;:::o;5587:145::-;5671:7;5701:24;;;:14;:24;;;;;;;;;5587:145::o;4949:401::-;5026:13;5042:17;5050:8;5042:7;:17::i;:::-;5026:33;-1:-1:-1;5077:12:0;;;;;;;;;5069:21;;;;;;5108:10;:19;;;;;:58;;;5131:35;5148:5;5155:10;5131:16;:35::i;:::-;5100:67;;;;;;;;5215:1;5182:21;5194:8;5182:11;:21::i;:::-;:35;;;;:56;;;-1:-1:-1;5221:17:0;;;;;5182:56;5178:166;;;5254:24;;;;:14;:24;;;;;;;;;:30;;;;;;;;;;;;;;5303;;;;;;;5254;;5303;;;;;;;;;;;;5178:166;4949:401;;;:::o;7191:362::-;7294:8;2733:39;2751:10;2763:8;2733:17;:39::i;:::-;2725:48;;;;;;;;7326:19;;;;;7318:28;;;;;;7364:17;;;;;7356:26;;;;;;7393:30;7407:5;7414:8;7393:13;:30::i;:::-;7433:32;7449:5;7456:8;7433:15;:32::i;:::-;7475:25;7486:3;7491:8;7475:10;:25::i;:::-;7532:3;7516:30;;7525:5;7516:30;;;7537:8;7516:30;;;;;;;;;;;;;;;;;;7191:362;;;;:::o;8184:254::-;8316:8;2733:39;2751:10;2763:8;2733:17;:39::i;:::-;2725:48;;;;;;;;8389:42;8406:5;8413:3;8418:8;8389:42;;;;;;;;;;;;;:16;:42::i;:::-;8184:254;;;;:::o;4340:178::-;4419:4;4455:20;;;:10;:20;;;;;;;;4492:19;;;4340:178::o;3948:206::-;4028:7;4067:20;;;:10;:20;;;;;;;;4105:19;;;4097:28;;;;;;4142:5;3948:206;-1:-1:-1;;3948:206:0:o;3547:180::-;3627:7;3658:20;;;;;3650:29;;;;;;-1:-1:-1;3696:24:0;;;;;;:16;:24;;;;;;;3547:180::o;3241:106::-;3333:7;3326:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3304:6;;3326:14;;3333:7;;3326:14;;3333:7;3326:14;;;;;;;;;;;;;;;;;;;;;;;;6026:231;6119:17;;;6126:10;6119:17;;6111:26;;;;;;6165:10;6147:29;;;;:17;:29;;;;;;;;;:34;;;;;;;;;;;;:46;;;;;;;;;;;;;6208:42;;;;;;;6147:34;;6165:10;6208:42;;;;;;;;;;;6026:231;;:::o;9140:339::-;9293:8;2733:39;2751:10;2763:8;2733:17;:39::i;:::-;2725:48;;;;;;;;9317:34;9330:5;9337:3;9342:8;9317:12;:34::i;:::-;9418:53;9443:5;9450:3;9455:8;9465:5;9418:24;:53::i;:::-;9410:62;;;;;;;;9140:339;;;;;:::o;6575:176::-;6708:25;;;;6681:4;6708:25;;;:17;:25;;;;;;;;:36;;;;;;;;;;;;;;;6575:176::o;9836:278::-;9946:4;9966:13;9982:17;9990:8;9982:7;:17::i;:::-;9966:33;;10028:5;10016:17;;:8;:17;;;:54;;;;10062:8;10037:33;;:21;10049:8;10037:11;:21::i;:::-;:33;;;10016:54;:91;;;;10074:33;10091:5;10098:8;10074:16;:33::i;:::-;10009:98;9836:278;-1:-1:-1;;;;9836:278:0:o;11261:303::-;11378:6;11357:27;;:17;11365:8;11357:7;:17::i;:::-;:27;;;11349:36;;;;;;11435:1;11399:24;;;:14;:24;;;;;;:38;:24;:38;11395:163;;11488:1;11453:24;;;:14;:24;;;;;;;;:37;;;;;;11509:38;;;;;;;11453:37;11509:38;;;;;;;;;;;11395:163;11261:303;;:::o;12357:245::-;12475:5;12454:26;;:17;12462:8;12454:7;:17::i;:::-;:26;;;12446:35;;;;;;12525:23;;;;;;;:16;:23;;;;;;12517:35;;12550:1;12517:7;:35::i;:::-;12491:23;;;;;;;;:16;:23;;;;;;;;:61;;;;12562:20;;;:10;:20;;;;:33;;;;;;12357:245::o;11835:235::-;11957:1;11925:20;;;:10;:20;;;;;;:34;:20;:34;11917:43;;;;;;11970:20;;;;:10;:20;;;;;;;;:26;;;;;;;;;;;;;12038:21;;:16;:21;;;;;;12030:33;;-1:-1:-1;12030:7:0;:33::i;:::-;12006:21;;;;;;;;:16;:21;;;;;:57;;;;-1:-1:-1;11835:235:0:o;13125:375::-;13285:4;13372:13;13310:15;13321:3;13310:10;:15::i;:::-;13309:16;13305:58;;;13348:4;13341:11;;;;13305:58;13404:3;13388:37;;;13426:5;13433:8;13443:5;13388:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;13388:61:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13388:61:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13388:61:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;13388:61:0;13467:25;;;13477:15;13467:25;;-1:-1:-1;13388:61:0;-1:-1:-1;13125:375:0;;;;;;;;:::o;501:208:3:-;587:7;631:6;;;;610:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;697:5:3;;;501:208::o;715:230::-;801:7;836:5;;;872:6;;;;851:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;937:1;715:230;-1:-1:-1;;;715:230:3:o;13506:634:0:-;13587:4;14038:17;;14125:8;;13506:634::o" - } - } - }, - "sources": { - "2.0.0/tokens/ERC721Token/ERC721Token.sol": { - "id": 0 - }, - "2.0.0/tokens/ERC721Token/IERC721Receiver.sol": { - "id": 1 - }, - "2.0.0/tokens/ERC721Token/IERC721Token.sol": { - "id": 2 - }, - "2.0.0/utils/SafeMath/SafeMath.sol": { - "id": 3 - } - }, - "sourceCodes": { - "2.0.0/tokens/ERC721Token/ERC721Token.sol": "/*\nThe MIT License (MIT)\n\nCopyright (c) 2016 Smart Contract Solutions, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\npragma solidity 0.4.24;\n\nimport \"./IERC721Token.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"../../utils/SafeMath/SafeMath.sol\";\n\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic implementation\n * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md\n * Modified from https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/ERC721/ERC721BasicToken.sol\n */\ncontract ERC721Token is\n IERC721Token,\n SafeMath\n{\n // Equals to `bytes4(keccak256(\"onERC721Received(address,uint256,bytes)\"))`\n // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`\n bytes4 constant internal ERC721_RECEIVED = 0xf0b9e5ba;\n\n // Mapping from token ID to owner\n mapping (uint256 => address) internal tokenOwner;\n\n // Mapping from token ID to approved address\n mapping (uint256 => address) internal tokenApprovals;\n\n // Mapping from owner to number of owned token\n mapping (address => uint256) internal ownedTokensCount;\n\n // Mapping from owner to operator approvals\n mapping (address => mapping (address => bool)) internal operatorApprovals;\n\n /**\n * @dev Guarantees msg.sender is owner of the given token\n * @param _tokenId uint256 ID of the token to validate its ownership belongs to msg.sender\n */\n modifier onlyOwnerOf(uint256 _tokenId) {\n require(ownerOf(_tokenId) == msg.sender);\n _;\n }\n\n /**\n * @dev Checks msg.sender can transfer a token, by being owner, approved, or operator\n * @param _tokenId uint256 ID of the token to validate\n */\n modifier canTransfer(uint256 _tokenId) {\n require(isApprovedOrOwner(msg.sender, _tokenId));\n _;\n }\n\n constructor (\n string _name,\n string _symbol)\n public\n {\n name_ = _name;\n symbol_ = _symbol;\n }\n\n /**\n * @dev Gets the token name\n * @return string representing the token name\n */\n function name()\n public\n view\n returns (string)\n {\n return name_;\n }\n\n /**\n * @dev Gets the token symbol\n * @return string representing the token symbol\n */\n function symbol()\n public\n view\n returns (string)\n {\n return symbol_;\n }\n\n /**\n * @dev Gets the balance of the specified address\n * @param _owner address to query the balance of\n * @return uint256 representing the amount owned by the passed address\n */\n function balanceOf(address _owner)\n public\n view\n returns (uint256)\n {\n require(_owner != address(0));\n return ownedTokensCount[_owner];\n }\n\n /**\n * @dev Gets the owner of the specified token ID\n * @param _tokenId uint256 ID of the token to query the owner of\n * @return owner address currently marked as the owner of the given token ID\n */\n function ownerOf(uint256 _tokenId)\n public\n view\n returns (address)\n {\n address owner = tokenOwner[_tokenId];\n require(owner != address(0));\n return owner;\n }\n\n /**\n * @dev Returns whether the specified token exists\n * @param _tokenId uint256 ID of the token to query the existance of\n * @return whether the token exists\n */\n function exists(uint256 _tokenId)\n public\n view\n returns (bool)\n {\n address owner = tokenOwner[_tokenId];\n return owner != address(0);\n }\n\n /**\n * @dev Approves another address to transfer the given token ID\n * @dev The zero address indicates there is no approved address.\n * @dev There can only be one approved address per token at a given time.\n * @dev Can only be called by the token owner or an approved operator.\n * @param _to address to be approved for the given token ID\n * @param _tokenId uint256 ID of the token to be approved\n */\n function approve(address _to, uint256 _tokenId)\n public\n {\n address owner = ownerOf(_tokenId);\n require(_to != owner);\n require(msg.sender == owner || isApprovedForAll(owner, msg.sender));\n\n if (getApproved(_tokenId) != address(0) || _to != address(0)) {\n tokenApprovals[_tokenId] = _to;\n emit Approval(owner, _to, _tokenId);\n }\n }\n\n /**\n * @dev Gets the approved address for a token ID, or zero if no address set\n * @param _tokenId uint256 ID of the token to query the approval of\n * @return address currently approved for a the given token ID\n */\n function getApproved(uint256 _tokenId)\n public\n view\n returns (address)\n {\n return tokenApprovals[_tokenId];\n }\n\n /**\n * @dev Sets or unsets the approval of a given operator\n * @dev An operator is allowed to transfer all tokens of the sender on their behalf\n * @param _to operator address to set the approval\n * @param _approved representing the status of the approval to be set\n */\n function setApprovalForAll(address _to, bool _approved)\n public\n {\n require(_to != msg.sender);\n operatorApprovals[msg.sender][_to] = _approved;\n emit ApprovalForAll(msg.sender, _to, _approved);\n }\n\n /**\n * @dev Tells whether an operator is approved by a given owner\n * @param _owner owner address which you want to query the approval of\n * @param _operator operator address which you want to query the approval of\n * @return bool whether the given operator is approved by the given owner\n */\n function isApprovedForAll(address _owner, address _operator)\n public\n view\n returns (bool)\n {\n return operatorApprovals[_owner][_operator];\n }\n\n /**\n * @dev Transfers the ownership of a given token ID to another address\n * @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible\n * @dev Requires the msg sender to be the owner, approved, or operator\n * @param _from current owner of the token\n * @param _to address to receive the ownership of the given token ID\n * @param _tokenId uint256 ID of the token to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _tokenId)\n public\n canTransfer(_tokenId)\n {\n require(_from != address(0));\n require(_to != address(0));\n\n clearApproval(_from, _tokenId);\n removeTokenFrom(_from, _tokenId);\n addTokenTo(_to, _tokenId);\n\n emit Transfer(_from, _to, _tokenId);\n }\n\n /**\n * @dev Safely transfers the ownership of a given token ID to another address\n * @dev If the target address is a contract, it must implement `onERC721Received`,\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onERC721Received(address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n * @dev Requires the msg sender to be the owner, approved, or operator\n * @param _from current owner of the token\n * @param _to address to receive the ownership of the given token ID\n * @param _tokenId uint256 ID of the token to be transferred\n */\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId)\n public\n canTransfer(_tokenId)\n {\n // solium-disable-next-line arg-overflow\n safeTransferFrom(_from, _to, _tokenId, \"\");\n }\n\n /**\n * @dev Safely transfers the ownership of a given token ID to another address\n * @dev If the target address is a contract, it must implement `onERC721Received`,\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onERC721Received(address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n * @dev Requires the msg sender to be the owner, approved, or operator\n * @param _from current owner of the token\n * @param _to address to receive the ownership of the given token ID\n * @param _tokenId uint256 ID of the token to be transferred\n * @param _data bytes data to send along with a safe transfer check\n */\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes _data)\n public\n canTransfer(_tokenId)\n {\n transferFrom(_from, _to, _tokenId);\n // solium-disable-next-line arg-overflow\n require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data));\n }\n\n /**\n * @dev Returns whether the given spender can transfer a given token ID\n * @param _spender address of the spender to query\n * @param _tokenId uint256 ID of the token to be transferred\n * @return bool whether the msg.sender is approved for the given token ID,\n * is an operator of the owner, or is the owner of the token\n */\n function isApprovedOrOwner(address _spender, uint256 _tokenId)\n internal\n view\n returns (bool)\n {\n address owner = ownerOf(_tokenId);\n return _spender == owner || getApproved(_tokenId) == _spender || isApprovedForAll(owner, _spender);\n }\n\n /**\n * @dev Internal function to mint a new token\n * @dev Reverts if the given token ID already exists\n * @param _to The address that will own the minted token\n * @param _tokenId uint256 ID of the token to be minted by the msg.sender\n */\n function _mint(address _to, uint256 _tokenId)\n internal\n {\n require(_to != address(0));\n addTokenTo(_to, _tokenId);\n emit Transfer(address(0), _to, _tokenId);\n }\n\n /**\n * @dev Internal function to burn a specific token\n * @dev Reverts if the token does not exist\n * @param _tokenId uint256 ID of the token being burned by the msg.sender\n */\n function _burn(address _owner, uint256 _tokenId)\n internal\n {\n clearApproval(_owner, _tokenId);\n removeTokenFrom(_owner, _tokenId);\n emit Transfer(_owner, address(0), _tokenId);\n }\n\n /**\n * @dev Internal function to clear current approval of a given token ID\n * @dev Reverts if the given address is not indeed the owner of the token\n * @param _owner owner of the token\n * @param _tokenId uint256 ID of the token to be transferred\n */\n function clearApproval(address _owner, uint256 _tokenId)\n internal\n {\n require(ownerOf(_tokenId) == _owner);\n if (tokenApprovals[_tokenId] != address(0)) {\n tokenApprovals[_tokenId] = address(0);\n emit Approval(_owner, address(0), _tokenId);\n }\n }\n\n /**\n * @dev Internal function to add a token ID to the list of a given address\n * @param _to address representing the new owner of the given token ID\n * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function addTokenTo(address _to, uint256 _tokenId)\n internal\n {\n require(tokenOwner[_tokenId] == address(0));\n tokenOwner[_tokenId] = _to;\n ownedTokensCount[_to] = safeAdd(ownedTokensCount[_to], 1);\n }\n\n /**\n * @dev Internal function to remove a token ID from the list of a given address\n * @param _from address representing the previous owner of the given token ID\n * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function removeTokenFrom(address _from, uint256 _tokenId)\n internal\n {\n require(ownerOf(_tokenId) == _from);\n ownedTokensCount[_from] = safeSub(ownedTokensCount[_from], 1);\n tokenOwner[_tokenId] = address(0);\n }\n\n /**\n * @dev Internal function to invoke `onERC721Received` on a target address\n * @dev The call is not executed if the target address is not a contract\n * @param _from address representing the previous owner of the given token ID\n * @param _to target address that will receive the tokens\n * @param _tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return whether the call correctly returned the expected magic value\n */\n function checkAndCallSafeTransfer(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes _data)\n internal\n returns (bool)\n {\n if (!isContract(_to)) {\n return true;\n }\n bytes4 retval = IERC721Receiver(_to).onERC721Received(_from, _tokenId, _data);\n return (retval == ERC721_RECEIVED);\n }\n\n function isContract(address addr)\n internal\n view\n returns (bool)\n {\n uint256 size;\n // XXX Currently there is no better way to check if there is a contract in an address\n // than to check the size of the code at that address.\n // See https://ethereum.stackexchange.com/a/14016/36603\n // for more details about how this works.\n // TODO Check this again before the Serenity release, because all addresses will be\n // contracts then.\n assembly { size := extcodesize(addr) } // solium-disable-line security/no-inline-assembly\n return size > 0;\n }\n}\n", - "2.0.0/tokens/ERC721Token/IERC721Receiver.sol": "/*\nThe MIT License (MIT)\n\nCopyright (c) 2016 Smart Contract Solutions, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\npragma solidity 0.4.24;\n\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * rom ERC721 asset contracts.\n * Modified from https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/ERC721/ERC721Receiver.sol\n */\ncontract IERC721Receiver {\n /**\n * @dev Magic value to be returned upon successful reception of an NFT\n * Equals to `bytes4(keccak256(\"onERC721Received(address,uint256,bytes)\"))`,\n * which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`\n */\n bytes4 constant internal ERC721_RECEIVED = 0xf0b9e5ba;\n\n /**\n * @notice Handle the receipt of an NFT\n * @dev The ERC721 smart contract calls this function on the recipient\n * after a `safetransfer`. This function MAY throw to revert and reject the\n * transfer. This function MUST use 50,000 gas or less. Return of other\n * than the magic value MUST result in the transaction being reverted.\n * Note: the contract address is always the message sender.\n * @param _from The sending address\n * @param _tokenId The NFT identifier which is being transfered\n * @param _data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC721Received(address,uint256,bytes)\"))`\n */\n function onERC721Received(\n address _from,\n uint256 _tokenId,\n bytes _data)\n public\n returns (bytes4);\n}\n", - "2.0.0/tokens/ERC721Token/IERC721Token.sol": "/*\nThe MIT License (MIT)\n\nCopyright (c) 2016 Smart Contract Solutions, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\npragma solidity 0.4.24;\n\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic interface\n * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md\n * Modified from https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/ERC721/ERC721Basic.sol\n */\ncontract IERC721Token {\n string internal name_;\n string internal symbol_;\n\n event Transfer(\n address indexed _from,\n address indexed _to,\n uint256 _tokenId\n );\n\n event Approval(\n address indexed _owner,\n address indexed _approved,\n uint256 _tokenId\n );\n\n event ApprovalForAll(\n address indexed _owner,\n address indexed _operator,\n bool _approved\n );\n\n function name()\n public\n view\n returns (string);\n\n function symbol()\n public\n view\n returns (string);\n\n function balanceOf(address _owner)\n public\n view\n returns (uint256 _balance);\n\n function ownerOf(uint256 _tokenId)\n public\n view\n returns (address _owner);\n\n function exists(uint256 _tokenId)\n public\n view\n returns (bool _exists);\n\n function approve(address _to, uint256 _tokenId)\n public;\n\n function getApproved(uint256 _tokenId)\n public\n view\n returns (address _operator);\n\n function setApprovalForAll(address _operator, bool _approved)\n public;\n\n function isApprovedForAll(address _owner, address _operator)\n public\n view\n returns (bool);\n\n function transferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n )\n public;\n\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId\n )\n public;\n\n function safeTransferFrom(\n address _from,\n address _to,\n uint256 _tokenId,\n bytes _data\n )\n public;\n}\n", - "2.0.0/utils/SafeMath/SafeMath.sol": "pragma solidity 0.4.24;\n\n\ncontract SafeMath {\n function safeMul(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n require(\n c / a == b,\n \"UINT256_OVERFLOW\"\n );\n return c;\n }\n\n function safeDiv(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n uint256 c = a / b;\n return c;\n }\n\n function safeSub(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n require(\n b <= a,\n \"UINT256_UNDERFLOW\"\n );\n return a - b;\n }\n\n function safeAdd(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n uint256 c = a + b;\n require(\n c >= a,\n \"UINT256_OVERFLOW\"\n );\n return c;\n }\n\n function max64(uint64 a, uint64 b)\n internal\n pure\n returns (uint256)\n {\n return a >= b ? a : b;\n }\n\n function min64(uint64 a, uint64 b)\n internal\n pure\n returns (uint256)\n {\n return a < b ? a : b;\n }\n\n function max256(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n return a >= b ? a : b;\n }\n\n function min256(uint256 a, uint256 b)\n internal\n pure\n returns (uint256)\n {\n return a < b ? a : b;\n }\n}\n" - }, - "sourceTreeHashHex": "0x3ec335d79ccc32077f0e27d3f570045c7e8434ce2c2d6bfdff32fce9a578ac57", - "compiler": { - "name": "solc", - "version": "soljson-v0.4.24+commit.e67f0147.js", - "settings": { - "optimizer": { - "enabled": true, - "runs": 1000000 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode.object", - "evm.bytecode.sourceMap", - "evm.deployedBytecode.object", - "evm.deployedBytecode.sourceMap" - ] - } - } - } - }, - "networks": {} -} \ No newline at end of file diff --git a/packages/migrations/artifacts/2.0.0/Exchange.json b/packages/migrations/artifacts/2.0.0/Exchange.json index 690f4ba9e..ce7a0e4c7 100644 --- a/packages/migrations/artifacts/2.0.0/Exchange.json +++ b/packages/migrations/artifacts/2.0.0/Exchange.json @@ -2229,11 +2229,5 @@ } } }, - "networks": { - "50": { - "address": "0x48bacb9266a570d521063ef5dd96e61686dbe788", - "links": {}, - "constructorArgs": "[\"0xf47261b0000000000000000000000000871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c\"]" - } - } -} \ No newline at end of file + "networks": {} +} diff --git a/packages/migrations/artifacts/2.0.0/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json b/packages/migrations/artifacts/2.0.0/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json deleted file mode 100644 index 688b984da..000000000 --- a/packages/migrations/artifacts/2.0.0/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.json +++ /dev/null @@ -1,723 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "owners", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "removeOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "revokeConfirmation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "isOwner", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - }, - { - "name": "", - "type": "address" - } - ], - "name": "confirmations", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "secondsTimeLocked", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "data", - "type": "bytes" - } - ], - "name": "isFunctionRemoveAuthorizedAddress", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "executeRemoveAuthorizedAddress", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "addOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "isConfirmed", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_secondsTimeLocked", - "type": "uint256" - } - ], - "name": "changeTimeLock", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmationCount", - "outputs": [ - { - "name": "count", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "transactions", - "outputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - }, - { - "name": "executed", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOwners", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "from", - "type": "uint256" - }, - { - "name": "to", - "type": "uint256" - }, - { - "name": "pending", - "type": "bool" - }, - { - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionIds", - "outputs": [ - { - "name": "_transactionIds", - "type": "uint256[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "TOKEN_TRANSFER_PROXY_CONTRACT", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "getConfirmations", - "outputs": [ - { - "name": "_confirmations", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "transactionCount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_required", - "type": "uint256" - } - ], - "name": "changeRequirement", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "confirmTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "destination", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - }, - { - "name": "data", - "type": "bytes" - } - ], - "name": "submitTransaction", - "outputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "uint256" - } - ], - "name": "confirmationTimes", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_OWNER_COUNT", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "required", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "newOwner", - "type": "address" - } - ], - "name": "replaceOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "transactionId", - "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "name": "_owners", - "type": "address[]" - }, - { - "name": "_required", - "type": "uint256" - }, - { - "name": "_secondsTimeLocked", - "type": "uint256" - }, - { - "name": "_tokenTransferProxy", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - }, - { - "indexed": false, - "name": "confirmationTime", - "type": "uint256" - } - ], - "name": "ConfirmationTimeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "secondsTimeLocked", - "type": "uint256" - } - ], - "name": "TimeLockChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Confirmation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Revocation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Submission", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "Execution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "transactionId", - "type": "uint256" - } - ], - "name": "ExecutionFailure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerAddition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "OwnerRemoval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "required", - "type": "uint256" - } - ], - "name": "RequirementChange", - "type": "event" - } - ], - "evm": { - "bytecode": { - "linkReferences": {}, - "object": "0x60806040523480156200001157600080fd5b5060405162002022380380620020228339810160409081528151602083015191830151606084015191909301805190939190849084908490839083906000908260328211806200006057508181115b806200006a575080155b8062000074575081155b156200007f57600080fd5b600092505b84518310156200015357600260008685815181101515620000a157fe5b6020908102909101810151600160a060020a031682528101919091526040016000205460ff1680620000f457508483815181101515620000dd57fe5b90602001906020020151600160a060020a03166000145b15620000ff57600080fd5b60016002600087868151811015156200011457fe5b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff19169115159190911790556001929092019162000084565b845162000168906003906020880190620001a2565b5050506004919091555050600655505060088054600160a060020a031916600160a060020a03929092169190911790555062000236915050565b828054828255906000526020600020908101928215620001fa579160200282015b82811115620001fa5782518254600160a060020a031916600160a060020a03909116178255602090920191600190910190620001c3565b50620002089291506200020c565b5090565b6200023391905b8082111562000208578054600160a060020a031916815560010162000213565b90565b611ddc80620002466000396000f30060806040526004361061015e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c2781146101a0578063173825d9146101e157806320ea8d861461020f5780632f54bf6e146102275780633411c81c1461026957806337bd78a01461029a57806354741525146102c1578063553a48fd146102e05780635711b311146103395780637065cb4814610351578063784547a71461037f5780637ad28c51146103975780638b51d13f146103af5780639ace38c2146103c7578063a0e67e2b1461049c578063a8abe69a14610501578063add1cbc514610526578063b5dc40c31461053b578063b77bf60014610553578063ba51a6df14610568578063c01a8c8414610580578063c642747414610598578063d38f2d821461060e578063d74f8edd14610626578063dc8452cd1461063b578063e20056e614610650578063ee22610b14610684575b600034111561019e5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b3480156101ac57600080fd5b506101b860043561069c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101ed57600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff600435166106d1565b34801561021b57600080fd5b5061019e600435610928565b34801561023357600080fd5b5061025573ffffffffffffffffffffffffffffffffffffffff60043516610a15565b604080519115158252519081900360200190f35b34801561027557600080fd5b5061025560043573ffffffffffffffffffffffffffffffffffffffff60243516610a2a565b3480156102a657600080fd5b506102af610a4a565b60408051918252519081900360200190f35b3480156102cd57600080fd5b506102af60043515156024351515610a50565b3480156102ec57600080fd5b506040805160206004803580820135601f8101849004840285018401909552848452610255943694929360249392840191908190840183828082843750949750610abc9650505050505050565b34801561034557600080fd5b5061019e600435610bc7565b34801561035d57600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff60043516610e90565b34801561038b57600080fd5b50610255600435610ffd565b3480156103a357600080fd5b5061019e600435611087565b3480156103bb57600080fd5b506102af6004356110ce565b3480156103d357600080fd5b506103df60043561114a565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561045e578181015183820152602001610446565b50505050905090810190601f16801561048b5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b3480156104a857600080fd5b506104b1611233565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104ed5781810151838201526020016104d5565b505050509050019250505060405180910390f35b34801561050d57600080fd5b506104b1600435602435604435151560643515156112a3565b34801561053257600080fd5b506101b86113dc565b34801561054757600080fd5b506104b16004356113f8565b34801561055f57600080fd5b506102af6115a5565b34801561057457600080fd5b5061019e6004356115ab565b34801561058c57600080fd5b5061019e600435611622565b3480156105a457600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102af94823573ffffffffffffffffffffffffffffffffffffffff169460248035953695946064949201919081908401838280828437509497506117349650505050505050565b34801561061a57600080fd5b506102af600435611753565b34801561063257600080fd5b506102af611765565b34801561064757600080fd5b506102af61176a565b34801561065c57600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff60043581169060243516611770565b34801561069057600080fd5b5061019e600435611980565b60038054829081106106aa57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60003330146106df57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054829060ff16151561071557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905591505b6003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01821015610898578273ffffffffffffffffffffffffffffffffffffffff166003838154811015156107b557fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561088d57600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061080d57fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff909216918490811061084057fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610898565b600190910190610763565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906108c99082611cef565b5060035460045411156108e2576003546108e2906115ab565b60405173ffffffffffffffffffffffffffffffffffffffff8416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff16151561094657600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561097257600080fd5b600084815260208190526040902060030154849060ff161561099357600080fd5b8461099d81610ffd565b156109a757600080fd5b600086815260016020908152604080832033808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555188927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a3505050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b60065481565b6000805b600554811015610ab557838015610a7d575060008181526020819052604090206003015460ff16155b80610aa15750828015610aa1575060008181526020819052604090206003015460ff165b15610aad576001820191505b600101610a54565b5092915050565b604080517f72656d6f7665417574686f72697a65644164647265737328616464726573732981529051908190036020019020600090815b6004811015610bbb57818160048110610b0857fe5b1a7f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168482815181101515610b5b57fe5b6020910101517f010000000000000000000000000000000000000000000000000000000000000090819004027fff000000000000000000000000000000000000000000000000000000000000001614610bb357600080fd5b600101610af3565b600192505b5050919050565b600081815260208190526040812060030154829060ff1615610be857600080fd5b82610bf281610ffd565b1515610bfd57600080fd5b6000848152602081905260409020600854815486929173ffffffffffffffffffffffffffffffffffffffff918216911614610c3757600080fd5b600281810180546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190931694909404601f8101839004830285018301909152808452610cea939291830182828015610ce05780601f10610cb557610100808354040283529160200191610ce0565b820191906000526020600020905b815481529060010190602001808311610cc357829003601f168201915b5050505050610abc565b1515610cf557600080fd5b600086815260208190526040908190206003810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815481830154935160028085018054959b5073ffffffffffffffffffffffffffffffffffffffff909316959492939192839285927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff918316156101000291909101909116048015610de75780601f10610dbc57610100808354040283529160200191610de7565b820191906000526020600020905b815481529060010190602001808311610dca57829003601f168201915b505091505060006040518083038185875af19250505015610e325760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2610e88565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a26003850180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b505050505050565b333014610e9c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054819060ff1615610ed157600080fd5b8173ffffffffffffffffffffffffffffffffffffffff81161515610ef457600080fd5b6003805490506001016004546032821180610f0e57508181115b80610f17575080155b80610f20575081155b15610f2a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff851660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610bc0576000848152600160205260408120600380549192918490811061102b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff161561106c576001820191505b60045482141561107f5760019250610bc0565b600101611002565b33301461109357600080fd5b60068190556040805182815290517fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b43779181900360200190a150565b6000805b60035481101561114457600083815260016020526040812060038054919291849081106110fb57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff161561113c576001820191505b6001016110d2565b50919050565b60006020818152918152604090819020805460018083015460028085018054875161010095821615959095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff011691909104601f810188900488028401880190965285835273ffffffffffffffffffffffffffffffffffffffff909316959094919291908301828280156112205780601f106111f557610100808354040283529160200191611220565b820191906000526020600020905b81548152906001019060200180831161120357829003601f168201915b5050506003909301549192505060ff1684565b6060600380548060200260200160405190810160405280929190818152602001828054801561129857602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161126d575b505050505090505b90565b6060806000806005546040519080825280602002602001820160405280156112d5578160200160208202803883390190505b50925060009150600090505b60055481101561135c5785801561130a575060008181526020819052604090206003015460ff16155b8061132e575084801561132e575060008181526020819052604090206003015460ff165b156113545780838381518110151561134257fe5b60209081029091010152600191909101905b6001016112e1565b878703604051908082528060200260200182016040528015611388578160200160208202803883390190505b5093508790505b868110156113d15782818151811015156113a557fe5b90602001906020020151848983038151811015156113bf57fe5b6020908102909101015260010161138f565b505050949350505050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60608060008060038054905060405190808252806020026020018201604052801561142d578160200160208202803883390190505b50925060009150600090505b600354811015611511576000858152600160205260408120600380549192918490811061146257fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff16156115095760038054829081106114aa57fe5b600091825260209091200154835173ffffffffffffffffffffffffffffffffffffffff909116908490849081106114dd57fe5b73ffffffffffffffffffffffffffffffffffffffff909216602092830290910190910152600191909101905b600101611439565b8160405190808252806020026020018201604052801561153b578160200160208202803883390190505b509350600090505b8181101561159d57828181518110151561155957fe5b90602001906020020151848281518110151561157157fe5b73ffffffffffffffffffffffffffffffffffffffff909216602092830290910190910152600101611543565b505050919050565b60055481565b3330146115b757600080fd5b6003548160328211806115c957508181115b806115d2575080155b806115db575081155b156115e557600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff16151561164057600080fd5b600082815260208190526040902054829073ffffffffffffffffffffffffffffffffffffffff16151561167257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561169d57600080fd5b846116a781610ffd565b156116b157600080fd5b600086815260016020818152604080842033808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909317909255905188927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a361172586610ffd565b15610e8857610e888642611b71565b6000611741848484611bbc565b905061174c81611622565b9392505050565b60076020526000908152604090205481565b603281565b60045481565b600033301461177e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff1615156117b457600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff16156117e957600080fd5b600092505b6003548310156118ae578473ffffffffffffffffffffffffffffffffffffffff1660038481548110151561181e57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156118a3578360038481548110151561185657fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506118ae565b6001909201916117ee565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a260405173ffffffffffffffffffffffffffffffffffffffff8516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff16156119a157600080fd5b826119ab81610ffd565b15156119b657600080fd5b6006546000858152600760205260409020548591014210156119d757600080fd5b600085815260208190526040908190206003810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815481830154935160028085018054959a5073ffffffffffffffffffffffffffffffffffffffff909316959492939192839285927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff918316156101000291909101909116048015611ac95780601f10611a9e57610100808354040283529160200191611ac9565b820191906000526020600020905b815481529060010190602001808311611aac57829003601f168201915b505091505060006040518083038185875af19250505015611b145760405185907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611b6a565b60405185907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a26003840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b5050505050565b6000828152600760209081526040918290208390558151838152915184927f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d92908290030190a25050565b60008373ffffffffffffffffffffffffffffffffffffffff81161515611be157600080fd5b6005546040805160808101825273ffffffffffffffffffffffffffffffffffffffff8881168252602080830189815283850189815260006060860181905287815280845295909520845181547fffffffffffffffffffffffff00000000000000000000000000000000000000001694169390931783555160018301559251805194965091939092611c79926002850192910190611d18565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b815481835581811115611d1357600083815260209020611d13918101908301611d96565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611d5957805160ff1916838001178555611d86565b82800160010185558215611d86579182015b82811115611d86578251825591602001919060010190611d6b565b50611d92929150611d96565b5090565b6112a091905b80821115611d925760008155600101611d9c5600a165627a7a72305820b0c6506d0fc9b060ffe32b6c63d7cd004f2b856ad475bd69ce365ba1fb7454ac0029", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH3 0x2022 CODESIZE SUB DUP1 PUSH3 0x2022 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 SWAP1 DUP2 MSTORE DUP2 MLOAD PUSH1 0x20 DUP4 ADD MLOAD SWAP2 DUP4 ADD MLOAD PUSH1 0x60 DUP5 ADD MLOAD SWAP2 SWAP1 SWAP4 ADD DUP1 MLOAD SWAP1 SWAP4 SWAP2 SWAP1 DUP5 SWAP1 DUP5 SWAP1 DUP5 SWAP1 DUP4 SWAP1 DUP4 SWAP1 PUSH1 0x0 SWAP1 DUP3 PUSH1 0x32 DUP3 GT DUP1 PUSH3 0x60 JUMPI POP DUP2 DUP2 GT JUMPDEST DUP1 PUSH3 0x6A JUMPI POP DUP1 ISZERO JUMPDEST DUP1 PUSH3 0x74 JUMPI POP DUP2 ISZERO JUMPDEST ISZERO PUSH3 0x7F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP3 POP JUMPDEST DUP5 MLOAD DUP4 LT ISZERO PUSH3 0x153 JUMPI PUSH1 0x2 PUSH1 0x0 DUP7 DUP6 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH3 0xA1 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP3 MSTORE DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 ADD PUSH1 0x0 KECCAK256 SLOAD PUSH1 0xFF AND DUP1 PUSH3 0xF4 JUMPI POP DUP5 DUP4 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH3 0xDD JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 EQ JUMPDEST ISZERO PUSH3 0xFF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x2 PUSH1 0x0 DUP8 DUP7 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH3 0x114 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP2 SWAP1 SWAP2 ADD DUP2 ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP3 MSTORE DUP2 ADD SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 ADD PUSH1 0x0 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x1 SWAP3 SWAP1 SWAP3 ADD SWAP2 PUSH3 0x84 JUMP JUMPDEST DUP5 MLOAD PUSH3 0x168 SWAP1 PUSH1 0x3 SWAP1 PUSH1 0x20 DUP9 ADD SWAP1 PUSH3 0x1A2 JUMP JUMPDEST POP POP POP PUSH1 0x4 SWAP2 SWAP1 SWAP2 SSTORE POP POP PUSH1 0x6 SSTORE POP POP PUSH1 0x8 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE POP PUSH3 0x236 SWAP2 POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD DUP3 DUP3 SSTORE SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 DUP2 ADD SWAP3 DUP3 ISZERO PUSH3 0x1FA JUMPI SWAP2 PUSH1 0x20 MUL DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0x1FA JUMPI DUP3 MLOAD DUP3 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP2 AND OR DUP3 SSTORE PUSH1 0x20 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH3 0x1C3 JUMP JUMPDEST POP PUSH3 0x208 SWAP3 SWAP2 POP PUSH3 0x20C JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH3 0x233 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0x208 JUMPI DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0x213 JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH2 0x1DDC DUP1 PUSH3 0x246 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x15E JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x25E7C27 DUP2 EQ PUSH2 0x1A0 JUMPI DUP1 PUSH4 0x173825D9 EQ PUSH2 0x1E1 JUMPI DUP1 PUSH4 0x20EA8D86 EQ PUSH2 0x20F JUMPI DUP1 PUSH4 0x2F54BF6E EQ PUSH2 0x227 JUMPI DUP1 PUSH4 0x3411C81C EQ PUSH2 0x269 JUMPI DUP1 PUSH4 0x37BD78A0 EQ PUSH2 0x29A JUMPI DUP1 PUSH4 0x54741525 EQ PUSH2 0x2C1 JUMPI DUP1 PUSH4 0x553A48FD EQ PUSH2 0x2E0 JUMPI DUP1 PUSH4 0x5711B311 EQ PUSH2 0x339 JUMPI DUP1 PUSH4 0x7065CB48 EQ PUSH2 0x351 JUMPI DUP1 PUSH4 0x784547A7 EQ PUSH2 0x37F JUMPI DUP1 PUSH4 0x7AD28C51 EQ PUSH2 0x397 JUMPI DUP1 PUSH4 0x8B51D13F EQ PUSH2 0x3AF JUMPI DUP1 PUSH4 0x9ACE38C2 EQ PUSH2 0x3C7 JUMPI DUP1 PUSH4 0xA0E67E2B EQ PUSH2 0x49C JUMPI DUP1 PUSH4 0xA8ABE69A EQ PUSH2 0x501 JUMPI DUP1 PUSH4 0xADD1CBC5 EQ PUSH2 0x526 JUMPI DUP1 PUSH4 0xB5DC40C3 EQ PUSH2 0x53B JUMPI DUP1 PUSH4 0xB77BF600 EQ PUSH2 0x553 JUMPI DUP1 PUSH4 0xBA51A6DF EQ PUSH2 0x568 JUMPI DUP1 PUSH4 0xC01A8C84 EQ PUSH2 0x580 JUMPI DUP1 PUSH4 0xC6427474 EQ PUSH2 0x598 JUMPI DUP1 PUSH4 0xD38F2D82 EQ PUSH2 0x60E JUMPI DUP1 PUSH4 0xD74F8EDD EQ PUSH2 0x626 JUMPI DUP1 PUSH4 0xDC8452CD EQ PUSH2 0x63B JUMPI DUP1 PUSH4 0xE20056E6 EQ PUSH2 0x650 JUMPI DUP1 PUSH4 0xEE22610B EQ PUSH2 0x684 JUMPI JUMPDEST PUSH1 0x0 CALLVALUE GT ISZERO PUSH2 0x19E JUMPI PUSH1 0x40 DUP1 MLOAD CALLVALUE DUP2 MSTORE SWAP1 MLOAD CALLER SWAP2 PUSH32 0xE1FFFCC4923D04B559F4D29A8BFC6CDA04EB5B0D3C460751C2402C5C5CC9109C SWAP2 SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG2 JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1AC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B8 PUSH1 0x4 CALLDATALOAD PUSH2 0x69C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x6D1 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x21B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x928 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x233 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x255 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0xA15 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x275 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x255 PUSH1 0x4 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x24 CALLDATALOAD AND PUSH2 0xA2A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2A6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH2 0xA4A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH1 0x4 CALLDATALOAD ISZERO ISZERO PUSH1 0x24 CALLDATALOAD ISZERO ISZERO PUSH2 0xA50 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2EC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x4 DUP1 CALLDATALOAD DUP1 DUP3 ADD CALLDATALOAD PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP6 ADD DUP5 ADD SWAP1 SWAP6 MSTORE DUP5 DUP5 MSTORE PUSH2 0x255 SWAP5 CALLDATASIZE SWAP5 SWAP3 SWAP4 PUSH1 0x24 SWAP4 SWAP3 DUP5 ADD SWAP2 SWAP1 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY POP SWAP5 SWAP8 POP PUSH2 0xABC SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x345 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0xBC7 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x35D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0xE90 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x38B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x255 PUSH1 0x4 CALLDATALOAD PUSH2 0xFFD JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3A3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x1087 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH1 0x4 CALLDATALOAD PUSH2 0x10CE JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3D3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3DF PUSH1 0x4 CALLDATALOAD PUSH2 0x114A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP4 ISZERO ISZERO ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP5 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x45E JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x446 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x48B JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4A8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4B1 PUSH2 0x1233 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 DUP2 ADD SWAP2 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x4ED JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x4D5 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x50D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4B1 PUSH1 0x4 CALLDATALOAD PUSH1 0x24 CALLDATALOAD PUSH1 0x44 CALLDATALOAD ISZERO ISZERO PUSH1 0x64 CALLDATALOAD ISZERO ISZERO PUSH2 0x12A3 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x532 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B8 PUSH2 0x13DC JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x547 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4B1 PUSH1 0x4 CALLDATALOAD PUSH2 0x13F8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x55F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH2 0x15A5 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x574 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x15AB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x58C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x1622 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x4 PUSH1 0x44 CALLDATALOAD DUP2 DUP2 ADD CALLDATALOAD PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP6 ADD DUP5 ADD SWAP1 SWAP6 MSTORE DUP5 DUP5 MSTORE PUSH2 0x2AF SWAP5 DUP3 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP5 PUSH1 0x24 DUP1 CALLDATALOAD SWAP6 CALLDATASIZE SWAP6 SWAP5 PUSH1 0x64 SWAP5 SWAP3 ADD SWAP2 SWAP1 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY POP SWAP5 SWAP8 POP PUSH2 0x1734 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x61A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH1 0x4 CALLDATALOAD PUSH2 0x1753 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x632 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH2 0x1765 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x647 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH2 0x176A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x65C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x1770 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x690 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x1980 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD DUP3 SWAP1 DUP2 LT PUSH2 0x6AA JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 JUMP JUMPDEST PUSH1 0x0 CALLER ADDRESS EQ PUSH2 0x6DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x715 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE SWAP2 POP JUMPDEST PUSH1 0x3 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD DUP3 LT ISZERO PUSH2 0x898 JUMPI DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 DUP4 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x7B5 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x88D JUMPI PUSH1 0x3 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 ADD SWAP1 DUP2 LT PUSH2 0x80D JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x3 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x840 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH2 0x898 JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x763 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD SWAP1 PUSH2 0x8C9 SWAP1 DUP3 PUSH2 0x1CEF JUMP JUMPDEST POP PUSH1 0x3 SLOAD PUSH1 0x4 SLOAD GT ISZERO PUSH2 0x8E2 JUMPI PUSH1 0x3 SLOAD PUSH2 0x8E2 SWAP1 PUSH2 0x15AB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND SWAP1 PUSH32 0x8001553A916EF2F495D26A907CC54D96ED840D7BDA71E73194BF5A9DF7A76B90 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x946 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP4 SWAP2 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x972 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD DUP5 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x993 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH2 0x99D DUP2 PUSH2 0xFFD JUMP JUMPDEST ISZERO PUSH2 0x9A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE MLOAD DUP9 SWAP3 PUSH32 0xF6A317157440607F36269043EB55F1287A5A19BA2216AFEAB88CD46CBCFB88E9 SWAP2 LOG3 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x6 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH1 0x5 SLOAD DUP2 LT ISZERO PUSH2 0xAB5 JUMPI DUP4 DUP1 ISZERO PUSH2 0xA7D JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND ISZERO JUMPDEST DUP1 PUSH2 0xAA1 JUMPI POP DUP3 DUP1 ISZERO PUSH2 0xAA1 JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0xAAD JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x1 ADD PUSH2 0xA54 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0x72656D6F7665417574686F72697A656441646472657373286164647265737329 DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 KECCAK256 PUSH1 0x0 SWAP1 DUP2 JUMPDEST PUSH1 0x4 DUP2 LT ISZERO PUSH2 0xBBB JUMPI DUP2 DUP2 PUSH1 0x4 DUP2 LT PUSH2 0xB08 JUMPI INVALID JUMPDEST BYTE PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 MUL PUSH31 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP5 DUP3 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0xB5B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP2 ADD ADD MLOAD PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 SWAP1 DUP2 SWAP1 DIV MUL PUSH32 0xFF00000000000000000000000000000000000000000000000000000000000000 AND EQ PUSH2 0xBB3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x1 SWAP3 POP JUMPDEST POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 ADD SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0xBE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 PUSH2 0xBF2 DUP2 PUSH2 0xFFD JUMP JUMPDEST ISZERO ISZERO PUSH2 0xBFD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x8 SLOAD DUP2 SLOAD DUP7 SWAP3 SWAP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP3 AND SWAP2 AND EQ PUSH2 0xC37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 DUP2 DUP2 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1 DUP5 AND ISZERO PUSH2 0x100 MUL PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD SWAP1 SWAP4 AND SWAP5 SWAP1 SWAP5 DIV PUSH1 0x1F DUP2 ADD DUP4 SWAP1 DIV DUP4 MUL DUP6 ADD DUP4 ADD SWAP1 SWAP2 MSTORE DUP1 DUP5 MSTORE PUSH2 0xCEA SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xCE0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xCB5 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xCE0 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xCC3 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP PUSH2 0xABC JUMP JUMPDEST ISZERO ISZERO PUSH2 0xCF5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 PUSH1 0x3 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 SLOAD DUP2 DUP4 ADD SLOAD SWAP4 MLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD SWAP6 SWAP12 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP4 AND SWAP6 SWAP5 SWAP3 SWAP4 SWAP2 SWAP3 DUP4 SWAP3 DUP6 SWAP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP4 AND ISZERO PUSH2 0x100 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 AND DIV DUP1 ISZERO PUSH2 0xDE7 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xDBC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xDE7 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xDCA JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP SWAP2 POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP ISZERO PUSH2 0xE32 JUMPI PUSH1 0x40 MLOAD DUP7 SWAP1 PUSH32 0x33E13ECB54C3076D8E8BB8C2881800A4D972B792045FFAE98FDF46DF365FED75 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH2 0xE88 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP7 SWAP1 PUSH32 0x526441BB6C1ABA3C9A4A6CA1D6545DA9C2333C8C48343EF398EB858D72B79236 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH1 0x3 DUP6 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0xE9C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0xED1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO PUSH2 0xEF4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD SWAP1 POP PUSH1 0x1 ADD PUSH1 0x4 SLOAD PUSH1 0x32 DUP3 GT DUP1 PUSH2 0xF0E JUMPI POP DUP2 DUP2 GT JUMPDEST DUP1 PUSH2 0xF17 JUMPI POP DUP1 ISZERO JUMPDEST DUP1 PUSH2 0xF20 JUMPI POP DUP2 ISZERO JUMPDEST ISZERO PUSH2 0xF2A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x3 DUP1 SLOAD SWAP2 DUP3 ADD DUP2 SSTORE DUP4 MSTORE PUSH32 0xC2575A0E9E593C00F959F8C92F12DB2869C3395A3B0502D05E2516446F71F85B ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND DUP5 OR SWAP1 SSTORE MLOAD PUSH32 0xF39E6E1EB0EDCF53C221607B54B00CD28F3196FED0A24994DC308B8F611B682D SWAP2 SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0xBC0 JUMPI PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x102B JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x106C JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x4 SLOAD DUP3 EQ ISZERO PUSH2 0x107F JUMPI PUSH1 0x1 SWAP3 POP PUSH2 0xBC0 JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x1002 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x1093 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP2 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP3 DUP2 MSTORE SWAP1 MLOAD PUSH32 0xD1C9101A34FEFF75CCCEF14A28785A0279CB0B49C1F321F21F5F422E746B4377 SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0x1144 JUMPI PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x10FB JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x113C JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x10D2 JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP2 DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD DUP8 MLOAD PUSH2 0x100 SWAP6 DUP3 AND ISZERO SWAP6 SWAP1 SWAP6 MUL PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD AND SWAP2 SWAP1 SWAP2 DIV PUSH1 0x1F DUP2 ADD DUP9 SWAP1 DIV DUP9 MUL DUP5 ADD DUP9 ADD SWAP1 SWAP7 MSTORE DUP6 DUP4 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP4 AND SWAP6 SWAP1 SWAP5 SWAP2 SWAP3 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1220 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x11F5 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1220 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1203 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP PUSH1 0x3 SWAP1 SWAP4 ADD SLOAD SWAP2 SWAP3 POP POP PUSH1 0xFF AND DUP5 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x3 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x1298 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x126D JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x5 SLOAD PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x12D5 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST PUSH1 0x5 SLOAD DUP2 LT ISZERO PUSH2 0x135C JUMPI DUP6 DUP1 ISZERO PUSH2 0x130A JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND ISZERO JUMPDEST DUP1 PUSH2 0x132E JUMPI POP DUP5 DUP1 ISZERO PUSH2 0x132E JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0x1354 JUMPI DUP1 DUP4 DUP4 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1342 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 JUMPDEST PUSH1 0x1 ADD PUSH2 0x12E1 JUMP JUMPDEST DUP8 DUP8 SUB PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1388 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP4 POP DUP8 SWAP1 POP JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x13D1 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x13A5 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD DUP5 DUP10 DUP4 SUB DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x13BF JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x138F JUMP JUMPDEST POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x8 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x3 DUP1 SLOAD SWAP1 POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x142D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0x1511 JUMPI PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x1462 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x1509 JUMPI PUSH1 0x3 DUP1 SLOAD DUP3 SWAP1 DUP2 LT PUSH2 0x14AA JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP4 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND SWAP1 DUP5 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x14DD JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 JUMPDEST PUSH1 0x1 ADD PUSH2 0x1439 JUMP JUMPDEST DUP2 PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x153B JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP4 POP PUSH1 0x0 SWAP1 POP JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x159D JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1559 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD DUP5 DUP3 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1571 JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1543 JUMP JUMPDEST POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x5 SLOAD DUP2 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x15B7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 SLOAD DUP2 PUSH1 0x32 DUP3 GT DUP1 PUSH2 0x15C9 JUMPI POP DUP2 DUP2 GT JUMPDEST DUP1 PUSH2 0x15D2 JUMPI POP DUP1 ISZERO JUMPDEST DUP1 PUSH2 0x15DB JUMPI POP DUP2 ISZERO JUMPDEST ISZERO PUSH2 0x15E5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP4 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP5 DUP2 MSTORE SWAP1 MLOAD PUSH32 0xA3F1EE9126A074D9326C682F561767F710E927FAA811F7A99829D49DC421797A SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x1640 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO ISZERO PUSH2 0x1672 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP5 SWAP2 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x169D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH2 0x16A7 DUP2 PUSH2 0xFFD JUMP JUMPDEST ISZERO PUSH2 0x16B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 CALLER DUP1 DUP7 MSTORE SWAP3 MSTORE DUP1 DUP5 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SWAP4 OR SWAP1 SWAP3 SSTORE SWAP1 MLOAD DUP9 SWAP3 PUSH32 0x4A504A94899432A9846E1AA406DCEB1BCFD538BB839071D49D1E5E23F5BE30EF SWAP2 LOG3 PUSH2 0x1725 DUP7 PUSH2 0xFFD JUMP JUMPDEST ISZERO PUSH2 0xE88 JUMPI PUSH2 0xE88 DUP7 TIMESTAMP PUSH2 0x1B71 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1741 DUP5 DUP5 DUP5 PUSH2 0x1BBC JUMP JUMPDEST SWAP1 POP PUSH2 0x174C DUP2 PUSH2 0x1622 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x32 DUP2 JUMP JUMPDEST PUSH1 0x4 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 CALLER ADDRESS EQ PUSH2 0x177E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP4 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x17B4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP4 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x17E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP3 POP JUMPDEST PUSH1 0x3 SLOAD DUP4 LT ISZERO PUSH2 0x18AE JUMPI DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 DUP5 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x181E JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x18A3 JUMPI DUP4 PUSH1 0x3 DUP5 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1856 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH2 0x18AE JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP3 ADD SWAP2 PUSH2 0x17EE JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 SWAP1 DUP2 AND SWAP1 SWAP2 SSTORE SWAP4 DUP9 AND DUP3 MSTORE DUP1 DUP3 KECCAK256 DUP1 SLOAD SWAP1 SWAP5 AND PUSH1 0x1 OR SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 SWAP2 PUSH32 0x8001553A916EF2F495D26A907CC54D96ED840D7BDA71E73194BF5A9DF7A76B90 SWAP2 LOG2 PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP1 PUSH32 0xF39E6E1EB0EDCF53C221607B54B00CD28F3196FED0A24994DC308B8F611B682D SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 ADD SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x19A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 PUSH2 0x19AB DUP2 PUSH2 0xFFD JUMP JUMPDEST ISZERO ISZERO PUSH2 0x19B6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP6 SWAP2 ADD TIMESTAMP LT ISZERO PUSH2 0x19D7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 PUSH1 0x3 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 SLOAD DUP2 DUP4 ADD SLOAD SWAP4 MLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD SWAP6 SWAP11 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP4 AND SWAP6 SWAP5 SWAP3 SWAP4 SWAP2 SWAP3 DUP4 SWAP3 DUP6 SWAP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP4 AND ISZERO PUSH2 0x100 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 AND DIV DUP1 ISZERO PUSH2 0x1AC9 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1A9E JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1AC9 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1AAC JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP SWAP2 POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP ISZERO PUSH2 0x1B14 JUMPI PUSH1 0x40 MLOAD DUP6 SWAP1 PUSH32 0x33E13ECB54C3076D8E8BB8C2881800A4D972B792045FFAE98FDF46DF365FED75 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH2 0x1B6A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP6 SWAP1 PUSH32 0x526441BB6C1ABA3C9A4A6CA1D6545DA9C2333C8C48343EF398EB858D72B79236 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH1 0x3 DUP5 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP4 SWAP1 SSTORE DUP2 MLOAD DUP4 DUP2 MSTORE SWAP2 MLOAD DUP5 SWAP3 PUSH32 0xB237AFE65F1514FD7EA3F923EA4FE792BDD07000A912B6CD1602A8E7F573C8D SWAP3 SWAP1 DUP3 SWAP1 SUB ADD SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO PUSH2 0x1BE1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x5 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP9 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD DUP10 DUP2 MSTORE DUP4 DUP6 ADD DUP10 DUP2 MSTORE PUSH1 0x0 PUSH1 0x60 DUP7 ADD DUP2 SWAP1 MSTORE DUP8 DUP2 MSTORE DUP1 DUP5 MSTORE SWAP6 SWAP1 SWAP6 KECCAK256 DUP5 MLOAD DUP2 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP5 AND SWAP4 SWAP1 SWAP4 OR DUP4 SSTORE MLOAD PUSH1 0x1 DUP4 ADD SSTORE SWAP3 MLOAD DUP1 MLOAD SWAP5 SWAP7 POP SWAP2 SWAP4 SWAP1 SWAP3 PUSH2 0x1C79 SWAP3 PUSH1 0x2 DUP6 ADD SWAP3 SWAP2 ADD SWAP1 PUSH2 0x1D18 JUMP JUMPDEST POP PUSH1 0x60 SWAP2 SWAP1 SWAP2 ADD MLOAD PUSH1 0x3 SWAP1 SWAP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x5 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE PUSH1 0x40 MLOAD DUP3 SWAP1 PUSH32 0xC0BA8FE4B176C1714197D43B9CC6BCF797A4A7461C5FE8D0EF6E184AE7601E51 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP2 SLOAD DUP2 DUP4 SSTORE DUP2 DUP2 GT ISZERO PUSH2 0x1D13 JUMPI PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 PUSH2 0x1D13 SWAP2 DUP2 ADD SWAP1 DUP4 ADD PUSH2 0x1D96 JUMP JUMPDEST POP POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x1D59 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x1D86 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x1D86 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x1D86 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x1D6B JUMP JUMPDEST POP PUSH2 0x1D92 SWAP3 SWAP2 POP PUSH2 0x1D96 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH2 0x12A0 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1D92 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x1D9C JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xb0 0xc6 POP PUSH14 0xFC9B060FFE32B6C63D7CD004F2B DUP6 PUSH11 0xD475BD69CE365BA1FB7454 0xac STOP 0x29 ", - "sourceMap": "669:2422:0:-;;;1537:349;8:9:-1;5:2;;;30:1;27;20:12;5:2;1537:349:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2933:14:1;;1537:349:0;;;;;;;;;;;;;;2979:6:1;;1537:349:0;276:2:1;2256:28;;;:66;;;2312:10;2300:9;:22;2256:66;:96;;;-1:-1:-1;2338:14:1;;2256:96;:127;;;-1:-1:-1;2368:15:1;;2256:127;2249:153;;;2397:5;;;2249:153;2986:1;2979:8;;2974:168;2991:7;:14;2989:1;:16;2974:168;;;3030:7;:19;3038:7;3046:1;3038:10;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3030:19:1;;;;;;;;;;;-1:-1:-1;3030:19:1;;;;;:38;;;3053:7;3061:1;3053:10;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3053:15:1;3067:1;3053:15;3030:38;3026:65;;;3086:5;;;3026:65;3127:4;3105:7;:19;3113:7;3121:1;3113:10;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3105:19:1;;;;;;;;;;;-1:-1:-1;3105:19:1;:26;;-1:-1:-1;;3105:26:1;;;;;;;;;;-1:-1:-1;3007:3:1;;;;;2974:168;;;3151:16;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;;;3177:8:1;:20;;;;-1:-1:-1;;2052:17:2;:38;-1:-1:-1;;1828:29:0;:51;;-1:-1:-1;;;;;;1828:51:0;-1:-1:-1;;;;;1828:51:0;;;;;;;;;;-1:-1:-1;669:2422:0;;-1:-1:-1;;669:2422:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;669:2422:0;-1:-1:-1;;;;;669:2422:0;;;;;;;;;;;-1:-1:-1;669:2422:0;;;;;;;-1:-1:-1;669:2422:0;;;-1:-1:-1;669:2422:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;;669:2422:0;;;;;;;;;:::o;:::-;;;;;;;" - }, - "deployedBytecode": { - "linkReferences": {}, - "object": "0x60806040526004361061015e5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c2781146101a0578063173825d9146101e157806320ea8d861461020f5780632f54bf6e146102275780633411c81c1461026957806337bd78a01461029a57806354741525146102c1578063553a48fd146102e05780635711b311146103395780637065cb4814610351578063784547a71461037f5780637ad28c51146103975780638b51d13f146103af5780639ace38c2146103c7578063a0e67e2b1461049c578063a8abe69a14610501578063add1cbc514610526578063b5dc40c31461053b578063b77bf60014610553578063ba51a6df14610568578063c01a8c8414610580578063c642747414610598578063d38f2d821461060e578063d74f8edd14610626578063dc8452cd1461063b578063e20056e614610650578063ee22610b14610684575b600034111561019e5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b3480156101ac57600080fd5b506101b860043561069c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156101ed57600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff600435166106d1565b34801561021b57600080fd5b5061019e600435610928565b34801561023357600080fd5b5061025573ffffffffffffffffffffffffffffffffffffffff60043516610a15565b604080519115158252519081900360200190f35b34801561027557600080fd5b5061025560043573ffffffffffffffffffffffffffffffffffffffff60243516610a2a565b3480156102a657600080fd5b506102af610a4a565b60408051918252519081900360200190f35b3480156102cd57600080fd5b506102af60043515156024351515610a50565b3480156102ec57600080fd5b506040805160206004803580820135601f8101849004840285018401909552848452610255943694929360249392840191908190840183828082843750949750610abc9650505050505050565b34801561034557600080fd5b5061019e600435610bc7565b34801561035d57600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff60043516610e90565b34801561038b57600080fd5b50610255600435610ffd565b3480156103a357600080fd5b5061019e600435611087565b3480156103bb57600080fd5b506102af6004356110ce565b3480156103d357600080fd5b506103df60043561114a565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561045e578181015183820152602001610446565b50505050905090810190601f16801561048b5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b3480156104a857600080fd5b506104b1611233565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104ed5781810151838201526020016104d5565b505050509050019250505060405180910390f35b34801561050d57600080fd5b506104b1600435602435604435151560643515156112a3565b34801561053257600080fd5b506101b86113dc565b34801561054757600080fd5b506104b16004356113f8565b34801561055f57600080fd5b506102af6115a5565b34801561057457600080fd5b5061019e6004356115ab565b34801561058c57600080fd5b5061019e600435611622565b3480156105a457600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526102af94823573ffffffffffffffffffffffffffffffffffffffff169460248035953695946064949201919081908401838280828437509497506117349650505050505050565b34801561061a57600080fd5b506102af600435611753565b34801561063257600080fd5b506102af611765565b34801561064757600080fd5b506102af61176a565b34801561065c57600080fd5b5061019e73ffffffffffffffffffffffffffffffffffffffff60043581169060243516611770565b34801561069057600080fd5b5061019e600435611980565b60038054829081106106aa57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60003330146106df57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260026020526040902054829060ff16151561071557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905591505b6003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01821015610898578273ffffffffffffffffffffffffffffffffffffffff166003838154811015156107b557fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16141561088d57600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061080d57fe5b6000918252602090912001546003805473ffffffffffffffffffffffffffffffffffffffff909216918490811061084057fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610898565b600190910190610763565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906108c99082611cef565b5060035460045411156108e2576003546108e2906115ab565b60405173ffffffffffffffffffffffffffffffffffffffff8416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff16151561094657600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561097257600080fd5b600084815260208190526040902060030154849060ff161561099357600080fd5b8461099d81610ffd565b156109a757600080fd5b600086815260016020908152604080832033808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555188927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a3505050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b60065481565b6000805b600554811015610ab557838015610a7d575060008181526020819052604090206003015460ff16155b80610aa15750828015610aa1575060008181526020819052604090206003015460ff165b15610aad576001820191505b600101610a54565b5092915050565b604080517f72656d6f7665417574686f72697a65644164647265737328616464726573732981529051908190036020019020600090815b6004811015610bbb57818160048110610b0857fe5b1a7f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168482815181101515610b5b57fe5b6020910101517f010000000000000000000000000000000000000000000000000000000000000090819004027fff000000000000000000000000000000000000000000000000000000000000001614610bb357600080fd5b600101610af3565b600192505b5050919050565b600081815260208190526040812060030154829060ff1615610be857600080fd5b82610bf281610ffd565b1515610bfd57600080fd5b6000848152602081905260409020600854815486929173ffffffffffffffffffffffffffffffffffffffff918216911614610c3757600080fd5b600281810180546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190931694909404601f8101839004830285018301909152808452610cea939291830182828015610ce05780601f10610cb557610100808354040283529160200191610ce0565b820191906000526020600020905b815481529060010190602001808311610cc357829003601f168201915b5050505050610abc565b1515610cf557600080fd5b600086815260208190526040908190206003810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815481830154935160028085018054959b5073ffffffffffffffffffffffffffffffffffffffff909316959492939192839285927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff918316156101000291909101909116048015610de75780601f10610dbc57610100808354040283529160200191610de7565b820191906000526020600020905b815481529060010190602001808311610dca57829003601f168201915b505091505060006040518083038185875af19250505015610e325760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2610e88565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a26003850180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b505050505050565b333014610e9c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054819060ff1615610ed157600080fd5b8173ffffffffffffffffffffffffffffffffffffffff81161515610ef457600080fd5b6003805490506001016004546032821180610f0e57508181115b80610f17575080155b80610f20575081155b15610f2a57600080fd5b73ffffffffffffffffffffffffffffffffffffffff851660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610bc0576000848152600160205260408120600380549192918490811061102b57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff161561106c576001820191505b60045482141561107f5760019250610bc0565b600101611002565b33301461109357600080fd5b60068190556040805182815290517fd1c9101a34feff75cccef14a28785a0279cb0b49c1f321f21f5f422e746b43779181900360200190a150565b6000805b60035481101561114457600083815260016020526040812060038054919291849081106110fb57fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff161561113c576001820191505b6001016110d2565b50919050565b60006020818152918152604090819020805460018083015460028085018054875161010095821615959095027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff011691909104601f810188900488028401880190965285835273ffffffffffffffffffffffffffffffffffffffff909316959094919291908301828280156112205780601f106111f557610100808354040283529160200191611220565b820191906000526020600020905b81548152906001019060200180831161120357829003601f168201915b5050506003909301549192505060ff1684565b6060600380548060200260200160405190810160405280929190818152602001828054801561129857602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161126d575b505050505090505b90565b6060806000806005546040519080825280602002602001820160405280156112d5578160200160208202803883390190505b50925060009150600090505b60055481101561135c5785801561130a575060008181526020819052604090206003015460ff16155b8061132e575084801561132e575060008181526020819052604090206003015460ff165b156113545780838381518110151561134257fe5b60209081029091010152600191909101905b6001016112e1565b878703604051908082528060200260200182016040528015611388578160200160208202803883390190505b5093508790505b868110156113d15782818151811015156113a557fe5b90602001906020020151848983038151811015156113bf57fe5b6020908102909101015260010161138f565b505050949350505050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60608060008060038054905060405190808252806020026020018201604052801561142d578160200160208202803883390190505b50925060009150600090505b600354811015611511576000858152600160205260408120600380549192918490811061146257fe5b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205460ff16156115095760038054829081106114aa57fe5b600091825260209091200154835173ffffffffffffffffffffffffffffffffffffffff909116908490849081106114dd57fe5b73ffffffffffffffffffffffffffffffffffffffff909216602092830290910190910152600191909101905b600101611439565b8160405190808252806020026020018201604052801561153b578160200160208202803883390190505b509350600090505b8181101561159d57828181518110151561155957fe5b90602001906020020151848281518110151561157157fe5b73ffffffffffffffffffffffffffffffffffffffff909216602092830290910190910152600101611543565b505050919050565b60055481565b3330146115b757600080fd5b6003548160328211806115c957508181115b806115d2575080155b806115db575081155b156115e557600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff16151561164057600080fd5b600082815260208190526040902054829073ffffffffffffffffffffffffffffffffffffffff16151561167257600080fd5b60008381526001602090815260408083203380855292529091205484919060ff161561169d57600080fd5b846116a781610ffd565b156116b157600080fd5b600086815260016020818152604080842033808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909317909255905188927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a361172586610ffd565b15610e8857610e888642611b71565b6000611741848484611bbc565b905061174c81611622565b9392505050565b60076020526000908152604090205481565b603281565b60045481565b600033301461177e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff1615156117b457600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020526040902054839060ff16156117e957600080fd5b600092505b6003548310156118ae578473ffffffffffffffffffffffffffffffffffffffff1660038481548110151561181e57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1614156118a3578360038481548110151561185657fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506118ae565b6001909201916117ee565b73ffffffffffffffffffffffffffffffffffffffff80861660008181526002602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a260405173ffffffffffffffffffffffffffffffffffffffff8516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b600081815260208190526040812060030154829060ff16156119a157600080fd5b826119ab81610ffd565b15156119b657600080fd5b6006546000858152600760205260409020548591014210156119d757600080fd5b600085815260208190526040908190206003810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815481830154935160028085018054959a5073ffffffffffffffffffffffffffffffffffffffff909316959492939192839285927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff918316156101000291909101909116048015611ac95780601f10611a9e57610100808354040283529160200191611ac9565b820191906000526020600020905b815481529060010190602001808311611aac57829003601f168201915b505091505060006040518083038185875af19250505015611b145760405185907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a2611b6a565b60405185907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a26003840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b5050505050565b6000828152600760209081526040918290208390558151838152915184927f0b237afe65f1514fd7ea3f923ea4fe792bdd07000a912b6cd1602a8e7f573c8d92908290030190a25050565b60008373ffffffffffffffffffffffffffffffffffffffff81161515611be157600080fd5b6005546040805160808101825273ffffffffffffffffffffffffffffffffffffffff8881168252602080830189815283850189815260006060860181905287815280845295909520845181547fffffffffffffffffffffffff00000000000000000000000000000000000000001694169390931783555160018301559251805194965091939092611c79926002850192910190611d18565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b815481835581811115611d1357600083815260209020611d13918101908301611d96565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611d5957805160ff1916838001178555611d86565b82800160010185558215611d86579182015b82811115611d86578251825591602001919060010190611d6b565b50611d92929150611d96565b5090565b6112a091905b80821115611d925760008155600101611d9c5600a165627a7a72305820b0c6506d0fc9b060ffe32b6c63d7cd004f2b856ad475bd69ce365ba1fb7454ac0029", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x15E JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x25E7C27 DUP2 EQ PUSH2 0x1A0 JUMPI DUP1 PUSH4 0x173825D9 EQ PUSH2 0x1E1 JUMPI DUP1 PUSH4 0x20EA8D86 EQ PUSH2 0x20F JUMPI DUP1 PUSH4 0x2F54BF6E EQ PUSH2 0x227 JUMPI DUP1 PUSH4 0x3411C81C EQ PUSH2 0x269 JUMPI DUP1 PUSH4 0x37BD78A0 EQ PUSH2 0x29A JUMPI DUP1 PUSH4 0x54741525 EQ PUSH2 0x2C1 JUMPI DUP1 PUSH4 0x553A48FD EQ PUSH2 0x2E0 JUMPI DUP1 PUSH4 0x5711B311 EQ PUSH2 0x339 JUMPI DUP1 PUSH4 0x7065CB48 EQ PUSH2 0x351 JUMPI DUP1 PUSH4 0x784547A7 EQ PUSH2 0x37F JUMPI DUP1 PUSH4 0x7AD28C51 EQ PUSH2 0x397 JUMPI DUP1 PUSH4 0x8B51D13F EQ PUSH2 0x3AF JUMPI DUP1 PUSH4 0x9ACE38C2 EQ PUSH2 0x3C7 JUMPI DUP1 PUSH4 0xA0E67E2B EQ PUSH2 0x49C JUMPI DUP1 PUSH4 0xA8ABE69A EQ PUSH2 0x501 JUMPI DUP1 PUSH4 0xADD1CBC5 EQ PUSH2 0x526 JUMPI DUP1 PUSH4 0xB5DC40C3 EQ PUSH2 0x53B JUMPI DUP1 PUSH4 0xB77BF600 EQ PUSH2 0x553 JUMPI DUP1 PUSH4 0xBA51A6DF EQ PUSH2 0x568 JUMPI DUP1 PUSH4 0xC01A8C84 EQ PUSH2 0x580 JUMPI DUP1 PUSH4 0xC6427474 EQ PUSH2 0x598 JUMPI DUP1 PUSH4 0xD38F2D82 EQ PUSH2 0x60E JUMPI DUP1 PUSH4 0xD74F8EDD EQ PUSH2 0x626 JUMPI DUP1 PUSH4 0xDC8452CD EQ PUSH2 0x63B JUMPI DUP1 PUSH4 0xE20056E6 EQ PUSH2 0x650 JUMPI DUP1 PUSH4 0xEE22610B EQ PUSH2 0x684 JUMPI JUMPDEST PUSH1 0x0 CALLVALUE GT ISZERO PUSH2 0x19E JUMPI PUSH1 0x40 DUP1 MLOAD CALLVALUE DUP2 MSTORE SWAP1 MLOAD CALLER SWAP2 PUSH32 0xE1FFFCC4923D04B559F4D29A8BFC6CDA04EB5B0D3C460751C2402C5C5CC9109C SWAP2 SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG2 JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1AC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B8 PUSH1 0x4 CALLDATALOAD PUSH2 0x69C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x6D1 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x21B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x928 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x233 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x255 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0xA15 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x275 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x255 PUSH1 0x4 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x24 CALLDATALOAD AND PUSH2 0xA2A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2A6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH2 0xA4A JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH1 0x4 CALLDATALOAD ISZERO ISZERO PUSH1 0x24 CALLDATALOAD ISZERO ISZERO PUSH2 0xA50 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2EC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x4 DUP1 CALLDATALOAD DUP1 DUP3 ADD CALLDATALOAD PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP6 ADD DUP5 ADD SWAP1 SWAP6 MSTORE DUP5 DUP5 MSTORE PUSH2 0x255 SWAP5 CALLDATASIZE SWAP5 SWAP3 SWAP4 PUSH1 0x24 SWAP4 SWAP3 DUP5 ADD SWAP2 SWAP1 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY POP SWAP5 SWAP8 POP PUSH2 0xABC SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x345 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0xBC7 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x35D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0xE90 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x38B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x255 PUSH1 0x4 CALLDATALOAD PUSH2 0xFFD JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3A3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x1087 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH1 0x4 CALLDATALOAD PUSH2 0x10CE JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x3D3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3DF PUSH1 0x4 CALLDATALOAD PUSH2 0x114A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x20 ADD DUP5 DUP2 MSTORE PUSH1 0x20 ADD DUP1 PUSH1 0x20 ADD DUP4 ISZERO ISZERO ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 SUB DUP3 MSTORE DUP5 DUP2 DUP2 MLOAD DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP DUP1 MLOAD SWAP1 PUSH1 0x20 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x45E JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x446 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x48B JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP6 POP POP POP POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x4A8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4B1 PUSH2 0x1233 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 DUP2 ADD SWAP2 MUL DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x4ED JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x4D5 JUMP JUMPDEST POP POP POP POP SWAP1 POP ADD SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x50D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4B1 PUSH1 0x4 CALLDATALOAD PUSH1 0x24 CALLDATALOAD PUSH1 0x44 CALLDATALOAD ISZERO ISZERO PUSH1 0x64 CALLDATALOAD ISZERO ISZERO PUSH2 0x12A3 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x532 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1B8 PUSH2 0x13DC JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x547 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4B1 PUSH1 0x4 CALLDATALOAD PUSH2 0x13F8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x55F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH2 0x15A5 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x574 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x15AB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x58C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x1622 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x5A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x4 PUSH1 0x44 CALLDATALOAD DUP2 DUP2 ADD CALLDATALOAD PUSH1 0x1F DUP2 ADD DUP5 SWAP1 DIV DUP5 MUL DUP6 ADD DUP5 ADD SWAP1 SWAP6 MSTORE DUP5 DUP5 MSTORE PUSH2 0x2AF SWAP5 DUP3 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP5 PUSH1 0x24 DUP1 CALLDATALOAD SWAP6 CALLDATASIZE SWAP6 SWAP5 PUSH1 0x64 SWAP5 SWAP3 ADD SWAP2 SWAP1 DUP2 SWAP1 DUP5 ADD DUP4 DUP3 DUP1 DUP3 DUP5 CALLDATACOPY POP SWAP5 SWAP8 POP PUSH2 0x1734 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x61A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH1 0x4 CALLDATALOAD PUSH2 0x1753 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x632 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH2 0x1765 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x647 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2AF PUSH2 0x176A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x65C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x1770 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x690 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x19E PUSH1 0x4 CALLDATALOAD PUSH2 0x1980 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD DUP3 SWAP1 DUP2 LT PUSH2 0x6AA JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP1 POP DUP2 JUMP JUMPDEST PUSH1 0x0 CALLER ADDRESS EQ PUSH2 0x6DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x715 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE SWAP2 POP JUMPDEST PUSH1 0x3 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD DUP3 LT ISZERO PUSH2 0x898 JUMPI DUP3 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 DUP4 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x7B5 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x88D JUMPI PUSH1 0x3 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 ADD SWAP1 DUP2 LT PUSH2 0x80D JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x3 DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x840 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH2 0x898 JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH2 0x763 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD SWAP1 PUSH2 0x8C9 SWAP1 DUP3 PUSH2 0x1CEF JUMP JUMPDEST POP PUSH1 0x3 SLOAD PUSH1 0x4 SLOAD GT ISZERO PUSH2 0x8E2 JUMPI PUSH1 0x3 SLOAD PUSH2 0x8E2 SWAP1 PUSH2 0x15AB JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND SWAP1 PUSH32 0x8001553A916EF2F495D26A907CC54D96ED840D7BDA71E73194BF5A9DF7A76B90 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x946 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP4 SWAP2 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x972 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD DUP5 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x993 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH2 0x99D DUP2 PUSH2 0xFFD JUMP JUMPDEST ISZERO PUSH2 0x9A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE DUP1 DUP4 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE MLOAD DUP9 SWAP3 PUSH32 0xF6A317157440607F36269043EB55F1287A5A19BA2216AFEAB88CD46CBCFB88E9 SWAP2 LOG3 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x0 SWAP3 DUP4 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 SWAP1 SWAP2 MSTORE SWAP1 DUP3 MSTORE SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND DUP2 JUMP JUMPDEST PUSH1 0x6 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH1 0x5 SLOAD DUP2 LT ISZERO PUSH2 0xAB5 JUMPI DUP4 DUP1 ISZERO PUSH2 0xA7D JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND ISZERO JUMPDEST DUP1 PUSH2 0xAA1 JUMPI POP DUP3 DUP1 ISZERO PUSH2 0xAA1 JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0xAAD JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x1 ADD PUSH2 0xA54 JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH32 0x72656D6F7665417574686F72697A656441646472657373286164647265737329 DUP2 MSTORE SWAP1 MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 KECCAK256 PUSH1 0x0 SWAP1 DUP2 JUMPDEST PUSH1 0x4 DUP2 LT ISZERO PUSH2 0xBBB JUMPI DUP2 DUP2 PUSH1 0x4 DUP2 LT PUSH2 0xB08 JUMPI INVALID JUMPDEST BYTE PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 MUL PUSH31 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND DUP5 DUP3 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0xB5B JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP2 ADD ADD MLOAD PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 SWAP1 DUP2 SWAP1 DIV MUL PUSH32 0xFF00000000000000000000000000000000000000000000000000000000000000 AND EQ PUSH2 0xBB3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 ADD PUSH2 0xAF3 JUMP JUMPDEST PUSH1 0x1 SWAP3 POP JUMPDEST POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 ADD SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0xBE8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 PUSH2 0xBF2 DUP2 PUSH2 0xFFD JUMP JUMPDEST ISZERO ISZERO PUSH2 0xBFD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x8 SLOAD DUP2 SLOAD DUP7 SWAP3 SWAP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP3 AND SWAP2 AND EQ PUSH2 0xC37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 DUP2 DUP2 ADD DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1 DUP5 AND ISZERO PUSH2 0x100 MUL PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD SWAP1 SWAP4 AND SWAP5 SWAP1 SWAP5 DIV PUSH1 0x1F DUP2 ADD DUP4 SWAP1 DIV DUP4 MUL DUP6 ADD DUP4 ADD SWAP1 SWAP2 MSTORE DUP1 DUP5 MSTORE PUSH2 0xCEA SWAP4 SWAP3 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0xCE0 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xCB5 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xCE0 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xCC3 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP PUSH2 0xABC JUMP JUMPDEST ISZERO ISZERO PUSH2 0xCF5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 PUSH1 0x3 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 SLOAD DUP2 DUP4 ADD SLOAD SWAP4 MLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD SWAP6 SWAP12 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP4 AND SWAP6 SWAP5 SWAP3 SWAP4 SWAP2 SWAP3 DUP4 SWAP3 DUP6 SWAP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP4 AND ISZERO PUSH2 0x100 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 AND DIV DUP1 ISZERO PUSH2 0xDE7 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0xDBC JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0xDE7 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0xDCA JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP SWAP2 POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP ISZERO PUSH2 0xE32 JUMPI PUSH1 0x40 MLOAD DUP7 SWAP1 PUSH32 0x33E13ECB54C3076D8E8BB8C2881800A4D972B792045FFAE98FDF46DF365FED75 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH2 0xE88 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP7 SWAP1 PUSH32 0x526441BB6C1ABA3C9A4A6CA1D6545DA9C2333C8C48343EF398EB858D72B79236 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH1 0x3 DUP6 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0xE9C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0xED1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO PUSH2 0xEF4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD SWAP1 POP PUSH1 0x1 ADD PUSH1 0x4 SLOAD PUSH1 0x32 DUP3 GT DUP1 PUSH2 0xF0E JUMPI POP DUP2 DUP2 GT JUMPDEST DUP1 PUSH2 0xF17 JUMPI POP DUP1 ISZERO JUMPDEST DUP1 PUSH2 0xF20 JUMPI POP DUP2 ISZERO JUMPDEST ISZERO PUSH2 0xF2A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE PUSH1 0x3 DUP1 SLOAD SWAP2 DUP3 ADD DUP2 SSTORE DUP4 MSTORE PUSH32 0xC2575A0E9E593C00F959F8C92F12DB2869C3395A3B0502D05E2516446F71F85B ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND DUP5 OR SWAP1 SSTORE MLOAD PUSH32 0xF39E6E1EB0EDCF53C221607B54B00CD28F3196FED0A24994DC308B8F611B682D SWAP2 SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP1 JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0xBC0 JUMPI PUSH1 0x0 DUP5 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x102B JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x106C JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x4 SLOAD DUP3 EQ ISZERO PUSH2 0x107F JUMPI PUSH1 0x1 SWAP3 POP PUSH2 0xBC0 JUMP JUMPDEST PUSH1 0x1 ADD PUSH2 0x1002 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x1093 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP2 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP3 DUP2 MSTORE SWAP1 MLOAD PUSH32 0xD1C9101A34FEFF75CCCEF14A28785A0279CB0B49C1F321F21F5F422E746B4377 SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 POP JUMP JUMPDEST PUSH1 0x0 DUP1 JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0x1144 JUMPI PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x10FB JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x113C JUMPI PUSH1 0x1 DUP3 ADD SWAP2 POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x10D2 JUMP JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP2 DUP2 MSTORE SWAP2 DUP2 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0x1 DUP1 DUP4 ADD SLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD DUP8 MLOAD PUSH2 0x100 SWAP6 DUP3 AND ISZERO SWAP6 SWAP1 SWAP6 MUL PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ADD AND SWAP2 SWAP1 SWAP2 DIV PUSH1 0x1F DUP2 ADD DUP9 SWAP1 DIV DUP9 MUL DUP5 ADD DUP9 ADD SWAP1 SWAP7 MSTORE DUP6 DUP4 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP4 AND SWAP6 SWAP1 SWAP5 SWAP2 SWAP3 SWAP2 SWAP1 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x1220 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x11F5 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1220 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1203 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP PUSH1 0x3 SWAP1 SWAP4 ADD SLOAD SWAP2 SWAP3 POP POP PUSH1 0xFF AND DUP5 JUMP JUMPDEST PUSH1 0x60 PUSH1 0x3 DUP1 SLOAD DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP1 SLOAD DUP1 ISZERO PUSH2 0x1298 JUMPI PUSH1 0x20 MUL DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 MSTORE PUSH1 0x1 SWAP1 SWAP2 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x126D JUMPI JUMPDEST POP POP POP POP POP SWAP1 POP JUMPDEST SWAP1 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x5 SLOAD PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x12D5 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST PUSH1 0x5 SLOAD DUP2 LT ISZERO PUSH2 0x135C JUMPI DUP6 DUP1 ISZERO PUSH2 0x130A JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND ISZERO JUMPDEST DUP1 PUSH2 0x132E JUMPI POP DUP5 DUP1 ISZERO PUSH2 0x132E JUMPI POP PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 PUSH1 0x3 ADD SLOAD PUSH1 0xFF AND JUMPDEST ISZERO PUSH2 0x1354 JUMPI DUP1 DUP4 DUP4 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1342 JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 JUMPDEST PUSH1 0x1 ADD PUSH2 0x12E1 JUMP JUMPDEST DUP8 DUP8 SUB PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x1388 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP4 POP DUP8 SWAP1 POP JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x13D1 JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x13A5 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD DUP5 DUP10 DUP4 SUB DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x13BF JUMPI INVALID JUMPDEST PUSH1 0x20 SWAP1 DUP2 MUL SWAP1 SWAP2 ADD ADD MSTORE PUSH1 0x1 ADD PUSH2 0x138F JUMP JUMPDEST POP POP POP SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x8 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP2 JUMP JUMPDEST PUSH1 0x60 DUP1 PUSH1 0x0 DUP1 PUSH1 0x3 DUP1 SLOAD SWAP1 POP PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x142D JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP3 POP PUSH1 0x0 SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST PUSH1 0x3 SLOAD DUP2 LT ISZERO PUSH2 0x1511 JUMPI PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 DUP1 SLOAD SWAP2 SWAP3 SWAP2 DUP5 SWAP1 DUP2 LT PUSH2 0x1462 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP4 MSTORE DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x40 ADD SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x1509 JUMPI PUSH1 0x3 DUP1 SLOAD DUP3 SWAP1 DUP2 LT PUSH2 0x14AA JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD DUP4 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP2 AND SWAP1 DUP5 SWAP1 DUP5 SWAP1 DUP2 LT PUSH2 0x14DD JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 JUMPDEST PUSH1 0x1 ADD PUSH2 0x1439 JUMP JUMPDEST DUP2 PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x153B JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP4 POP PUSH1 0x0 SWAP1 POP JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x159D JUMPI DUP3 DUP2 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1559 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x20 ADD SWAP1 PUSH1 0x20 MUL ADD MLOAD DUP5 DUP3 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1571 JUMPI INVALID JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE PUSH1 0x1 ADD PUSH2 0x1543 JUMP JUMPDEST POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x5 SLOAD DUP2 JUMP JUMPDEST CALLER ADDRESS EQ PUSH2 0x15B7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 SLOAD DUP2 PUSH1 0x32 DUP3 GT DUP1 PUSH2 0x15C9 JUMPI POP DUP2 DUP2 GT JUMPDEST DUP1 PUSH2 0x15D2 JUMPI POP DUP1 ISZERO JUMPDEST DUP1 PUSH2 0x15DB JUMPI POP DUP2 ISZERO JUMPDEST ISZERO PUSH2 0x15E5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP4 SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD DUP5 DUP2 MSTORE SWAP1 MLOAD PUSH32 0xA3F1EE9126A074D9326C682F561767F710E927FAA811F7A99829D49DC421797A SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 POP POP POP JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x1640 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP3 SWAP1 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND ISZERO ISZERO PUSH2 0x1672 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP3 MSTORE SWAP1 SWAP2 KECCAK256 SLOAD DUP5 SWAP2 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x169D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP5 PUSH2 0x16A7 DUP2 PUSH2 0xFFD JUMP JUMPDEST ISZERO PUSH2 0x16B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP7 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP5 KECCAK256 CALLER DUP1 DUP7 MSTORE SWAP3 MSTORE DUP1 DUP5 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SWAP4 OR SWAP1 SWAP3 SSTORE SWAP1 MLOAD DUP9 SWAP3 PUSH32 0x4A504A94899432A9846E1AA406DCEB1BCFD538BB839071D49D1E5E23F5BE30EF SWAP2 LOG3 PUSH2 0x1725 DUP7 PUSH2 0xFFD JUMP JUMPDEST ISZERO PUSH2 0xE88 JUMPI PUSH2 0xE88 DUP7 TIMESTAMP PUSH2 0x1B71 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x1741 DUP5 DUP5 DUP5 PUSH2 0x1BBC JUMP JUMPDEST SWAP1 POP PUSH2 0x174C DUP2 PUSH2 0x1622 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x32 DUP2 JUMP JUMPDEST PUSH1 0x4 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 CALLER ADDRESS EQ PUSH2 0x177E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP4 SWAP1 PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x17B4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP4 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x17E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SWAP3 POP JUMPDEST PUSH1 0x3 SLOAD DUP4 LT ISZERO PUSH2 0x18AE JUMPI DUP5 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH1 0x3 DUP5 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x181E JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND EQ ISZERO PUSH2 0x18A3 JUMPI DUP4 PUSH1 0x3 DUP5 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x1856 JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF MUL NOT AND SWAP1 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND MUL OR SWAP1 SSTORE POP PUSH2 0x18AE JUMP JUMPDEST PUSH1 0x1 SWAP1 SWAP3 ADD SWAP2 PUSH2 0x17EE JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x2 PUSH1 0x20 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 SWAP1 DUP2 AND SWAP1 SWAP2 SSTORE SWAP4 DUP9 AND DUP3 MSTORE DUP1 DUP3 KECCAK256 DUP1 SLOAD SWAP1 SWAP5 AND PUSH1 0x1 OR SWAP1 SWAP4 SSTORE SWAP2 MLOAD SWAP1 SWAP2 PUSH32 0x8001553A916EF2F495D26A907CC54D96ED840D7BDA71E73194BF5A9DF7A76B90 SWAP2 LOG2 PUSH1 0x40 MLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP6 AND SWAP1 PUSH32 0xF39E6E1EB0EDCF53C221607B54B00CD28F3196FED0A24994DC308B8F611B682D SWAP1 PUSH1 0x0 SWAP1 LOG2 POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 PUSH1 0x3 ADD SLOAD DUP3 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x19A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 PUSH2 0x19AB DUP2 PUSH2 0xFFD JUMP JUMPDEST ISZERO ISZERO PUSH2 0x19B6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD DUP6 SWAP2 ADD TIMESTAMP LT ISZERO PUSH2 0x19D7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP6 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 DUP2 SWAP1 KECCAK256 PUSH1 0x3 DUP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE DUP2 SLOAD DUP2 DUP4 ADD SLOAD SWAP4 MLOAD PUSH1 0x2 DUP1 DUP6 ADD DUP1 SLOAD SWAP6 SWAP11 POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 SWAP4 AND SWAP6 SWAP5 SWAP3 SWAP4 SWAP2 SWAP3 DUP4 SWAP3 DUP6 SWAP3 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP4 AND ISZERO PUSH2 0x100 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 AND DIV DUP1 ISZERO PUSH2 0x1AC9 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x1A9E JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x1AC9 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x1AAC JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP SWAP2 POP POP PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP6 DUP8 GAS CALL SWAP3 POP POP POP ISZERO PUSH2 0x1B14 JUMPI PUSH1 0x40 MLOAD DUP6 SWAP1 PUSH32 0x33E13ECB54C3076D8E8BB8C2881800A4D972B792045FFAE98FDF46DF365FED75 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH2 0x1B6A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP6 SWAP1 PUSH32 0x526441BB6C1ABA3C9A4A6CA1D6545DA9C2333C8C48343EF398EB858D72B79236 SWAP1 PUSH1 0x0 SWAP1 LOG2 PUSH1 0x3 DUP5 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP1 SSTORE JUMPDEST POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x7 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 DUP4 SWAP1 SSTORE DUP2 MLOAD DUP4 DUP2 MSTORE SWAP2 MLOAD DUP5 SWAP3 PUSH32 0xB237AFE65F1514FD7EA3F923EA4FE792BDD07000A912B6CD1602A8E7F573C8D SWAP3 SWAP1 DUP3 SWAP1 SUB ADD SWAP1 LOG2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND ISZERO ISZERO PUSH2 0x1BE1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x5 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x80 DUP2 ADD DUP3 MSTORE PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP9 DUP2 AND DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD DUP10 DUP2 MSTORE DUP4 DUP6 ADD DUP10 DUP2 MSTORE PUSH1 0x0 PUSH1 0x60 DUP7 ADD DUP2 SWAP1 MSTORE DUP8 DUP2 MSTORE DUP1 DUP5 MSTORE SWAP6 SWAP1 SWAP6 KECCAK256 DUP5 MLOAD DUP2 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000 AND SWAP5 AND SWAP4 SWAP1 SWAP4 OR DUP4 SSTORE MLOAD PUSH1 0x1 DUP4 ADD SSTORE SWAP3 MLOAD DUP1 MLOAD SWAP5 SWAP7 POP SWAP2 SWAP4 SWAP1 SWAP3 PUSH2 0x1C79 SWAP3 PUSH1 0x2 DUP6 ADD SWAP3 SWAP2 ADD SWAP1 PUSH2 0x1D18 JUMP JUMPDEST POP PUSH1 0x60 SWAP2 SWAP1 SWAP2 ADD MLOAD PUSH1 0x3 SWAP1 SWAP2 ADD DUP1 SLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0x5 DUP1 SLOAD PUSH1 0x1 ADD SWAP1 SSTORE PUSH1 0x40 MLOAD DUP3 SWAP1 PUSH32 0xC0BA8FE4B176C1714197D43B9CC6BCF797A4A7461C5FE8D0EF6E184AE7601E51 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST DUP2 SLOAD DUP2 DUP4 SSTORE DUP2 DUP2 GT ISZERO PUSH2 0x1D13 JUMPI PUSH1 0x0 DUP4 DUP2 MSTORE PUSH1 0x20 SWAP1 KECCAK256 PUSH2 0x1D13 SWAP2 DUP2 ADD SWAP1 DUP4 ADD PUSH2 0x1D96 JUMP JUMPDEST POP POP POP JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH2 0x1D59 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH2 0x1D86 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH2 0x1D86 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH2 0x1D86 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH2 0x1D6B JUMP JUMPDEST POP PUSH2 0x1D92 SWAP3 SWAP2 POP PUSH2 0x1D96 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH2 0x12A0 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH2 0x1D92 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH2 0x1D9C JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xb0 0xc6 POP PUSH14 0xFC9B060FFE32B6C63D7CD004F2B DUP6 PUSH11 0xD475BD69CE365BA1FB7454 0xac STOP 0x29 ", - "sourceMap": "669:2422:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2539:1:1;2527:9;:13;2523:61;;;2554:30;;;2574:9;2554:30;;;;2562:10;;2554:30;;;;;;;;;;2523:61;669:2422:0;956:23:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;956:23:1;;;;;;;;;;;;;;;;;;;;;;;;3731:460;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3731:460:1;;;;;;;3176:332:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3176:332:2;;;;;910:40:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;910:40:1;;;;;;;;;;;;;;;;;;;;;;;;;840:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;840:64:1;;;;;;;;;1029:29:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1029:29:2;;;;;;;;;;;;;;;;;;;;9156:319:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9156:319:1;;;;;;;;;;;2729:360:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2729:360:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2729:360:0;;-1:-1:-1;2729:360:0;;-1:-1:-1;;;;;;;2729:360:0;2013:502;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2013:502:0;;;;;3331:277:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3331:277:1;;;;;;;7324:337;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7324:337:1;;;;;2301:186:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2301:186:2;;;;;8642:252:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8642:252:1;;;;;785:49;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;785:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;785:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9559:115;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9559:115:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;9559:115:1;;;;;;;;;;;;;;;;;10777:676;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10777:676:1;;;;;;;;;;;;;;;771:44:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;771:44:0;;;;9853:575:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9853:575:1;;;;;1011:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1011:28:1;;;;5010:207;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5010:207:1;;;;;2593:459:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2593:459:2;;;;;5476:244:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5476:244:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5476:244:1;;-1:-1:-1;5476:244:1;;-1:-1:-1;;;;;;;5476:244:1;1065:47:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1065:47:2;;;;;237:41:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;237:41:1;;;;985:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;985:20:1;;;;4390:449;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4390:449:1;;;;;;;;;;;;3622:472:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3622:472:2;;;;;956:23:1;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;956:23:1;:::o;3731:460::-;3879:6;1206:10;1228:4;1206:27;1202:50;;1247:5;;;1202:50;1440:14;;;;;;;:7;:14;;;;;;3821:5;;1440:14;;1439:15;1435:38;;;1468:5;;;1435:38;3842:14;;;3859:5;3842:14;;;:7;:14;;;;;:22;;;;;;3859:5;-1:-1:-1;3874:170:1;3891:6;:13;:17;;3889:19;;3874:170;;;3944:5;3931:18;;:6;3938:1;3931:9;;;;;;;;;;;;;;;;;;;;;;:18;3927:117;;;3981:6;3988:13;;:17;;;;3981:25;;;;;;;;;;;;;;;;3969:6;:9;;3981:25;;;;;3976:1;;3969:9;;;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;4024:5;;3927:117;3910:3;;;;;3874:170;;;4053:6;:18;;;;;;;;;:::i;:::-;-1:-1:-1;4096:6:1;:13;4085:8;;:24;4081:74;;;4141:6;:13;4123:32;;:17;:32::i;:::-;4165:19;;;;;;;;;;;1262:1;3731:460;;:::o;3176:332:2:-;3259:10;1440:14:1;;;;:7;:14;;;;;;;;1439:15;1435:38;;;1468:5;;;1435:38;1714:28;;;;:13;:28;;;;;;;;3304:10:2;1714:35:1;;;;;;;;;3289:13:2;;3304:10;1714:35:1;;1713:36;1709:59;;;1763:5;;;1709:59;1996:12;:27;;;;;;;;;;:36;;;3336:13:2;;1996:36:1;;1992:59;;;2046:5;;;1992:59;3377:13:2;1185:26;1197:13;1185:11;:26::i;:::-;1184:27;1176:36;;;;;;3449:5;3406:28;;;:13;:28;;;;;;;;3435:10;3406:40;;;;;;;;:48;;;;;;3464:37;3420:13;;3464:37;;;2061:1:1;1778;1483;;3176:332:2;;:::o;910:40:1:-;;;;;;;;;;;;;;;:::o;840:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1029:29:2:-;;;;:::o;9156:319:1:-;9263:10;;9289:179;9306:16;;9304:1;:18;9289:179;;;9348:7;:36;;;;-1:-1:-1;9360:12:1;:15;;;;;;;;;;:24;;;;;9359:25;9348:36;:92;;;;9404:8;:36;;;;-1:-1:-1;9416:12:1;:15;;;;;;;;;;:24;;;;;9404:36;9341:127;;;9467:1;9458:10;;;;9341:127;9324:3;;9289:179;;;9156:319;;;;;:::o;2729:360:0:-;2902:40;;;;;;;;;;;;;;;;2833:4;;;2953:109;2974:1;2970;:5;2953:109;;;3015:32;3048:1;3015:35;;;;;;;;;;3004:46;;;:4;3009:1;3004:7;;;;;;;;;;;;;;;;;;;;;:46;;;2996:55;;;;;;2977:3;;2953:109;;;3078:4;3071:11;;2729:360;;;;;;:::o;2013:502::-;2229:22;1996:27:1;;;;;;;;;;:36;;;2108:13:0;;1996:36:1;;1992:59;;;2046:5;;;1992:59;2146:13:0;1298:26:2;1310:13;1298:11;:26::i;:::-;1290:35;;;;;;;;892:22:0;917:27;;;;;;;;;;980:29;;962:14;;2200:13;;917:27;980:29;962:14;;;980:29;;962:47;954:56;;;;;;1062:7;;;;1028:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1062:7;1028:42;;1062:7;1028:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:33;:42::i;:::-;1020:51;;;;;;;;2254:12;:27;;;;;;;;;;;;2291:11;;;:18;;;;2305:4;2291:18;;;;;;2323:14;;2349:8;;;;2323:44;;2359:7;;;;2323:44;;2254:27;;-1:-1:-1;2323:14:0;;;;;2349:8;2359:7;;2323:44;;;;2359:7;;2323:44;;;;;2291:18;2323:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2319:190;;;2381:24;;2391:13;;2381:24;;;;;2319:190;;;2434:31;;2451:13;;2434:31;;;;;2479:11;;;:19;;;;;;2319:190;1335:1:2;;2061::1;2013:502:0;;;:::o;3331:277:1:-;1206:10;1228:4;1206:27;1202:50;;1247:5;;;1202:50;1332:14;;;;;;;:7;:14;;;;;;3424:5;;1332:14;;1328:37;;;1360:5;;;1328:37;3447:5;2124:13;;;;2120:36;;;2151:5;;;2120:36;3479:6;:13;;;;3495:1;3479:17;3498:8;;276:2;2256:10;:28;:66;;;;2312:10;2300:9;:22;2256:66;:96;;;-1:-1:-1;2338:14:1;;2256:96;:127;;;-1:-1:-1;2368:15:1;;2256:127;2249:153;;;2397:5;;;2249:153;3522:14;;;;;;;:7;:14;;;;;;:21;;;;3539:4;3522:21;;;;;;3553:6;27:10:-1;;23:18;;;45:23;;3553:18:1;;;;;;;;;;;;3581:20;;;3522:14;3581:20;2166:1;;1375;1262;3331:277;:::o;7324:337::-;7414:4;;;7458:197;7475:6;:13;7473:15;;7458:197;;;7513:28;;;;:13;:28;;;;;7542:6;:9;;7513:28;;;7549:1;;7542:9;;;;;;;;;;;;;;;;;;;;7513:39;;;;;;;;;;;;;;;7509:71;;;7579:1;7570:10;;;;7509:71;7607:8;;7598:5;:17;7594:50;;;7640:4;7633:11;;;;7594:50;7490:3;;7458:197;;2301:186:2;1206:10:1;1228:4;1206:27;1202:50;;1247:5;;;1202:50;2398:17:2;:38;;;2446:34;;;;;;;;;;;;;;;;;2301:186;:::o;8642:252:1:-;8741:10;;8767:120;8784:6;:13;8782:15;;8767:120;;;8820:28;;;;:13;:28;;;;;8849:6;:9;;8820:28;;;8856:1;;8849:9;;;;;;;;;;;;;;;;;;;;8820:39;;;;;;;;;;;;;;;8816:71;;;8886:1;8877:10;;;;8816:71;8799:3;;8767:120;;;8642:252;;;;:::o;785:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;785:49:1;;;;;;;-1:-1:-1;;785:49:1;;;:::o;9559:115::-;9629:9;9661:6;9654:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9559:115;;:::o;10777:676::-;10902:22;10940:32;11013:10;11037:6;10986:16;;10975:28;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;10975:28:1;;10940:63;;11026:1;11013:14;;11060:1;11058:3;;11053:250;11065:16;;11063:1;:18;11053:250;;;11107:7;:36;;;;-1:-1:-1;11119:12:1;:15;;;;;;;;;;:24;;;;;11118:25;11107:36;:92;;;;11163:8;:36;;;;-1:-1:-1;11175:12:1;:15;;;;;;;;;;:24;;;;;11163:36;11100:203;;;11259:1;11231:18;11250:5;11231:25;;;;;;;;;;;;;;;;;;:29;11287:1;11278:10;;;;;11100:203;11083:3;;11053:250;;;11346:4;11341:2;:9;11330:21;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;11330:21:1;;11312:39;;11368:4;11366:6;;11361:85;11376:2;11374:1;:4;11361:85;;;11425:18;11444:1;11425:21;;;;;;;;;;;;;;;;;;11397:15;11417:4;11413:1;:8;11397:25;;;;;;;;;;;;;;;;;;:49;11380:3;;11361:85;;;10777:676;;;;;;;;;:::o;771:44:0:-;;;;;;:::o;9853:575:1:-;9948:24;9988:34;10063:10;10087:6;10039;:13;;;;10025:28;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;10025:28:1;;9988:65;;10076:1;10063:14;;10110:1;10108:3;;10103:186;10115:6;:13;10113:15;;10103:186;;;10151:28;;;;:13;:28;;;;;10180:6;:9;;10151:28;;;10187:1;;10180:9;;;;;;;;;;;;;;;;;;;;10151:39;;;;;;;;;;;;;;;10147:142;;;10237:6;:9;;10244:1;;10237:9;;;;;;;;;;;;;;;;10210:24;;10237:9;;;;;10210:17;;10228:5;;10210:24;;;;;;:36;;;;:24;;;;;;;;;;:36;10273:1;10264:10;;;;;10147:142;10130:3;;10103:186;;;10329:5;10315:20;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;10315:20:1;;10298:37;;10352:1;10350:3;;10345:76;10357:5;10355:1;:7;10345:76;;;10401:17;10419:1;10401:20;;;;;;;;;;;;;;;;;;10381:14;10396:1;10381:17;;;;;;;;;;:40;;;;:17;;;;;;;;;;:40;10364:3;;10345:76;;;9853:575;;;;;;:::o;1011:28::-;;;;:::o;5010:207::-;1206:10;1228:4;1206:27;1202:50;;1247:5;;;1202:50;5112:6;:13;5127:9;276:2;2256:28;;;:66;;;2312:10;2300:9;:22;2256:66;:96;;;-1:-1:-1;2338:14:1;;2256:96;:127;;;-1:-1:-1;2368:15:1;;2256:127;2249:153;;;2397:5;;;2249:153;5152:8;:20;;;5182:28;;;;;;;;;;;;;;;;;1262:1;;5010:207;:::o;2593:459:2:-;2676:10;1440:14:1;;;;:7;:14;;;;;;;;1439:15;1435:38;;;1468:5;;;1435:38;1558:12;:27;;;;;;;;;;:39;2714:13:2;;1558:39:1;;:44;1554:67;;;1616:5;;;1554:67;1863:28;;;;:13;:28;;;;;;;;2765:10:2;1863:35:1;;;;;;;;;2750:13:2;;2765:10;1863:35:1;;1859:58;;;1912:5;;;1859:58;2803:13:2;1185:26;1197:13;1185:11;:26::i;:::-;1184:27;1176:36;;;;;;2832:28;;;;2875:4;2832:28;;;;;;;;2861:10;2832:40;;;;;;;;:47;;;;;;;;;;2889:39;;2846:13;;2889:39;;;2942:26;2954:13;2942:11;:26::i;:::-;2938:108;;;2984:51;3004:13;3019:15;2984:19;:51::i;5476:244:1:-;5580:18;5630:40;5645:11;5658:5;5665:4;5630:14;:40::i;:::-;5614:56;;5680:33;5699:13;5680:18;:33::i;:::-;5476:244;;;;;:::o;1065:47:2:-;;;;;;;;;;;;;:::o;237:41:1:-;276:2;237:41;:::o;985:20::-;;;;:::o;4390:449::-;4561:6;1206:10;1228:4;1206:27;1202:50;;1247:5;;;1202:50;1440:14;;;;;;;:7;:14;;;;;;4499:5;;1440:14;;1439:15;1435:38;;;1468:5;;;1435:38;1332:14;;;;;;;:7;:14;;;;;;4532:8;;1332:14;;1328:37;;;1360:5;;;1328:37;4568:1;4561:8;;4556:149;4573:6;:13;4571:15;;4556:149;;;4622:5;4609:18;;:6;4616:1;4609:9;;;;;;;;;;;;;;;;;;;;;;:18;4605:100;;;4659:8;4647:6;4654:1;4647:9;;;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;;;;;;;4685:5;;4605:100;4588:3;;;;;4556:149;;;4714:14;;;;4731:5;4714:14;;;:7;:14;;;;;;:22;;;;;;;;;4746:17;;;;;;;;:24;;;;;4714:22;4746:24;;;;4780:19;;4714:14;;4780:19;;;4809:23;;;;;;;;;;;1483:1;1262;4390:449;;;:::o;3622:472:2:-;3808:22;1996:27:1;;;;;;;;;;:36;;;3705:13:2;;1996:36:1;;1992:59;;;2046:5;;;1992:59;3743:13:2;1298:26;1310:13;1298:11;:26::i;:::-;1290:35;;;;;;;;1463:17;;1428:32;;;;:17;:32;;;;;;3779:13;;1428:52;1409:15;:71;;1401:80;;;;;;3833:12;:27;;;;;;;;;;;;3870:11;;;:18;;;;3884:4;3870:18;;;;;;3902:14;;3928:8;;;;3902:44;;3938:7;;;;3902:44;;3833:27;;-1:-1:-1;3902:14:2;;;;;3928:8;3938:7;;3902:44;;;;3938:7;;3902:44;;;;;3870:18;3902:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3898:190;;;3960:24;;3970:13;;3960:24;;;;;3898:190;;;4013:31;;4030:13;;4013:31;;;;;4058:11;;;:19;;;;;;3898:190;1335:1;2061::1;3622:472:2;;;:::o;4204:223::-;4307:32;;;;:17;:32;;;;;;;;;:51;;;4368:52;;;;;;;4325:13;;4368:52;;;;;;;;;4204:223;;:::o;7994:451:1:-;8126:18;8096:11;2124:13;;;;2120:36;;;2151:5;;;2120:36;8176:16;;8232:140;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8232:140:1;;;;;;8202:27;;;;;;;;;;:170;;;;;;;;;;;;;;;-1:-1:-1;8202:170:1;;;;;;;8176:16;;-1:-1:-1;8232:140:1;;8202:27;;:170;;;;;;;;;;:::i;:::-;-1:-1:-1;8202:170:1;;;;;;;;;;;;;;;;;;;;;;;8382:16;:21;;-1:-1:-1;8382:21:1;;;8413:25;;8424:13;;8413:25;;-1:-1:-1;;8413:25:1;7994:451;;;;;;:::o;669:2422:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;669:2422:0;;;-1:-1:-1;669:2422:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;" - } - } - }, - "sources": { - "1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol": { - "id": 0 - }, - "2.0.0/multisig/MultiSigWallet.sol": { - "id": 1 - }, - "2.0.0/multisig/MultiSigWalletWithTimeLock.sol": { - "id": 2 - } - }, - "sourceCodes": { - "1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol": "/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.4.10;\n\nimport \"../../2.0.0/multisig/MultiSigWalletWithTimeLock.sol\";\n\ncontract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWalletWithTimeLock {\n\n address public TOKEN_TRANSFER_PROXY_CONTRACT;\n\n modifier validRemoveAuthorizedAddressTx(uint transactionId) {\n Transaction storage tx = transactions[transactionId];\n require(tx.destination == TOKEN_TRANSFER_PROXY_CONTRACT);\n require(isFunctionRemoveAuthorizedAddress(tx.data));\n _;\n }\n\n /// @dev Contract constructor sets initial owners, required number of confirmations, time lock, and tokenTransferProxy address.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds.\n /// @param _tokenTransferProxy Address of TokenTransferProxy contract.\n function MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress(\n address[] _owners,\n uint _required,\n uint _secondsTimeLocked,\n address _tokenTransferProxy)\n public\n MultiSigWalletWithTimeLock(_owners, _required, _secondsTimeLocked)\n {\n TOKEN_TRANSFER_PROXY_CONTRACT = _tokenTransferProxy;\n }\n\n /// @dev Allows execution of removeAuthorizedAddress without time lock.\n /// @param transactionId Transaction ID.\n function executeRemoveAuthorizedAddress(uint transactionId)\n public\n notExecuted(transactionId)\n fullyConfirmed(transactionId)\n validRemoveAuthorizedAddressTx(transactionId)\n {\n Transaction storage tx = transactions[transactionId];\n tx.executed = true;\n if (tx.destination.call.value(tx.value)(tx.data))\n Execution(transactionId);\n else {\n ExecutionFailure(transactionId);\n tx.executed = false;\n }\n }\n\n /// @dev Compares first 4 bytes of byte array to removeAuthorizedAddress function signature.\n /// @param data Transaction data.\n /// @return Successful if data is a call to removeAuthorizedAddress.\n function isFunctionRemoveAuthorizedAddress(bytes data)\n public\n constant\n returns (bool)\n {\n bytes4 removeAuthorizedAddressSignature = bytes4(sha3(\"removeAuthorizedAddress(address)\"));\n for (uint i = 0; i < 4; i++) {\n require(data[i] == removeAuthorizedAddressSignature[i]);\n }\n return true;\n }\n}\n", - "2.0.0/multisig/MultiSigWallet.sol": "// solhint-disable\npragma solidity ^0.4.10;\n\n\n/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.\n/// @author Stefan George - \ncontract MultiSigWallet {\n\n uint constant public MAX_OWNER_COUNT = 50;\n\n event Confirmation(address indexed sender, uint indexed transactionId);\n event Revocation(address indexed sender, uint indexed transactionId);\n event Submission(uint indexed transactionId);\n event Execution(uint indexed transactionId);\n event ExecutionFailure(uint indexed transactionId);\n event Deposit(address indexed sender, uint value);\n event OwnerAddition(address indexed owner);\n event OwnerRemoval(address indexed owner);\n event RequirementChange(uint required);\n\n mapping (uint => Transaction) public transactions;\n mapping (uint => mapping (address => bool)) public confirmations;\n mapping (address => bool) public isOwner;\n address[] public owners;\n uint public required;\n uint public transactionCount;\n\n struct Transaction {\n address destination;\n uint value;\n bytes data;\n bool executed;\n }\n\n modifier onlyWallet() {\n if (msg.sender != address(this))\n throw;\n _;\n }\n\n modifier ownerDoesNotExist(address owner) {\n if (isOwner[owner])\n throw;\n _;\n }\n\n modifier ownerExists(address owner) {\n if (!isOwner[owner])\n throw;\n _;\n }\n\n modifier transactionExists(uint transactionId) {\n if (transactions[transactionId].destination == 0)\n throw;\n _;\n }\n\n modifier confirmed(uint transactionId, address owner) {\n if (!confirmations[transactionId][owner])\n throw;\n _;\n }\n\n modifier notConfirmed(uint transactionId, address owner) {\n if (confirmations[transactionId][owner])\n throw;\n _;\n }\n\n modifier notExecuted(uint transactionId) {\n if (transactions[transactionId].executed)\n throw;\n _;\n }\n\n modifier notNull(address _address) {\n if (_address == 0)\n throw;\n _;\n }\n\n modifier validRequirement(uint ownerCount, uint _required) {\n if ( ownerCount > MAX_OWNER_COUNT\n || _required > ownerCount\n || _required == 0\n || ownerCount == 0)\n throw;\n _;\n }\n\n /// @dev Fallback function allows to deposit ether.\n function()\n payable\n {\n if (msg.value > 0)\n Deposit(msg.sender, msg.value);\n }\n\n /*\n * Public functions\n */\n /// @dev Contract constructor sets initial owners and required number of confirmations.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n function MultiSigWallet(address[] _owners, uint _required)\n public\n validRequirement(_owners.length, _required)\n {\n for (uint i=0; i<_owners.length; i++) {\n if (isOwner[_owners[i]] || _owners[i] == 0)\n throw;\n isOwner[_owners[i]] = true;\n }\n owners = _owners;\n required = _required;\n }\n\n /// @dev Allows to add a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of new owner.\n function addOwner(address owner)\n public\n onlyWallet\n ownerDoesNotExist(owner)\n notNull(owner)\n validRequirement(owners.length + 1, required)\n {\n isOwner[owner] = true;\n owners.push(owner);\n OwnerAddition(owner);\n }\n\n /// @dev Allows to remove an owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner.\n function removeOwner(address owner)\n public\n onlyWallet\n ownerExists(owner)\n {\n isOwner[owner] = false;\n for (uint i=0; i owners.length)\n changeRequirement(owners.length);\n OwnerRemoval(owner);\n }\n\n /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.\n /// @param owner Address of owner to be replaced.\n /// @param owner Address of new owner.\n function replaceOwner(address owner, address newOwner)\n public\n onlyWallet\n ownerExists(owner)\n ownerDoesNotExist(newOwner)\n {\n for (uint i=0; i\ncontract MultiSigWalletWithTimeLock is MultiSigWallet {\n\n event ConfirmationTimeSet(uint indexed transactionId, uint confirmationTime);\n event TimeLockChange(uint secondsTimeLocked);\n\n uint public secondsTimeLocked;\n\n mapping (uint => uint) public confirmationTimes;\n\n modifier notFullyConfirmed(uint transactionId) {\n require(!isConfirmed(transactionId));\n _;\n }\n\n modifier fullyConfirmed(uint transactionId) {\n require(isConfirmed(transactionId));\n _;\n }\n\n modifier pastTimeLock(uint transactionId) {\n require(block.timestamp >= confirmationTimes[transactionId] + secondsTimeLocked);\n _;\n }\n\n /*\n * Public functions\n */\n\n /// @dev Contract constructor sets initial owners, required number of confirmations, and time lock.\n /// @param _owners List of initial owners.\n /// @param _required Number of required confirmations.\n /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds.\n function MultiSigWalletWithTimeLock(address[] _owners, uint _required, uint _secondsTimeLocked)\n public\n MultiSigWallet(_owners, _required)\n {\n secondsTimeLocked = _secondsTimeLocked;\n }\n\n /// @dev Changes the duration of the time lock for transactions.\n /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds.\n function changeTimeLock(uint _secondsTimeLocked)\n public\n onlyWallet\n {\n secondsTimeLocked = _secondsTimeLocked;\n TimeLockChange(_secondsTimeLocked);\n }\n\n /// @dev Allows an owner to confirm a transaction.\n /// @param transactionId Transaction ID.\n function confirmTransaction(uint transactionId)\n public\n ownerExists(msg.sender)\n transactionExists(transactionId)\n notConfirmed(transactionId, msg.sender)\n notFullyConfirmed(transactionId)\n {\n confirmations[transactionId][msg.sender] = true;\n Confirmation(msg.sender, transactionId);\n if (isConfirmed(transactionId)) {\n setConfirmationTime(transactionId, block.timestamp);\n }\n }\n\n /// @dev Allows an owner to revoke a confirmation for a transaction.\n /// @param transactionId Transaction ID.\n function revokeConfirmation(uint transactionId)\n public\n ownerExists(msg.sender)\n confirmed(transactionId, msg.sender)\n notExecuted(transactionId)\n notFullyConfirmed(transactionId)\n {\n confirmations[transactionId][msg.sender] = false;\n Revocation(msg.sender, transactionId);\n }\n\n /// @dev Allows anyone to execute a confirmed transaction.\n /// @param transactionId Transaction ID.\n function executeTransaction(uint transactionId)\n public\n notExecuted(transactionId)\n fullyConfirmed(transactionId)\n pastTimeLock(transactionId)\n {\n Transaction storage tx = transactions[transactionId];\n tx.executed = true;\n if (tx.destination.call.value(tx.value)(tx.data))\n Execution(transactionId);\n else {\n ExecutionFailure(transactionId);\n tx.executed = false;\n }\n }\n\n /*\n * Internal functions\n */\n\n /// @dev Sets the time of when a submission first passed.\n function setConfirmationTime(uint transactionId, uint confirmationTime)\n internal\n {\n confirmationTimes[transactionId] = confirmationTime;\n ConfirmationTimeSet(transactionId, confirmationTime);\n }\n}\n" - }, - "sourceTreeHashHex": "0x7cb47ea5f197fd4d76a79a9f2680ae188849d8642c097a098b73da6133f966f4", - "compiler": { - "name": "solc", - "version": "soljson-v0.4.24+commit.e67f0147.js", - "settings": { - "optimizer": { - "enabled": true, - "runs": 1000000 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode.object", - "evm.bytecode.sourceMap", - "evm.deployedBytecode.object", - "evm.deployedBytecode.sourceMap" - ] - } - } - } - }, - "networks": {} -} \ No newline at end of file diff --git a/packages/migrations/artifacts/2.0.0/WETH9.json b/packages/migrations/artifacts/2.0.0/WETH9.json index 5b9e11425..721dbe291 100644 --- a/packages/migrations/artifacts/2.0.0/WETH9.json +++ b/packages/migrations/artifacts/2.0.0/WETH9.json @@ -326,11 +326,5 @@ } } }, - "networks": { - "50": { - "address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082", - "links": {}, - "constructorArgs": "[]" - } - } + "networks": {} } \ No newline at end of file diff --git a/packages/migrations/artifacts/2.0.0/ZRXToken.json b/packages/migrations/artifacts/2.0.0/ZRXToken.json index 0ce91c1c1..becbb83df 100644 --- a/packages/migrations/artifacts/2.0.0/ZRXToken.json +++ b/packages/migrations/artifacts/2.0.0/ZRXToken.json @@ -10028,4 +10028,4 @@ "constructorArgs": "[]" } } -} \ No newline at end of file +} diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 90291a172..7774b61b0 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -213,6 +213,7 @@ export enum RevertReason { ValueGreaterThanZero = 'VALUE_GREATER_THAN_ZERO', InvalidMsgValue = 'INVALID_MSG_VALUE', InsufficientEthRemaining = 'INSUFFICIENT_ETH_REMAINING', + Uint256Overflow = 'UINT256_OVERFLOW', } export enum StatusCodes { diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json index c5f82d73b..8abfbaf43 100644 --- a/packages/utils/CHANGELOG.json +++ b/packages/utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "1.0.5", + "changes": [ + { + "note": "Increased BigNumber decimal precision from 20 to 78", + "pr": 807 + } + ] + }, { "timestamp": 1532619515, "version": "1.0.4", diff --git a/packages/utils/src/configured_bignumber.ts b/packages/utils/src/configured_bignumber.ts index e44c062c2..2b22b6938 100644 --- a/packages/utils/src/configured_bignumber.ts +++ b/packages/utils/src/configured_bignumber.ts @@ -1,9 +1,14 @@ import { BigNumber } from 'bignumber.js'; -// By default BigNumber's `toString` method converts to exponential notation if the value has -// more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number BigNumber.config({ + // By default BigNumber's `toString` method converts to exponential notation if the value has + // more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number EXPONENTIAL_AT: 1000, + // Note(albrow): This is the lowest value for which + // `x.div(y).floor() === x.divToInt(y)` + // for all values of x and y <= MAX_UINT256, where MAX_UINT256 is the + // maximum number represented by the uint256 type in Solidity (2^256-1). + DECIMAL_PLACES: 78, }); export { BigNumber }; -- cgit v1.2.3