diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-05-25 04:03:17 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-06-08 06:36:18 +0800 |
commit | bc0edd40427944349ac0c3e367c9638a1c7797dd (patch) | |
tree | 258c47aec8f342aef3438c71fcc524acfef46d60 | |
parent | 9b82e2df58cfd7f4dc9954fa93167450919f457f (diff) | |
download | dexon-sol-tools-bc0edd40427944349ac0c3e367c9638a1c7797dd.tar dexon-sol-tools-bc0edd40427944349ac0c3e367c9638a1c7797dd.tar.gz dexon-sol-tools-bc0edd40427944349ac0c3e367c9638a1c7797dd.tar.bz2 dexon-sol-tools-bc0edd40427944349ac0c3e367c9638a1c7797dd.tar.lz dexon-sol-tools-bc0edd40427944349ac0c3e367c9638a1c7797dd.tar.xz dexon-sol-tools-bc0edd40427944349ac0c3e367c9638a1c7797dd.tar.zst dexon-sol-tools-bc0edd40427944349ac0c3e367c9638a1c7797dd.zip |
LibAssetProxyDecoder tests
3 files changed, 70 insertions, 35 deletions
diff --git a/packages/contracts/src/contracts/current/test/TestLibAssetProxyDecoder/TestLibAssetProxyDecoder.sol b/packages/contracts/src/contracts/current/test/TestLibAssetProxyDecoder/TestLibAssetProxyDecoder.sol index ac7cd63ab..e4a7de71d 100644 --- a/packages/contracts/src/contracts/current/test/TestLibAssetProxyDecoder/TestLibAssetProxyDecoder.sol +++ b/packages/contracts/src/contracts/current/test/TestLibAssetProxyDecoder/TestLibAssetProxyDecoder.sol @@ -36,7 +36,7 @@ contract TestLibAssetProxyDecoder is /// @dev Decodes ERC721 Asset Proxy data function publicDecodeERC721Data(bytes memory proxyData) - internal + public pure returns ( uint8, diff --git a/packages/contracts/test/asset_proxy/decoder.ts b/packages/contracts/test/asset_proxy/decoder.ts index 74e7547d3..b35cd0d43 100644 --- a/packages/contracts/test/asset_proxy/decoder.ts +++ b/packages/contracts/test/asset_proxy/decoder.ts @@ -9,23 +9,26 @@ import * as Web3 from 'web3'; import { TestLibAssetProxyDecoderContract } from '../../src/contract_wrappers/generated/test_lib_asset_proxy_decoder'; import { artifacts } from '../../src/utils/artifacts'; +import { assetProxyUtils } from '../../src/utils/asset_proxy_utils'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; -import { AssetProxyId } from '../../src/utils/types'; +import { AssetProxyId, ERC20ProxyData, ERC721ProxyData, ProxyData } from '../../src/utils/types'; import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper'; chaiSetup.configure(); const expect = chai.expect; const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); -describe.only('AssetProxyDecoder', () => { +describe.only('LibAssetProxyDecoder', () => { let owner: string; let testAssetProxyDecoder: TestLibAssetProxyDecoderContract; + let testAddress: string; before(async () => { // Setup accounts & addresses const accounts = await web3Wrapper.getAvailableAddressesAsync(); owner = accounts[0]; + testAddress = accounts[1]; // Deploy TestLibMem testAssetProxyDecoder = await TestLibAssetProxyDecoderContract.deployFrom0xArtifactAsync( artifacts.TestLibAssetProxyDecoder, @@ -41,32 +44,33 @@ describe.only('AssetProxyDecoder', () => { }); describe('LibAssetProxyDecoder', () => { - /*it('should )', async () => { - await testAssetProxyDecoder.test1.sendTransactionAsync(); + it('should correctly decode ERC20 proxy data)', async () => { + const encodedProxyData = assetProxyUtils.encodeERC20ProxyData(testAddress); + const expectedDecodedProxyData = assetProxyUtils.decodeERC20ProxyData(encodedProxyData); + let decodedAssetProxyId: number; + let decodedTokenAddress: string; + [decodedAssetProxyId, decodedTokenAddress] = await testAssetProxyDecoder.publicDecodeERC20Data.callAsync( + encodedProxyData, + ); + expect(decodedAssetProxyId).to.be.equal(expectedDecodedProxyData.assetProxyId); + expect(decodedTokenAddress).to.be.equal(expectedDecodedProxyData.tokenAddress); }); - it('should )', async () => { - await testLibMem.test2.sendTransactionAsync(); + it('should correctly decode ERC721 proxy data)', async () => { + const tokenId = ZeroEx.generatePseudoRandomSalt(); + const encodedProxyData = assetProxyUtils.encodeERC721ProxyData(testAddress, tokenId); + const expectedDecodedProxyData = assetProxyUtils.decodeERC721ProxyData(encodedProxyData); + let decodedAssetProxyId: number; + let decodedTokenAddress: string; + let decodedTokenId: BigNumber; + [ + decodedAssetProxyId, + decodedTokenAddress, + decodedTokenId, + ] = await testAssetProxyDecoder.publicDecodeERC721Data.callAsync(encodedProxyData); + expect(decodedAssetProxyId).to.be.equal(expectedDecodedProxyData.assetProxyId); + expect(decodedTokenAddress).to.be.equal(expectedDecodedProxyData.tokenAddress); + expect(decodedTokenId).to.be.bignumber.equal(expectedDecodedProxyData.tokenId); }); - - it('should )', async () => { - await testLibMem.test3.sendTransactionAsync(); - }); - - it('should )', async () => { - await testLibMem.test4.sendTransactionAsync(); - }); - - it('should )', async () => { - await testLibMem.test5.sendTransactionAsync(); - }); - - it('should )', async () => { - await testLibMem.test6.sendTransactionAsync(); - }); - - it('should )', async () => { - return expect(testLibMem.test7.sendTransactionAsync()).to.be.rejectedWith(constants.REVERT); - });*/ }); }); diff --git a/packages/migrations/artifacts/2.0.0/TestLibAssetProxyDecoder.json b/packages/migrations/artifacts/2.0.0/TestLibAssetProxyDecoder.json index 0437766c7..40790e39f 100644 --- a/packages/migrations/artifacts/2.0.0/TestLibAssetProxyDecoder.json +++ b/packages/migrations/artifacts/2.0.0/TestLibAssetProxyDecoder.json @@ -11,6 +11,37 @@ "type": "bytes" } ], + "name": "publicDecodeERC721Data", + "outputs": [ + { + "name": "", + "type": "uint8" + }, + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "proxyData", + "type": "bytes" + } + ], "name": "publicDecodeERC20Data", "outputs": [ { @@ -30,15 +61,15 @@ "evm": { "bytecode": { "linkReferences": {}, - "object": "0x608060405234801561001057600080fd5b506103a7806100206000396000f3006080604052600436106100275763ffffffff60e060020a600035041663bd27c22d811461002c575b600080fd5b34801561003857600080fd5b5061004c610047366004610208565b610063565b60405161005a9291906102a9565b60405180910390f35b60008061006f83610078565b91509150915091565b6000808251601514606060405190810160405280602281526020017f4d65746164617461206d75737420686176652061206c656e677468206f662032815260200160f160020a611897028152509015156100f15760405160e560020a62461bcd0281526004016100e89190610291565b60405180910390fd5b5082600081518110151561010157fe5b016020015160f860020a90819004810204915061011f836001610126565b9050915091565b60008160140183511015606060405190810160405280602b81526020017f4c656e677468206d7573742062652067726561746572207468616e206f722065815260200160a960020a6a38bab0b6103a3790191817028152509015156101a15760405160e560020a62461bcd0281526004016100e89190610291565b50500160140151600160a060020a031690565b6000601f820183136101c557600080fd5b81356101d86101d3826102ea565b6102c4565b915080825260208301602083018583830111156101f457600080fd5b6101ff838284610327565b50505092915050565b60006020828403121561021a57600080fd5b81356001604060020a0381111561023057600080fd5b61023c848285016101b4565b949350505050565b61024d81610315565b82525050565b600061025e82610311565b808452610272816020860160208601610333565b61027b81610363565b9093016020019392505050565b61024d81610321565b602080825281016102a28184610253565b9392505050565b604081016102b78285610288565b6102a26020830184610244565b6040518181016001604060020a03811182821017156102e257600080fd5b604052919050565b60006001604060020a0382111561030057600080fd5b506020601f91909101601f19160190565b5190565b600160a060020a031690565b60ff1690565b82818337506000910152565b60005b8381101561034e578181015183820152602001610336565b8381111561035d576000848401525b50505050565b601f01601f1916905600a265627a7a7230582008b76108b6bf36a2766e799f617e47a5feab326e99d46ea5c5bcb8d7dfc682db6c6578706572696d656e74616cf50037", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x3A7 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x27 JUMPI PUSH4 0xFFFFFFFF PUSH1 0xE0 PUSH1 0x2 EXP PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0xBD27C22D DUP2 EQ PUSH2 0x2C JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x38 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4C PUSH2 0x47 CALLDATASIZE PUSH1 0x4 PUSH2 0x208 JUMP JUMPDEST PUSH2 0x63 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x5A SWAP3 SWAP2 SWAP1 PUSH2 0x2A9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x6F DUP4 PUSH2 0x78 JUMP JUMPDEST SWAP2 POP SWAP2 POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x15 EQ PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D65746164617461206D75737420686176652061206C656E677468206F662032 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xF1 PUSH1 0x2 EXP PUSH2 0x1897 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0xF1 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE8 SWAP2 SWAP1 PUSH2 0x291 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP DUP3 PUSH1 0x0 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x101 JUMPI INVALID JUMPDEST ADD PUSH1 0x20 ADD MLOAD PUSH1 0xF8 PUSH1 0x2 EXP SWAP1 DUP2 SWAP1 DIV DUP2 MUL DIV SWAP2 POP PUSH2 0x11F DUP4 PUSH1 0x1 PUSH2 0x126 JUMP JUMPDEST SWAP1 POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x14 ADD DUP4 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4C656E677468206D7573742062652067726561746572207468616E206F722065 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790191817 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x1A1 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE8 SWAP2 SWAP1 PUSH2 0x291 JUMP JUMPDEST POP POP ADD PUSH1 0x14 ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1F DUP3 ADD DUP4 SGT PUSH2 0x1C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1D8 PUSH2 0x1D3 DUP3 PUSH2 0x2EA JUMP JUMPDEST PUSH2 0x2C4 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE PUSH1 0x20 DUP4 ADD PUSH1 0x20 DUP4 ADD DUP6 DUP4 DUP4 ADD GT ISZERO PUSH2 0x1F4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FF DUP4 DUP3 DUP5 PUSH2 0x327 JUMP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x21A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP2 GT ISZERO PUSH2 0x230 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x23C DUP5 DUP3 DUP6 ADD PUSH2 0x1B4 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x24D DUP2 PUSH2 0x315 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x25E DUP3 PUSH2 0x311 JUMP JUMPDEST DUP1 DUP5 MSTORE PUSH2 0x272 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x333 JUMP JUMPDEST PUSH2 0x27B DUP2 PUSH2 0x363 JUMP JUMPDEST SWAP1 SWAP4 ADD PUSH1 0x20 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x24D DUP2 PUSH2 0x321 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x2A2 DUP2 DUP5 PUSH2 0x253 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP2 ADD PUSH2 0x2B7 DUP3 DUP6 PUSH2 0x288 JUMP JUMPDEST PUSH2 0x2A2 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x244 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x2E2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP3 GT ISZERO PUSH2 0x300 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x1F SWAP2 SWAP1 SWAP2 ADD PUSH1 0x1F NOT AND ADD SWAP1 JUMP JUMPDEST MLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0xFF AND SWAP1 JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x34E JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x336 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x35D JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP1 JUMP STOP LOG2 PUSH6 0x627A7A723058 KECCAK256 ADDMOD 0xb7 PUSH2 0x8B6 0xbf CALLDATASIZE LOG2 PUSH23 0x6E799F617E47A5FEAB326E99D46EA5C5BCB8D7DFC682DB PUSH13 0x6578706572696D656E74616CF5 STOP CALLDATACOPY ", - "sourceMap": "709:592:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;709:592:0;;;;;;;" + "object": "0x608060405234801561001057600080fd5b50610791806100206000396000f3006080604052600436106100325763ffffffff60e060020a60003504166372c2f5278114610037578063bd27c22d14610070575b600080fd5b34801561004357600080fd5b5061005761005236600461058c565b61009e565b604051610067949392919061064a565b60405180910390f35b34801561007c57600080fd5b5061009061008b36600461058c565b6100bd565b60405161006792919061062f565b600080600060606100ae856100d2565b93509350935093509193509193565b6000806100c9836101b5565b91509150915091565b60008060006060603585511015606060405190810160405280602b81526020017f4d65746164617461206d75737420686176652061206c656e677468206f662061815260200160a960020a6a3a103632b0b9ba101a9997028152509015156101595760405160e560020a62461bcd028152600401610150919061061e565b60405180910390fd5b5084600081518110151561016957fe5b016020015160f860020a90819004810204935061018785600161025a565b92506101948560156102d6565b91506035855111156101ae576101ab8560356102e9565b90505b9193509193565b6000808251601514606060405190810160405280602281526020017f4d65746164617461206d75737420686176652061206c656e677468206f662032815260200160f160020a611897028152509015156102255760405160e560020a62461bcd028152600401610150919061061e565b5082600081518110151561023557fe5b016020015160f860020a90819004810204915061025383600161025a565b9050915091565b60008160140183511015606060405190810160405280602b8152602001600080516020610738833981519152815260200160a960020a6a38bab0b6103a3790191817028152509015156102c35760405160e560020a62461bcd028152600401610150919061061e565b50500160140151600160a060020a031690565b60006102e28383610426565b9392505050565b606060008260200184511015606060405190810160405280602b8152602001600080516020610738833981519152815260200160a960020a6a38bab0b6103a3790199917028152509015156103545760405160e560020a62461bcd028152600401610150919061061e565b5061035f84846102d6565b905080836020010184511015606060405190810160405280602b8152602001600080516020610738833981519152815260200160a960020a6a38bab0b6103a3790199917028152509015156103ca5760405160e560020a62461bcd028152600401610150919061061e565b50806040519080825280601f01601f1916602001820160405280156103f9578160200160208202803883390190505b50915061041f61040883610499565b6020018461041587610499565b016020018361049c565b5092915050565b60008160200183511015606060405190810160405280602b8152602001600080516020610738833981519152815260200160a960020a6a38bab0b6103a37901999170281525090151561048f5760405160e560020a62461bcd028152600401610150919061061e565b5050016020015190565b90565b8015156104a857610533565b828214156104b557610533565b6020601f8201046020820660008111156104d0576001820391505b6000602083025b808210156104f25781860151828801526020820191506104d7565b600083111561052e578260200360080260020a8287015181828204028560080260020a858b0151818282020480841780898f0152505050505050505b505050505b505050565b6000601f8201831361054957600080fd5b813561055c610557826106b4565b61068e565b9150808252602083016020830185838301111561057857600080fd5b6105838382846106f1565b50505092915050565b60006020828403121561059e57600080fd5b81356001604060020a038111156105b457600080fd5b6105c084828501610538565b949350505050565b6105d1816106df565b82525050565b60006105e2826106db565b8084526105f68160208601602086016106fd565b6105ff8161072d565b9093016020019392505050565b6105d181610499565b6105d1816106eb565b602080825281016102e281846105d7565b6040810161063d8285610615565b6102e260208301846105c8565b608081016106588287610615565b61066560208301866105c8565b610672604083018561060c565b818103606083015261068481846105d7565b9695505050505050565b6040518181016001604060020a03811182821017156106ac57600080fd5b604052919050565b60006001604060020a038211156106ca57600080fd5b506020601f91909101601f19160190565b5190565b600160a060020a031690565b60ff1690565b82818337506000910152565b60005b83811015610718578181015183820152602001610700565b83811115610727576000848401525b50505050565b601f01601f19169056004c656e677468206d7573742062652067726561746572207468616e206f722065a265627a7a723058205132eb7448f5b6279dedd3c042e96fb9ea0d8a8aea79044353638cf00546165f6c6578706572696d656e74616cf50037", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x791 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x32 JUMPI PUSH4 0xFFFFFFFF PUSH1 0xE0 PUSH1 0x2 EXP PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x72C2F527 DUP2 EQ PUSH2 0x37 JUMPI DUP1 PUSH4 0xBD27C22D EQ PUSH2 0x70 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x43 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x57 PUSH2 0x52 CALLDATASIZE PUSH1 0x4 PUSH2 0x58C JUMP JUMPDEST PUSH2 0x9E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x67 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x64A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x90 PUSH2 0x8B CALLDATASIZE PUSH1 0x4 PUSH2 0x58C JUMP JUMPDEST PUSH2 0xBD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x67 SWAP3 SWAP2 SWAP1 PUSH2 0x62F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 PUSH2 0xAE DUP6 PUSH2 0xD2 JUMP JUMPDEST SWAP4 POP SWAP4 POP SWAP4 POP SWAP4 POP SWAP2 SWAP4 POP SWAP2 SWAP4 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xC9 DUP4 PUSH2 0x1B5 JUMP JUMPDEST SWAP2 POP SWAP2 POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 PUSH1 0x35 DUP6 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D65746164617461206D75737420686176652061206C656E677468206F662061 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x3A103632B0B9BA101A9997 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x159 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP DUP5 PUSH1 0x0 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x169 JUMPI INVALID JUMPDEST ADD PUSH1 0x20 ADD MLOAD PUSH1 0xF8 PUSH1 0x2 EXP SWAP1 DUP2 SWAP1 DIV DUP2 MUL DIV SWAP4 POP PUSH2 0x187 DUP6 PUSH1 0x1 PUSH2 0x25A JUMP JUMPDEST SWAP3 POP PUSH2 0x194 DUP6 PUSH1 0x15 PUSH2 0x2D6 JUMP JUMPDEST SWAP2 POP PUSH1 0x35 DUP6 MLOAD GT ISZERO PUSH2 0x1AE JUMPI PUSH2 0x1AB DUP6 PUSH1 0x35 PUSH2 0x2E9 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP2 SWAP4 POP SWAP2 SWAP4 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x15 EQ PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D65746164617461206D75737420686176652061206C656E677468206F662032 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xF1 PUSH1 0x2 EXP PUSH2 0x1897 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x225 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP DUP3 PUSH1 0x0 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x235 JUMPI INVALID JUMPDEST ADD PUSH1 0x20 ADD MLOAD PUSH1 0xF8 PUSH1 0x2 EXP SWAP1 DUP2 SWAP1 DIV DUP2 MUL DIV SWAP2 POP PUSH2 0x253 DUP4 PUSH1 0x1 PUSH2 0x25A JUMP JUMPDEST SWAP1 POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x14 ADD DUP4 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x738 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790191817 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x2C3 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP POP ADD PUSH1 0x14 ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E2 DUP4 DUP4 PUSH2 0x426 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 PUSH1 0x20 ADD DUP5 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x738 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790199917 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x354 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP PUSH2 0x35F DUP5 DUP5 PUSH2 0x2D6 JUMP JUMPDEST SWAP1 POP DUP1 DUP4 PUSH1 0x20 ADD ADD DUP5 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x738 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790199917 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x3CA JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP DUP1 PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3F9 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH2 0x41F PUSH2 0x408 DUP4 PUSH2 0x499 JUMP JUMPDEST PUSH1 0x20 ADD DUP5 PUSH2 0x415 DUP8 PUSH2 0x499 JUMP JUMPDEST ADD PUSH1 0x20 ADD DUP4 PUSH2 0x49C JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x20 ADD DUP4 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x738 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790199917 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x48F JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP POP ADD PUSH1 0x20 ADD MLOAD SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST DUP1 ISZERO ISZERO PUSH2 0x4A8 JUMPI PUSH2 0x533 JUMP JUMPDEST DUP3 DUP3 EQ ISZERO PUSH2 0x4B5 JUMPI PUSH2 0x533 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x1F DUP3 ADD DIV PUSH1 0x20 DUP3 MOD PUSH1 0x0 DUP2 GT ISZERO PUSH2 0x4D0 JUMPI PUSH1 0x1 DUP3 SUB SWAP2 POP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP4 MUL JUMPDEST DUP1 DUP3 LT ISZERO PUSH2 0x4F2 JUMPI DUP2 DUP7 ADD MLOAD DUP3 DUP9 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH2 0x4D7 JUMP JUMPDEST PUSH1 0x0 DUP4 GT ISZERO PUSH2 0x52E JUMPI DUP3 PUSH1 0x20 SUB PUSH1 0x8 MUL PUSH1 0x2 EXP DUP3 DUP8 ADD MLOAD DUP2 DUP3 DUP3 DIV MUL DUP6 PUSH1 0x8 MUL PUSH1 0x2 EXP DUP6 DUP12 ADD MLOAD DUP2 DUP3 DUP3 MUL DIV DUP1 DUP5 OR DUP1 DUP10 DUP16 ADD MSTORE POP POP POP POP POP POP POP JUMPDEST POP POP POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1F DUP3 ADD DUP4 SGT PUSH2 0x549 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x55C PUSH2 0x557 DUP3 PUSH2 0x6B4 JUMP JUMPDEST PUSH2 0x68E JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE PUSH1 0x20 DUP4 ADD PUSH1 0x20 DUP4 ADD DUP6 DUP4 DUP4 ADD GT ISZERO PUSH2 0x578 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x583 DUP4 DUP3 DUP5 PUSH2 0x6F1 JUMP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x59E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP2 GT ISZERO PUSH2 0x5B4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x5C0 DUP5 DUP3 DUP6 ADD PUSH2 0x538 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x5D1 DUP2 PUSH2 0x6DF JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E2 DUP3 PUSH2 0x6DB JUMP JUMPDEST DUP1 DUP5 MSTORE PUSH2 0x5F6 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x6FD JUMP JUMPDEST PUSH2 0x5FF DUP2 PUSH2 0x72D JUMP JUMPDEST SWAP1 SWAP4 ADD PUSH1 0x20 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x5D1 DUP2 PUSH2 0x499 JUMP JUMPDEST PUSH2 0x5D1 DUP2 PUSH2 0x6EB JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x2E2 DUP2 DUP5 PUSH2 0x5D7 JUMP JUMPDEST PUSH1 0x40 DUP2 ADD PUSH2 0x63D DUP3 DUP6 PUSH2 0x615 JUMP JUMPDEST PUSH2 0x2E2 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x5C8 JUMP JUMPDEST PUSH1 0x80 DUP2 ADD PUSH2 0x658 DUP3 DUP8 PUSH2 0x615 JUMP JUMPDEST PUSH2 0x665 PUSH1 0x20 DUP4 ADD DUP7 PUSH2 0x5C8 JUMP JUMPDEST PUSH2 0x672 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x60C JUMP JUMPDEST DUP2 DUP2 SUB PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x684 DUP2 DUP5 PUSH2 0x5D7 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x6AC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP3 GT ISZERO PUSH2 0x6CA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x1F SWAP2 SWAP1 SWAP2 ADD PUSH1 0x1F NOT AND ADD SWAP1 JUMP JUMPDEST MLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0xFF AND SWAP1 JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x718 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x700 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x727 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP1 JUMP STOP 0x4c PUSH6 0x6E677468206D PUSH22 0x73742062652067726561746572207468616E206F7220 PUSH6 0xA265627A7A72 ADDRESS PC KECCAK256 MLOAD ORIGIN 0xeb PUSH21 0x48F5B6279DEDD3C042E96FB9EA0D8A8AEA79044353 PUSH4 0x8CF00546 AND 0x5f PUSH13 0x6578706572696D656E74616CF5 STOP CALLDATACOPY ", + "sourceMap": "709:590:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;709:590:0;;;;;;;" }, "deployedBytecode": { "linkReferences": {}, - "object": "0x6080604052600436106100275763ffffffff60e060020a600035041663bd27c22d811461002c575b600080fd5b34801561003857600080fd5b5061004c610047366004610208565b610063565b60405161005a9291906102a9565b60405180910390f35b60008061006f83610078565b91509150915091565b6000808251601514606060405190810160405280602281526020017f4d65746164617461206d75737420686176652061206c656e677468206f662032815260200160f160020a611897028152509015156100f15760405160e560020a62461bcd0281526004016100e89190610291565b60405180910390fd5b5082600081518110151561010157fe5b016020015160f860020a90819004810204915061011f836001610126565b9050915091565b60008160140183511015606060405190810160405280602b81526020017f4c656e677468206d7573742062652067726561746572207468616e206f722065815260200160a960020a6a38bab0b6103a3790191817028152509015156101a15760405160e560020a62461bcd0281526004016100e89190610291565b50500160140151600160a060020a031690565b6000601f820183136101c557600080fd5b81356101d86101d3826102ea565b6102c4565b915080825260208301602083018583830111156101f457600080fd5b6101ff838284610327565b50505092915050565b60006020828403121561021a57600080fd5b81356001604060020a0381111561023057600080fd5b61023c848285016101b4565b949350505050565b61024d81610315565b82525050565b600061025e82610311565b808452610272816020860160208601610333565b61027b81610363565b9093016020019392505050565b61024d81610321565b602080825281016102a28184610253565b9392505050565b604081016102b78285610288565b6102a26020830184610244565b6040518181016001604060020a03811182821017156102e257600080fd5b604052919050565b60006001604060020a0382111561030057600080fd5b506020601f91909101601f19160190565b5190565b600160a060020a031690565b60ff1690565b82818337506000910152565b60005b8381101561034e578181015183820152602001610336565b8381111561035d576000848401525b50505050565b601f01601f1916905600a265627a7a7230582008b76108b6bf36a2766e799f617e47a5feab326e99d46ea5c5bcb8d7dfc682db6c6578706572696d656e74616cf50037", - "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x27 JUMPI PUSH4 0xFFFFFFFF PUSH1 0xE0 PUSH1 0x2 EXP PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0xBD27C22D DUP2 EQ PUSH2 0x2C JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x38 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x4C PUSH2 0x47 CALLDATASIZE PUSH1 0x4 PUSH2 0x208 JUMP JUMPDEST PUSH2 0x63 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x5A SWAP3 SWAP2 SWAP1 PUSH2 0x2A9 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x6F DUP4 PUSH2 0x78 JUMP JUMPDEST SWAP2 POP SWAP2 POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x15 EQ PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D65746164617461206D75737420686176652061206C656E677468206F662032 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xF1 PUSH1 0x2 EXP PUSH2 0x1897 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0xF1 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE8 SWAP2 SWAP1 PUSH2 0x291 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP DUP3 PUSH1 0x0 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x101 JUMPI INVALID JUMPDEST ADD PUSH1 0x20 ADD MLOAD PUSH1 0xF8 PUSH1 0x2 EXP SWAP1 DUP2 SWAP1 DIV DUP2 MUL DIV SWAP2 POP PUSH2 0x11F DUP4 PUSH1 0x1 PUSH2 0x126 JUMP JUMPDEST SWAP1 POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x14 ADD DUP4 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4C656E677468206D7573742062652067726561746572207468616E206F722065 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790191817 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x1A1 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0xE8 SWAP2 SWAP1 PUSH2 0x291 JUMP JUMPDEST POP POP ADD PUSH1 0x14 ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1F DUP3 ADD DUP4 SGT PUSH2 0x1C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1D8 PUSH2 0x1D3 DUP3 PUSH2 0x2EA JUMP JUMPDEST PUSH2 0x2C4 JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE PUSH1 0x20 DUP4 ADD PUSH1 0x20 DUP4 ADD DUP6 DUP4 DUP4 ADD GT ISZERO PUSH2 0x1F4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1FF DUP4 DUP3 DUP5 PUSH2 0x327 JUMP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x21A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP2 GT ISZERO PUSH2 0x230 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x23C DUP5 DUP3 DUP6 ADD PUSH2 0x1B4 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x24D DUP2 PUSH2 0x315 JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x25E DUP3 PUSH2 0x311 JUMP JUMPDEST DUP1 DUP5 MSTORE PUSH2 0x272 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x333 JUMP JUMPDEST PUSH2 0x27B DUP2 PUSH2 0x363 JUMP JUMPDEST SWAP1 SWAP4 ADD PUSH1 0x20 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x24D DUP2 PUSH2 0x321 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x2A2 DUP2 DUP5 PUSH2 0x253 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP2 ADD PUSH2 0x2B7 DUP3 DUP6 PUSH2 0x288 JUMP JUMPDEST PUSH2 0x2A2 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x244 JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x2E2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP3 GT ISZERO PUSH2 0x300 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x1F SWAP2 SWAP1 SWAP2 ADD PUSH1 0x1F NOT AND ADD SWAP1 JUMP JUMPDEST MLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0xFF AND SWAP1 JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x34E JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x336 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x35D JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP1 JUMP STOP LOG2 PUSH6 0x627A7A723058 KECCAK256 ADDMOD 0xb7 PUSH2 0x8B6 0xbf CALLDATASIZE LOG2 PUSH23 0x6E799F617E47A5FEAB326E99D46EA5C5BCB8D7DFC682DB PUSH13 0x6578706572696D656E74616CF5 STOP CALLDATACOPY ", - "sourceMap": "709:592:0:-;;;;;;;;;-1:-1:-1;;;709:592:0;;;;;;;;;;;;;823:170;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;823:170:0;;;;;;;;;;;;;;;;;;;;;;;;;;;923:5;930:7;960:26;976:9;960:15;:26::i;:::-;953:33;;;;823:170;;;:::o;965:393:1:-;1074:13;1101;1160:9;:16;1180:2;1160:22;1196:29;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1196:29:1;;;1139:96;;;;;;;-1:-1:-1;;;;;1139:96:1;;;;;;;;;;;;;;;;;;;1261:9;1271:1;1261:12;;;;;;;;;;;;;;-1:-1:-1;;;1261:12:1;;;;;;1255:19;;-1:-1:-1;1292:25:1;1304:9;1315:1;1292:11;:25::i;:::-;1284:33;-1:-1:-1;965:393:1;;;:::o;2204:868:2:-;2325:14;2388:5;2396:2;2388:10;2376:1;:8;:22;;2440;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2440:22:2;;;2355:117;;;;;;;-1:-1:-1;;;;;2355:117:2;;;;;;;;;;-1:-1:-1;;2974:13:2;2719:2;2974:13;2968:20;-1:-1:-1;;;;;2964:69:2;;2204:868::o;6:440:-1:-;;100:4;88:17;;84:27;-1:-1;74:2;;125:1;122;115:12;74:2;162:6;149:20;184:64;199:48;240:6;199:48;;;184:64;;;175:73;;268:6;261:5;254:21;304:4;296:6;292:17;337:4;330:5;326:16;372:3;363:6;358:3;354:16;351:25;348:2;;;389:1;386;379:12;348:2;399:41;433:6;428:3;423;399:41;;;67:379;;;;;;;;454:345;;567:2;555:9;546:7;542:23;538:32;535:2;;;583:1;580;573:12;535:2;618:31;;-1:-1;;;;;658:30;;655:2;;;701:1;698;691:12;655:2;721:62;775:7;766:6;755:9;751:22;721:62;;;711:72;529:270;-1:-1;;;;529:270;806:110;879:31;904:5;879:31;;;874:3;867:44;861:55;;;923:292;;1021:35;1050:5;1021:35;;;1073:6;1068:3;1061:19;1085:63;1141:6;1134:4;1129:3;1125:14;1118:4;1111:5;1107:16;1085:63;;;1180:29;1202:6;1180:29;;;1160:50;;;1173:4;1160:50;;1001:214;-1:-1;;;1001:214;1222:104;1291:29;1314:5;1291:29;;1333:273;1457:2;1471:47;;;1442:18;;1532:64;1442:18;1582:6;1532:64;;;1524:72;1428:178;-1:-1;;;1428:178;1613:286;1745:2;1730:18;;1759:57;1734:9;1789:6;1759:57;;;1827:62;1885:2;1874:9;1870:18;1861:6;1827:62;;1906:256;1968:2;1962:9;1994:17;;;-1:-1;;;;;2054:34;;2090:22;;;2051:62;2048:2;;;2126:1;2123;2116:12;2048:2;2142;2135:22;1946:216;;-1:-1;1946:216;2169:258;;-1:-1;;;;;2304:6;2301:30;2298:2;;;2344:1;2341;2334:12;2298:2;-1:-1;2417:4;2388;2365:17;;;;-1:-1;;2361:33;2407:15;;2235:192;2434:88;2505:12;;2489:33;2529:128;-1:-1;;;;;2598:54;;2581:76;2664:88;2742:4;2731:16;;2714:38;2760:145;2841:6;2836:3;2831;2818:30;-1:-1;2897:1;2879:16;;2872:27;2811:94;2914:268;2979:1;2986:101;3000:6;2997:1;2994:13;2986:101;;;3067:11;;;3061:18;3048:11;;;3041:39;3022:2;3015:10;2986:101;;;3102:6;3099:1;3096:13;3093:2;;;3167:1;3158:6;3153:3;3149:16;3142:27;3093:2;2963:219;;;;;3190:97;3278:2;3258:14;-1:-1;;3254:28;;3238:49" + "object": "0x6080604052600436106100325763ffffffff60e060020a60003504166372c2f5278114610037578063bd27c22d14610070575b600080fd5b34801561004357600080fd5b5061005761005236600461058c565b61009e565b604051610067949392919061064a565b60405180910390f35b34801561007c57600080fd5b5061009061008b36600461058c565b6100bd565b60405161006792919061062f565b600080600060606100ae856100d2565b93509350935093509193509193565b6000806100c9836101b5565b91509150915091565b60008060006060603585511015606060405190810160405280602b81526020017f4d65746164617461206d75737420686176652061206c656e677468206f662061815260200160a960020a6a3a103632b0b9ba101a9997028152509015156101595760405160e560020a62461bcd028152600401610150919061061e565b60405180910390fd5b5084600081518110151561016957fe5b016020015160f860020a90819004810204935061018785600161025a565b92506101948560156102d6565b91506035855111156101ae576101ab8560356102e9565b90505b9193509193565b6000808251601514606060405190810160405280602281526020017f4d65746164617461206d75737420686176652061206c656e677468206f662032815260200160f160020a611897028152509015156102255760405160e560020a62461bcd028152600401610150919061061e565b5082600081518110151561023557fe5b016020015160f860020a90819004810204915061025383600161025a565b9050915091565b60008160140183511015606060405190810160405280602b8152602001600080516020610738833981519152815260200160a960020a6a38bab0b6103a3790191817028152509015156102c35760405160e560020a62461bcd028152600401610150919061061e565b50500160140151600160a060020a031690565b60006102e28383610426565b9392505050565b606060008260200184511015606060405190810160405280602b8152602001600080516020610738833981519152815260200160a960020a6a38bab0b6103a3790199917028152509015156103545760405160e560020a62461bcd028152600401610150919061061e565b5061035f84846102d6565b905080836020010184511015606060405190810160405280602b8152602001600080516020610738833981519152815260200160a960020a6a38bab0b6103a3790199917028152509015156103ca5760405160e560020a62461bcd028152600401610150919061061e565b50806040519080825280601f01601f1916602001820160405280156103f9578160200160208202803883390190505b50915061041f61040883610499565b6020018461041587610499565b016020018361049c565b5092915050565b60008160200183511015606060405190810160405280602b8152602001600080516020610738833981519152815260200160a960020a6a38bab0b6103a37901999170281525090151561048f5760405160e560020a62461bcd028152600401610150919061061e565b5050016020015190565b90565b8015156104a857610533565b828214156104b557610533565b6020601f8201046020820660008111156104d0576001820391505b6000602083025b808210156104f25781860151828801526020820191506104d7565b600083111561052e578260200360080260020a8287015181828204028560080260020a858b0151818282020480841780898f0152505050505050505b505050505b505050565b6000601f8201831361054957600080fd5b813561055c610557826106b4565b61068e565b9150808252602083016020830185838301111561057857600080fd5b6105838382846106f1565b50505092915050565b60006020828403121561059e57600080fd5b81356001604060020a038111156105b457600080fd5b6105c084828501610538565b949350505050565b6105d1816106df565b82525050565b60006105e2826106db565b8084526105f68160208601602086016106fd565b6105ff8161072d565b9093016020019392505050565b6105d181610499565b6105d1816106eb565b602080825281016102e281846105d7565b6040810161063d8285610615565b6102e260208301846105c8565b608081016106588287610615565b61066560208301866105c8565b610672604083018561060c565b818103606083015261068481846105d7565b9695505050505050565b6040518181016001604060020a03811182821017156106ac57600080fd5b604052919050565b60006001604060020a038211156106ca57600080fd5b506020601f91909101601f19160190565b5190565b600160a060020a031690565b60ff1690565b82818337506000910152565b60005b83811015610718578181015183820152602001610700565b83811115610727576000848401525b50505050565b601f01601f19169056004c656e677468206d7573742062652067726561746572207468616e206f722065a265627a7a723058205132eb7448f5b6279dedd3c042e96fb9ea0d8a8aea79044353638cf00546165f6c6578706572696d656e74616cf50037", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x32 JUMPI PUSH4 0xFFFFFFFF PUSH1 0xE0 PUSH1 0x2 EXP PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x72C2F527 DUP2 EQ PUSH2 0x37 JUMPI DUP1 PUSH4 0xBD27C22D EQ PUSH2 0x70 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x43 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x57 PUSH2 0x52 CALLDATASIZE PUSH1 0x4 PUSH2 0x58C JUMP JUMPDEST PUSH2 0x9E JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x67 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x64A JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x7C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x90 PUSH2 0x8B CALLDATASIZE PUSH1 0x4 PUSH2 0x58C JUMP JUMPDEST PUSH2 0xBD JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0x67 SWAP3 SWAP2 SWAP1 PUSH2 0x62F JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 PUSH2 0xAE DUP6 PUSH2 0xD2 JUMP JUMPDEST SWAP4 POP SWAP4 POP SWAP4 POP SWAP4 POP SWAP2 SWAP4 POP SWAP2 SWAP4 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xC9 DUP4 PUSH2 0x1B5 JUMP JUMPDEST SWAP2 POP SWAP2 POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 PUSH1 0x35 DUP6 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D65746164617461206D75737420686176652061206C656E677468206F662061 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x3A103632B0B9BA101A9997 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x159 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST POP DUP5 PUSH1 0x0 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x169 JUMPI INVALID JUMPDEST ADD PUSH1 0x20 ADD MLOAD PUSH1 0xF8 PUSH1 0x2 EXP SWAP1 DUP2 SWAP1 DIV DUP2 MUL DIV SWAP4 POP PUSH2 0x187 DUP6 PUSH1 0x1 PUSH2 0x25A JUMP JUMPDEST SWAP3 POP PUSH2 0x194 DUP6 PUSH1 0x15 PUSH2 0x2D6 JUMP JUMPDEST SWAP2 POP PUSH1 0x35 DUP6 MLOAD GT ISZERO PUSH2 0x1AE JUMPI PUSH2 0x1AB DUP6 PUSH1 0x35 PUSH2 0x2E9 JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP2 SWAP4 POP SWAP2 SWAP4 JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x15 EQ PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x22 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D65746164617461206D75737420686176652061206C656E677468206F662032 DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xF1 PUSH1 0x2 EXP PUSH2 0x1897 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x225 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP DUP3 PUSH1 0x0 DUP2 MLOAD DUP2 LT ISZERO ISZERO PUSH2 0x235 JUMPI INVALID JUMPDEST ADD PUSH1 0x20 ADD MLOAD PUSH1 0xF8 PUSH1 0x2 EXP SWAP1 DUP2 SWAP1 DIV DUP2 MUL DIV SWAP2 POP PUSH2 0x253 DUP4 PUSH1 0x1 PUSH2 0x25A JUMP JUMPDEST SWAP1 POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x14 ADD DUP4 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x738 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790191817 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x2C3 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP POP ADD PUSH1 0x14 ADD MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x2E2 DUP4 DUP4 PUSH2 0x426 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 DUP3 PUSH1 0x20 ADD DUP5 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x738 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790199917 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x354 JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP PUSH2 0x35F DUP5 DUP5 PUSH2 0x2D6 JUMP JUMPDEST SWAP1 POP DUP1 DUP4 PUSH1 0x20 ADD ADD DUP5 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x738 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790199917 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x3CA JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP DUP1 PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x1F ADD PUSH1 0x1F NOT AND PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x3F9 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY ADD SWAP1 POP JUMPDEST POP SWAP2 POP PUSH2 0x41F PUSH2 0x408 DUP4 PUSH2 0x499 JUMP JUMPDEST PUSH1 0x20 ADD DUP5 PUSH2 0x415 DUP8 PUSH2 0x499 JUMP JUMPDEST ADD PUSH1 0x20 ADD DUP4 PUSH2 0x49C JUMP JUMPDEST POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x20 ADD DUP4 MLOAD LT ISZERO PUSH1 0x60 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x2B DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x0 DUP1 MLOAD PUSH1 0x20 PUSH2 0x738 DUP4 CODECOPY DUP2 MLOAD SWAP2 MSTORE DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0xA9 PUSH1 0x2 EXP PUSH11 0x38BAB0B6103A3790199917 MUL DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x48F JUMPI PUSH1 0x40 MLOAD PUSH1 0xE5 PUSH1 0x2 EXP PUSH3 0x461BCD MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH2 0x150 SWAP2 SWAP1 PUSH2 0x61E JUMP JUMPDEST POP POP ADD PUSH1 0x20 ADD MLOAD SWAP1 JUMP JUMPDEST SWAP1 JUMP JUMPDEST DUP1 ISZERO ISZERO PUSH2 0x4A8 JUMPI PUSH2 0x533 JUMP JUMPDEST DUP3 DUP3 EQ ISZERO PUSH2 0x4B5 JUMPI PUSH2 0x533 JUMP JUMPDEST PUSH1 0x20 PUSH1 0x1F DUP3 ADD DIV PUSH1 0x20 DUP3 MOD PUSH1 0x0 DUP2 GT ISZERO PUSH2 0x4D0 JUMPI PUSH1 0x1 DUP3 SUB SWAP2 POP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP4 MUL JUMPDEST DUP1 DUP3 LT ISZERO PUSH2 0x4F2 JUMPI DUP2 DUP7 ADD MLOAD DUP3 DUP9 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH2 0x4D7 JUMP JUMPDEST PUSH1 0x0 DUP4 GT ISZERO PUSH2 0x52E JUMPI DUP3 PUSH1 0x20 SUB PUSH1 0x8 MUL PUSH1 0x2 EXP DUP3 DUP8 ADD MLOAD DUP2 DUP3 DUP3 DIV MUL DUP6 PUSH1 0x8 MUL PUSH1 0x2 EXP DUP6 DUP12 ADD MLOAD DUP2 DUP3 DUP3 MUL DIV DUP1 DUP5 OR DUP1 DUP10 DUP16 ADD MSTORE POP POP POP POP POP POP POP JUMPDEST POP POP POP POP JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1F DUP3 ADD DUP4 SGT PUSH2 0x549 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x55C PUSH2 0x557 DUP3 PUSH2 0x6B4 JUMP JUMPDEST PUSH2 0x68E JUMP JUMPDEST SWAP2 POP DUP1 DUP3 MSTORE PUSH1 0x20 DUP4 ADD PUSH1 0x20 DUP4 ADD DUP6 DUP4 DUP4 ADD GT ISZERO PUSH2 0x578 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x583 DUP4 DUP3 DUP5 PUSH2 0x6F1 JUMP JUMPDEST POP POP POP SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x59E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP2 GT ISZERO PUSH2 0x5B4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x5C0 DUP5 DUP3 DUP6 ADD PUSH2 0x538 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH2 0x5D1 DUP2 PUSH2 0x6DF JUMP JUMPDEST DUP3 MSTORE POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5E2 DUP3 PUSH2 0x6DB JUMP JUMPDEST DUP1 DUP5 MSTORE PUSH2 0x5F6 DUP2 PUSH1 0x20 DUP7 ADD PUSH1 0x20 DUP7 ADD PUSH2 0x6FD JUMP JUMPDEST PUSH2 0x5FF DUP2 PUSH2 0x72D JUMP JUMPDEST SWAP1 SWAP4 ADD PUSH1 0x20 ADD SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH2 0x5D1 DUP2 PUSH2 0x499 JUMP JUMPDEST PUSH2 0x5D1 DUP2 PUSH2 0x6EB JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 ADD PUSH2 0x2E2 DUP2 DUP5 PUSH2 0x5D7 JUMP JUMPDEST PUSH1 0x40 DUP2 ADD PUSH2 0x63D DUP3 DUP6 PUSH2 0x615 JUMP JUMPDEST PUSH2 0x2E2 PUSH1 0x20 DUP4 ADD DUP5 PUSH2 0x5C8 JUMP JUMPDEST PUSH1 0x80 DUP2 ADD PUSH2 0x658 DUP3 DUP8 PUSH2 0x615 JUMP JUMPDEST PUSH2 0x665 PUSH1 0x20 DUP4 ADD DUP7 PUSH2 0x5C8 JUMP JUMPDEST PUSH2 0x672 PUSH1 0x40 DUP4 ADD DUP6 PUSH2 0x60C JUMP JUMPDEST DUP2 DUP2 SUB PUSH1 0x60 DUP4 ADD MSTORE PUSH2 0x684 DUP2 DUP5 PUSH2 0x5D7 JUMP JUMPDEST SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x40 MLOAD DUP2 DUP2 ADD PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x6AC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x40 PUSH1 0x2 EXP SUB DUP3 GT ISZERO PUSH2 0x6CA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x20 PUSH1 0x1F SWAP2 SWAP1 SWAP2 ADD PUSH1 0x1F NOT AND ADD SWAP1 JUMP JUMPDEST MLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0xFF AND SWAP1 JUMP JUMPDEST DUP3 DUP2 DUP4 CALLDATACOPY POP PUSH1 0x0 SWAP2 ADD MSTORE JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x718 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x700 JUMP JUMPDEST DUP4 DUP2 GT ISZERO PUSH2 0x727 JUMPI PUSH1 0x0 DUP5 DUP5 ADD MSTORE JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x1F ADD PUSH1 0x1F NOT AND SWAP1 JUMP STOP 0x4c PUSH6 0x6E677468206D PUSH22 0x73742062652067726561746572207468616E206F7220 PUSH6 0xA265627A7A72 ADDRESS PC KECCAK256 MLOAD ORIGIN 0xeb PUSH21 0x48F5B6279DEDD3C042E96FB9EA0D8A8AEA79044353 PUSH4 0x8CF00546 AND 0x5f PUSH13 0x6578706572696D656E74616CF5 STOP CALLDATACOPY ", + "sourceMap": "709:590:0:-;;;;;;;;;-1:-1:-1;;;709:590:0;;;;;;;;;;;;;;;;;;1044:253;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1044:253:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;823:170;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;823:170:0;;;;;;;;;;;;;;;;;;1044:253;1158:5;1177:7;1198;1219:5;1263:27;1280:9;1263:16;:27::i;:::-;1256:34;;;;;;;;1044:253;;;;;:::o;823:170::-;923:5;930:7;960:26;976:9;960:15;:26::i;:::-;953:33;;;;823:170;;;:::o;1409:608:1:-;1519:13;1546;1573:15;1602:17;1685:2;1665:9;:16;:22;;1701:30;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1701:30:1;;;1644:97;;;;;;;-1:-1:-1;;;;;1644:97:1;;;;;;;;;;;;;;;;;;;1767:9;1777:1;1767:12;;;;;;;;;;;;;;-1:-1:-1;;;1767:12:1;;;;;;1761:19;;-1:-1:-1;1798:25:1;1810:9;1821:1;1798:11;:25::i;:::-;1790:33;;1843:26;1855:9;1866:2;1843:11;:26::i;:::-;1833:36;;1902:2;1883:9;:16;:21;1879:83;;;1927:24;1937:9;1948:2;1927:9;:24::i;:::-;1920:31;;1879:83;1409:608;;;;;:::o;965:393::-;1074:13;1101;1160:9;:16;1180:2;1160:22;1196:29;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1196:29:1;;;1139:96;;;;;;;-1:-1:-1;;;;;1139:96:1;;;;;;;;;;;1261:9;1271:1;1261:12;;;;;;;;;;;;;;-1:-1:-1;;;1261:12:1;;;;;;1255:19;;-1:-1:-1;1292:25:1;1304:9;1315:1;1292:11;:25::i;:::-;1284:33;-1:-1:-1;965:393:1;;;:::o;2204:868:2:-;2325:14;2388:5;2396:2;2388:10;2376:1;:8;:22;;2440;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2440:22:2;;;;-1:-1:-1;;;;;2440:22:2;;;2355:117;;;;;;;-1:-1:-1;;;;;2355:117:2;;;;;;;;;;-1:-1:-1;;2974:13:2;2719:2;2974:13;2968:20;-1:-1:-1;;;;;2964:69:2;;2204:868::o;6338:195::-;6459:14;6504:21;6516:1;6519:5;6504:11;:21::i;:::-;6496:30;6338:195;-1:-1:-1;;;6338:195:2:o;7192:869::-;7311:19;7484:25;7418:5;7426:2;7418:10;7406:1;:8;:22;;7442;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7442:22:2;;;;-1:-1:-1;;;;;7442:22:2;;;7385:89;;;;;;;-1:-1:-1;;;;;7385:89:2;;;;;;;;;;;7512:21;7524:1;7527:5;7512:11;:21::i;:::-;7484:49;;7672:17;7659:5;7667:2;7659:10;:30;7647:1;:8;:42;;7703:22;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;7703:22:2;;;;-1:-1:-1;;;;;7703:22:2;;;7626:109;;;;;;;-1:-1:-1;;;;;7626:109:2;;;;;;;;;;;7817:17;7807:28;;;;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;7807:28:2;;7798:37;;7845:185;7865:21;7879:6;7865:13;:21::i;:::-;7889:2;7865:26;7953:5;7934:16;7948:1;7934:13;:16::i;:::-;:24;7961:2;7934:29;8003:17;7845:6;:185::i;:::-;7192:869;;;;;:::o;4956:472::-;5077:14;5140:5;5148:2;5140:10;5128:1;:8;:22;;5164;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;5164:22:2;;;;-1:-1:-1;;;;;5164:22:2;;;5107:89;;;;;;;-1:-1:-1;;;;;5107:89:2;;;;;;;;;;-1:-1:-1;;5375:13:2;5277:2;5375:13;5369:20;;4956:472::o;629:203:3:-;786:5;629:203::o;961:3173::-;1122:11;;1119:23;;;1135:7;;1119:23;1164:4;1154:6;:14;1151:26;;;1170:7;;1151:26;1369:4;1362;1354:6;1350:17;1346:28;1416:4;1408:6;1404:17;1451:1;1440:9;1437:16;1434:2;;;1506:1;1492:12;1488:20;1472:36;;1434:2;1601:1;1636:4;1632:23;;1668:156;1697:9;1689:6;1686:21;1668:156;;;1801:6;1793;1789:19;1783:26;1773:6;1767:4;1763:17;1756:54;1731:4;1723:6;1719:17;1709:27;;1668:156;;;1891:1;1880:9;1877:16;1874:2;;;2492:9;2486:4;2482:20;2479:1;2475:28;2472:1;2468:36;2557:6;2549;2545:19;2539:26;2641:17;2621;2609:10;2605:34;2601:58;3349:9;3346:1;3342:17;3339:1;3335:25;3409:6;3403:4;3399:17;3393:24;3487:15;3469;3459:8;3455:30;3451:52;3980:9;3967:11;3964:26;4087:16;4078:6;4072:4;4068:17;4061:43;1894:2224;;;;;;;1874:2;1238:2890;;;;;;;;:::o;6:440:-1:-;;100:4;88:17;;84:27;-1:-1;74:2;;125:1;122;115:12;74:2;162:6;149:20;184:64;199:48;240:6;199:48;;;184:64;;;175:73;;268:6;261:5;254:21;304:4;296:6;292:17;337:4;330:5;326:16;372:3;363:6;358:3;354:16;351:25;348:2;;;389:1;386;379:12;348:2;399:41;433:6;428:3;423;399:41;;;67:379;;;;;;;;454:345;;567:2;555:9;546:7;542:23;538:32;535:2;;;583:1;580;573:12;535:2;618:31;;-1:-1;;;;;658:30;;655:2;;;701:1;698;691:12;655:2;721:62;775:7;766:6;755:9;751:22;721:62;;;711:72;529:270;-1:-1;;;;529:270;806:110;879:31;904:5;879:31;;;874:3;867:44;861:55;;;923:297;;1023:38;1055:5;1023:38;;;1078:6;1073:3;1066:19;1090:63;1146:6;1139:4;1134:3;1130:14;1123:4;1116:5;1112:16;1090:63;;;1185:29;1207:6;1185:29;;;1165:50;;;1178:4;1165:50;;1003:217;-1:-1;;;1003:217;1526:110;1599:31;1624:5;1599:31;;1643:104;1712:29;1735:5;1712:29;;1754:273;1878:2;1892:47;;;1863:18;;1953:64;1863:18;2003:6;1953:64;;2034:286;2166:2;2151:18;;2180:57;2155:9;2210:6;2180:57;;;2248:62;2306:2;2295:9;2291:18;2282:6;2248:62;;2327:573;2533:3;2518:19;;2548:57;2522:9;2578:6;2548:57;;;2616:62;2674:2;2663:9;2659:18;2650:6;2616:62;;;2689;2747:2;2736:9;2732:18;2723:6;2689:62;;;2799:9;2793:4;2789:20;2784:2;2773:9;2769:18;2762:48;2824:66;2885:4;2876:6;2824:66;;;2816:74;2504:396;-1:-1;;;;;;2504:396;2907:256;2969:2;2963:9;2995:17;;;-1:-1;;;;;3055:34;;3091:22;;;3052:62;3049:2;;;3127:1;3124;3117:12;3049:2;3143;3136:22;2947:216;;-1:-1;2947:216;3170:258;;-1:-1;;;;;3305:6;3302:30;3299:2;;;3345:1;3342;3335:12;3299:2;-1:-1;3418:4;3389;3366:17;;;;-1:-1;;3362:33;3408:15;;3236:192;3435:91;3509:12;;3493:33;3628:128;-1:-1;;;;;3697:54;;3680:76;3849:88;3927:4;3916:16;;3899:38;3945:145;4026:6;4021:3;4016;4003:30;-1:-1;4082:1;4064:16;;4057:27;3996:94;4099:268;4164:1;4171:101;4185:6;4182:1;4179:13;4171:101;;;4252:11;;;4246:18;4233:11;;;4226:39;4207:2;4200:10;4171:101;;;4287:6;4284:1;4281:13;4278:2;;;4352:1;4343:6;4338:3;4334:16;4327:27;4278:2;4148:219;;;;;4375:97;4463:2;4443:14;-1:-1;;4439:28;;4423:49" } } }, @@ -57,12 +88,12 @@ } }, "sourceCodes": { - "current/test/TestLibAssetProxyDecoder/TestLibAssetProxyDecoder.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.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../utils/LibAssetProxyDecoder/LibAssetProxyDecoder.sol\";\n\ncontract TestLibAssetProxyDecoder is\n LibAssetProxyDecoder\n{\n\n /// @dev Decodes ERC721 Asset Proxy data\n function publicDecodeERC20Data(bytes memory proxyData)\n public\n pure\n returns (uint8, address)\n {\n return decodeERC20Data(proxyData);\n }\n\n /// @dev Decodes ERC721 Asset Proxy data\n function publicDecodeERC721Data(bytes memory proxyData)\n internal\n pure\n returns (\n uint8,\n address,\n uint256,\n bytes memory\n )\n {\n return decodeERC721Data(proxyData);\n }\n}\n", + "current/test/TestLibAssetProxyDecoder/TestLibAssetProxyDecoder.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.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../utils/LibAssetProxyDecoder/LibAssetProxyDecoder.sol\";\n\ncontract TestLibAssetProxyDecoder is\n LibAssetProxyDecoder\n{\n\n /// @dev Decodes ERC721 Asset Proxy data\n function publicDecodeERC20Data(bytes memory proxyData)\n public\n pure\n returns (uint8, address)\n {\n return decodeERC20Data(proxyData);\n }\n\n /// @dev Decodes ERC721 Asset Proxy data\n function publicDecodeERC721Data(bytes memory proxyData)\n public\n pure\n returns (\n uint8,\n address,\n uint256,\n bytes memory\n )\n {\n return decodeERC721Data(proxyData);\n }\n}\n", "current/utils/LibAssetProxyDecoder/LibAssetProxyDecoder.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.24;\npragma experimental ABIEncoderV2;\n\nimport \"../LibBytes/LibBytes.sol\";\n\ncontract LibAssetProxyDecoder is\n LibBytes\n{\n\n string constant INVALID_ERC20_METADATA_LENGTH = \"Metadata must have a length of 21.\";\n string constant INVALID_ERC721_METADATA_LENGTH = \"Metadata must have a length of at least 53.\";\n\n /// @dev Decodes ERC721 Asset Proxy data\n function decodeERC20Data(bytes memory proxyData)\n internal\n pure\n returns (\n uint8 proxyId,\n address token\n )\n {\n require(\n proxyData.length == 21,\n INVALID_ERC20_METADATA_LENGTH\n );\n proxyId = uint8(proxyData[0]);\n token = readAddress(proxyData, 1);\n\n return (proxyId, token);\n }\n\n /// @dev Decodes ERC721 Asset Proxy data\n function decodeERC721Data(bytes memory proxyData)\n internal\n pure\n returns (\n uint8 proxyId,\n address token,\n uint256 tokenId,\n bytes memory data\n )\n {\n require(\n proxyData.length >= 53,\n INVALID_ERC721_METADATA_LENGTH\n );\n proxyId = uint8(proxyData[0]);\n token = readAddress(proxyData, 1);\n tokenId = readUint256(proxyData, 21);\n if (proxyData.length > 53) {\n data = readBytes(proxyData, 53);\n }\n\n return (proxyId, token, tokenId, data);\n }\n}\n", "current/utils/LibBytes/LibBytes.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.24;\n\nimport \"../LibMem/LibMem.sol\";\n\ncontract LibBytes is\n LibMem\n{\n\n // Revert reasons\n string constant GTE_20_LENGTH_REQUIRED = \"Length must be greater than or equal to 20.\";\n string constant GTE_32_LENGTH_REQUIRED = \"Length must be greater than or equal to 32.\";\n\n /// @dev Tests equality of two byte arrays.\n /// @param lhs First byte array to compare.\n /// @param rhs Second byte array to compare.\n /// @return True if arrays are the same. False otherwise.\n function areBytesEqual(bytes memory lhs, bytes memory rhs)\n internal\n pure\n returns (bool equal)\n {\n assembly {\n // Get the number of words occupied by <lhs>\n let lenFullWords := div(add(mload(lhs), 0x1F), 0x20)\n\n // Add 1 to the number of words, to account for the length field\n lenFullWords := add(lenFullWords, 0x1)\n\n // Test equality word-by-word.\n // Terminates early if there is a mismatch.\n for {let i := 0} lt(i, lenFullWords) {i := add(i, 1)} {\n let lhsWord := mload(add(lhs, mul(i, 0x20)))\n let rhsWord := mload(add(rhs, mul(i, 0x20)))\n equal := eq(lhsWord, rhsWord)\n if eq(equal, 0) {\n // Break\n i := lenFullWords\n }\n }\n }\n\n return equal;\n }\n\n /// @dev Reads an address from a position in a byte array.\n /// @param b Byte array containing an address.\n /// @param index Index in byte array of address.\n /// @return address from byte array.\n function readAddress(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (address result)\n {\n require(\n b.length >= index + 20, // 20 is length of address\n GTE_20_LENGTH_REQUIRED\n );\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Read address from array memory\n assembly {\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 20-byte mask to obtain address\n result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)\n }\n return result;\n }\n\n /// @dev Writes an address into a specific position in a byte array.\n /// @param b Byte array to insert address into.\n /// @param index Index in byte array of address.\n /// @param input Address to put into byte array.\n function writeAddress(\n bytes memory b,\n uint256 index,\n address input\n )\n internal\n pure\n {\n require(\n b.length >= index + 20, // 20 is length of address\n GTE_20_LENGTH_REQUIRED\n );\n\n // Add offset to index:\n // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)\n // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)\n index += 20;\n\n // Store address into array memory\n assembly {\n // The address occupies 20 bytes and mstore stores 32 bytes.\n // First fetch the 32-byte word where we'll be storing the address, then\n // apply a mask so we have only the bytes in the word that the address will not occupy.\n // Then combine these bytes with the address and store the 32 bytes back to memory with mstore.\n\n // 1. Add index to address of bytes array\n // 2. Load 32-byte word from memory\n // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address\n let neighbors := and(mload(add(b, index)), 0xffffffffffffffffffffffff0000000000000000000000000000000000000000)\n\n // Store the neighbors and address into memory\n mstore(add(b, index), xor(input, neighbors))\n }\n }\n\n /// @dev Reads a bytes32 value from a position in a byte array.\n /// @param b Byte array containing a bytes32 value.\n /// @param index Index in byte array of bytes32 value.\n /// @return bytes32 value from byte array.\n function readBytes32(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes32 result)\n {\n require(\n b.length >= index + 32,\n GTE_32_LENGTH_REQUIRED\n );\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n result := mload(add(b, index))\n }\n return result;\n }\n\n /// @dev Writes a bytes32 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input bytes32 to put into byte array.\n function writeBytes32(\n bytes memory b,\n uint256 index,\n bytes32 input\n )\n internal\n pure\n {\n require(\n b.length >= index + 32,\n GTE_32_LENGTH_REQUIRED\n );\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n mstore(add(b, index), input)\n }\n }\n\n /// @dev Reads a uint256 value from a position in a byte array.\n /// @param b Byte array containing a uint256 value.\n /// @param index Index in byte array of uint256 value.\n /// @return uint256 value from byte array.\n function readUint256(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (uint256 result)\n {\n return uint256(readBytes32(b, index));\n }\n\n /// @dev Writes a uint256 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input uint256 to put into byte array.\n function writeUint256(\n bytes memory b,\n uint256 index,\n uint256 input\n )\n internal\n pure\n {\n writeBytes32(b, index, bytes32(input));\n }\n\n /// @dev Reads a uint256 value from a position in a byte array.\n /// @param b Byte array containing a uint256 value.\n /// @param index Index in byte array of uint256 value.\n /// @return uint256 value from byte array.\n function readBytes(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes memory result)\n {\n // Read length of nested bytes\n require(\n b.length >= index + 32,\n GTE_32_LENGTH_REQUIRED\n );\n uint256 nestedBytesLength = readUint256(b, index);\n\n // Assert length of <b> is valid, given\n // length of nested bytes\n require(\n b.length >= index + 32 + nestedBytesLength,\n GTE_32_LENGTH_REQUIRED\n );\n\n // Allocate memory and copy value to result\n result = new bytes(nestedBytesLength);\n memcpy(\n getMemAddress(result) + 32, // +32 skips array length\n getMemAddress(b) + index + 32, // +32 skips array length\n nestedBytesLength\n );\n\n return result;\n }\n\n /// @dev Writes a uint256 into a specific position in a byte array.\n /// @param b Byte array to insert <input> into.\n /// @param index Index in byte array of <input>.\n /// @param input uint256 to put into byte array.\n function writeBytes(\n bytes memory b,\n uint256 index,\n bytes memory input\n )\n internal\n pure\n {\n // Read length of nested bytes\n require(\n b.length >= index + 32 /* 32 bytes to store length */ + input.length,\n GTE_32_LENGTH_REQUIRED\n );\n\n // Copy <input> into <b>\n memcpy(\n getMemAddress(b) + index,\n getMemAddress(input),\n input.length + 32 /* 32 bytes to store length */\n );\n }\n}\n", "current/utils/LibMem/LibMem.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.24;\n\ncontract LibMem {\n\n function getMemAddress(bytes memory input)\n internal\n pure\n returns (uint256 address_)\n {\n assembly {\n address_ := input\n }\n return address_;\n }\n\n /// @dev Writes a uint256 into a specific position in a byte array.\n /// @param dest memory adress to copy bytes to\n function memcpy(\n uint256 dest,\n uint256 source,\n uint256 length\n )\n internal\n pure\n {\n // Base cases\n if(length == 0) return;\n if(source == dest) return;\n\n // Copy bytes from source to dest\n assembly {\n // Compute number of complete words to copy + remaining bytes\n let lenFullWords := div(add(length, 0x1F), 0x20)\n let remainder := mod(length, 0x20)\n if gt(remainder, 0) {\n lenFullWords := sub(lenFullWords, 1)\n }\n\n // Copy full words from source to dest\n let offset := 0\n let maxOffset := mul(0x20, lenFullWords)\n for {offset := 0} lt(offset, maxOffset) {offset := add(offset, 0x20)} {\n mstore(add(dest, offset), mload(add(source, offset)))\n }\n\n // Copy remaining bytes\n if gt(remainder, 0) {\n // Read a full word from source, containing X bytes to copy to dest.\n // We only want to keep the X bytes, zeroing out the remaining bytes.\n // We accomplish this by a right shift followed by a left shift.\n // Example:\n // Suppose a word of 8 bits has all 1's: [11111111]\n // Let X = 7 (we want to copy the first 7 bits)\n // Apply a right shift of 1: [01111111]\n // Apply a left shift of 1: [11111110]\n let sourceShiftFactor := exp(2, mul(8, sub(0x20, remainder)))\n let sourceWord := mload(add(source, offset))\n let sourceBytes := mul(div(sourceWord, sourceShiftFactor), sourceShiftFactor)\n\n // Read a full word from dest, containing (32-X) bytes to retain.\n // We need to zero out the remaining bytes to be overwritten by source,\n // while retaining the (32-X) bytes we don't want to overwrite.\n // We accomplish this by a left shift followed by a right shift.\n // Example:\n // Suppose a word of 8 bits has all 1's: [11111111]\n // Let X = 7 (we want to free the first 7 bits, and retain the last bit)\n // Apply a left shift of 1: [11111110]\n // Apply a right shift of 1: [01111111]\n let destShiftFactor := exp(2, mul(8, remainder))\n let destWord := mload(add(dest, offset))\n let destBytes := div(mul(destWord, destShiftFactor), destShiftFactor)\n\n // Combine the source and dest bytes. There should be no overlap:\n // The source bytes run from [0..X-1] and the dest bytes from [X..31].\n // Example:\n // Following the example from above, we have [11111110]\n // from the source word and [01111111] from the dest word.\n // Combine these words using <or> to get [11111111].\n let combinedDestWord := or(sourceBytes, destBytes)\n\n // Store the combined word into dest\n mstore(add(dest, offset), combinedDestWord)\n }\n }\n }\n}\n" }, - "sourceTreeHashHex": "0x8431fff2ae9424603c06a10d9c4649edf92a798a8969fe69339fc0063b7ad144", + "sourceTreeHashHex": "0x872ca57a3559c6ce5cd050e72e3b25fdfc98cb222b1835d097ee16dc444c1733", "compiler": { "name": "solc", "version": "0.4.24", |