aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/migrations/artifacts/2.0.0/TestValidator.json95
-rw-r--r--packages/migrations/artifacts/2.0.0/TestWallet.json99
2 files changed, 194 insertions, 0 deletions
diff --git a/packages/migrations/artifacts/2.0.0/TestValidator.json b/packages/migrations/artifacts/2.0.0/TestValidator.json
new file mode 100644
index 000000000..86696368e
--- /dev/null
+++ b/packages/migrations/artifacts/2.0.0/TestValidator.json
@@ -0,0 +1,95 @@
+{
+ "schemaVersion": "2.0.0",
+ "contractName": "TestValidator",
+ "compilerOutput": {
+ "abi": [
+ {
+ "constant": true,
+ "inputs": [
+ {
+ "name": "hash",
+ "type": "bytes32"
+ },
+ {
+ "name": "signerAddress",
+ "type": "address"
+ },
+ {
+ "name": "signature",
+ "type": "bytes"
+ }
+ ],
+ "name": "isValidSignature",
+ "outputs": [
+ {
+ "name": "isValid",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "name": "validSigner",
+ "type": "address"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ }
+ ],
+ "evm": {
+ "bytecode": {
+ "linkReferences": {},
+ "object": "0x608060405234801561001057600080fd5b50604051602080610134833981016040525160008054600160a060020a03909216600160a060020a031990921691909117905560e3806100516000396000f300608060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416639363470281146043575b600080fd5b348015604e57600080fd5b50607e60048035906024803573ffffffffffffffffffffffffffffffffffffffff16916044359182019101356092565b604080519115158252519081900360200190f35b505060005473ffffffffffffffffffffffffffffffffffffffff9081169116149190505600a165627a7a72305820d56af815348fc993337c155cb13340d950e982ab65a940dff32a1d25f78ca9bb0029",
+ "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP1 PUSH2 0x134 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 MSTORE MLOAD PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH1 0xE3 DUP1 PUSH2 0x51 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH1 0x3E JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x93634702 DUP2 EQ PUSH1 0x43 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH1 0x4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x7E PUSH1 0x4 DUP1 CALLDATALOAD SWAP1 PUSH1 0x24 DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP2 PUSH1 0x44 CALLDATALOAD SWAP2 DUP3 ADD SWAP2 ADD CALLDATALOAD PUSH1 0x92 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST POP POP PUSH1 0x0 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 AND SWAP2 AND EQ SWAP2 SWAP1 POP JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xd5 PUSH11 0xF815348FC993337C155CB1 CALLER BLOCKHASH 0xd9 POP 0xe9 DUP3 0xab PUSH6 0xA940DFF32A1D 0x25 0xf7 DUP13 0xa9 0xbb STOP 0x29 ",
+ "sourceMap": "667:864:1:-;;;916:84;8:9:-1;5:2;;;30:1;27;20:12;5:2;916:84:1;;;;;;;;;;;;;967:12;:26;;-1:-1:-1;;;;;967:26:1;;;-1:-1:-1;;;;;;967:26:1;;;;;;;;;667:864;;;;;;"
+ },
+ "deployedBytecode": {
+ "linkReferences": {},
+ "object": "0x608060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416639363470281146043575b600080fd5b348015604e57600080fd5b50607e60048035906024803573ffffffffffffffffffffffffffffffffffffffff16916044359182019101356092565b604080519115158252519081900360200190f35b505060005473ffffffffffffffffffffffffffffffffffffffff9081169116149190505600a165627a7a72305820d56af815348fc993337c155cb13340d950e982ab65a940dff32a1d25f78ca9bb0029",
+ "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH1 0x3E JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x93634702 DUP2 EQ PUSH1 0x43 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH1 0x4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x7E PUSH1 0x4 DUP1 CALLDATALOAD SWAP1 PUSH1 0x24 DUP1 CALLDATALOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND SWAP2 PUSH1 0x44 CALLDATALOAD SWAP2 DUP3 ADD SWAP2 ADD CALLDATALOAD PUSH1 0x92 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST POP POP PUSH1 0x0 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP1 DUP2 AND SWAP2 AND EQ SWAP2 SWAP1 POP JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xd5 PUSH11 0xF815348FC993337C155CB1 CALLER BLOCKHASH 0xd9 POP 0xe9 DUP3 0xab PUSH6 0xA940DFF32A1D 0x25 0xf7 DUP13 0xa9 0xbb STOP 0x29 ",
+ "sourceMap": "667:864:1:-;;;;;;;;;;;;;;;;;;;;;;;1299:230;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1299:230:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1456:12:1;1509;;;;;1492:29;;;;1299:230;-1:-1:-1;1299:230:1:o"
+ }
+ }
+ },
+ "sources": {
+ "current/protocol/Exchange/interfaces/IValidator.sol": {
+ "id": 0
+ },
+ "current/test/TestValidator/TestValidator.sol": {
+ "id": 1
+ }
+ },
+ "sourceCodes": {
+ "current/protocol/Exchange/interfaces/IValidator.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.23;\n\ncontract IValidator {\n\n /// @dev Verifies that a signature is valid.\n /// @param hash Message hash that is signed.\n /// @param signerAddress Address that should have signed the given hash.\n /// @param signature Proof of signing.\n /// @return Validity of order signature.\n function isValidSignature(\n bytes32 hash,\n address signerAddress,\n bytes signature\n )\n external\n view\n returns (bool isValid);\n}\n",
+ "current/test/TestValidator/TestValidator.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 \"../../protocol/Exchange/interfaces/IValidator.sol\";\n\ncontract TestValidator is \n IValidator\n{\n\n // The single valid signer for this wallet.\n address VALID_SIGNER;\n\n /// @dev constructs a new `TestValidator` with a single valid signer.\n /// @param validSigner The sole, valid signer.\n constructor (address validSigner) public {\n VALID_SIGNER = validSigner;\n }\n\n /// @dev Verifies that a signature is valid. `signer` must match `VALID_SIGNER`.\n /// @param hash Message hash that is signed.\n /// @param signerAddress Address that should have signed the given hash.\n /// @param signature Proof of signing.\n /// @return Validity of signature.\n function isValidSignature(\n bytes32 hash,\n address signerAddress,\n bytes signature\n )\n external\n view\n returns (bool isValid)\n {\n return (signerAddress == VALID_SIGNER);\n }\n}\n"
+ },
+ "sourceTreeHashHex": "0x46c9bcd1eaeb97a053a035d7aa8867b98dd8dc7a9faf39d5e2fa41e911c728ee",
+ "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/TestWallet.json b/packages/migrations/artifacts/2.0.0/TestWallet.json
new file mode 100644
index 000000000..d3d5b4a70
--- /dev/null
+++ b/packages/migrations/artifacts/2.0.0/TestWallet.json
@@ -0,0 +1,99 @@
+{
+ "schemaVersion": "2.0.0",
+ "contractName": "TestWallet",
+ "compilerOutput": {
+ "abi": [
+ {
+ "constant": true,
+ "inputs": [
+ {
+ "name": "hash",
+ "type": "bytes32"
+ },
+ {
+ "name": "eip712Signature",
+ "type": "bytes"
+ }
+ ],
+ "name": "isValidSignature",
+ "outputs": [
+ {
+ "name": "isValid",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "name": "walletOwner",
+ "type": "address"
+ }
+ ],
+ "payable": false,
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ }
+ ],
+ "evm": {
+ "bytecode": {
+ "linkReferences": {},
+ "object": "0x608060405234801561001057600080fd5b5060405160208061049f833981016040525160008054600160a060020a03909216600160a060020a031990921691909117905561044d806100526000396000f3006080604052600436106100405763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631626ba7e8114610045575b600080fd5b34801561005157600080fd5b5061006960048035906024803590810191013561007d565b604080519115158252519081900360200190f35b60408051808201909152601281527f4c454e4754485f36355f524551554952454400000000000000000000000000006020820152600090819081908190819060418714610162576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561012757818101518382015260200161010f565b50505050905090810190601f1680156101545780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508686600081811061017057fe5b905001357f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01000000000000000000000000000000000000000000000000000000000000009004935061023c87878080601f01602080910402602001604051908101604052809392919081815260200183838082843750600194506103479350505050565b925061027a87878080601f01602080910402602001604051908101604052809392919081815260200183838082843750602194506103479350505050565b60408051600080825260208083018085528d905260ff8916838501526060830188905260808301859052925193955060019360a080840194937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0830193908390039091019190865af11580156102f4573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015160005473ffffffffffffffffffffffffffffffffffffffff9182169116149998505050505050505050565b60008160200183511015606060405190810160405280602681526020017f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524581526020017f5155495245440000000000000000000000000000000000000000000000000000815250901515610417576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360008381101561012757818101518382015260200161010f565b50500160200151905600a165627a7a72305820aea574e2e94a21025c72282f826b66d9657c3548fb682c5a5ea458ce014743230029",
+ "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP1 PUSH2 0x49F DUP4 CODECOPY DUP2 ADD PUSH1 0x40 MSTORE MLOAD PUSH1 0x0 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE PUSH2 0x44D DUP1 PUSH2 0x52 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x40 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x1626BA7E DUP2 EQ PUSH2 0x45 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x51 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x69 PUSH1 0x4 DUP1 CALLDATALOAD SWAP1 PUSH1 0x24 DUP1 CALLDATALOAD SWAP1 DUP2 ADD SWAP2 ADD CALLDATALOAD PUSH2 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x12 DUP2 MSTORE PUSH32 0x4C454E4754485F36355F52455155495245440000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP2 SWAP1 DUP2 SWAP1 DUP2 SWAP1 PUSH1 0x41 DUP8 EQ PUSH2 0x162 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 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 0x127 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x10F JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x154 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 REVERT JUMPDEST POP DUP7 DUP7 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x170 JUMPI INVALID JUMPDEST SWAP1 POP ADD CALLDATALOAD PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 SWAP1 DIV PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 MUL PUSH31 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 SWAP1 DIV SWAP4 POP PUSH2 0x23C DUP8 DUP8 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY POP PUSH1 0x1 SWAP5 POP PUSH2 0x347 SWAP4 POP POP POP POP JUMP JUMPDEST SWAP3 POP PUSH2 0x27A DUP8 DUP8 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY POP PUSH1 0x21 SWAP5 POP PUSH2 0x347 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD DUP1 DUP6 MSTORE DUP14 SWAP1 MSTORE PUSH1 0xFF DUP10 AND DUP4 DUP6 ADD MSTORE PUSH1 0x60 DUP4 ADD DUP9 SWAP1 MSTORE PUSH1 0x80 DUP4 ADD DUP6 SWAP1 MSTORE SWAP3 MLOAD SWAP4 SWAP6 POP PUSH1 0x1 SWAP4 PUSH1 0xA0 DUP1 DUP5 ADD SWAP5 SWAP4 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP4 ADD SWAP4 SWAP1 DUP4 SWAP1 SUB SWAP1 SWAP2 ADD SWAP2 SWAP1 DUP7 GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2F4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD PUSH1 0x0 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP3 AND SWAP2 AND EQ SWAP10 SWAP9 POP POP POP POP POP POP POP 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 0x26 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x475245415445525F4F525F455155414C5F544F5F33325F4C454E4754485F5245 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x5155495245440000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x417 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 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 DUP4 DUP2 LT ISZERO PUSH2 0x127 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x10F JUMP JUMPDEST POP POP ADD PUSH1 0x20 ADD MLOAD SWAP1 JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xae 0xa5 PUSH21 0xE2E94A21025C72282F826B66D9657C3548FB682C5A 0x5e LOG4 PC 0xce ADD 0x47 NUMBER 0x23 STOP 0x29 ",
+ "sourceMap": "708:1180:1:-;;;1006:84;8:9:-1;5:2;;;30:1;27;20:12;5:2;1006:84:1;;;;;;;;;;;;;1057:12;:26;;-1:-1:-1;;;;;1057:26:1;;;-1:-1:-1;;;;;;1057:26:1;;;;;;;;;708:1180;;;;;;"
+ },
+ "deployedBytecode": {
+ "linkReferences": {},
+ "object": "0x6080604052600436106100405763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631626ba7e8114610045575b600080fd5b34801561005157600080fd5b5061006960048035906024803590810191013561007d565b604080519115158252519081900360200190f35b60408051808201909152601281527f4c454e4754485f36355f524551554952454400000000000000000000000000006020820152600090819081908190819060418714610162576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561012757818101518382015260200161010f565b50505050905090810190601f1680156101545780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508686600081811061017057fe5b905001357f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f01000000000000000000000000000000000000000000000000000000000000009004935061023c87878080601f01602080910402602001604051908101604052809392919081815260200183838082843750600194506103479350505050565b925061027a87878080601f01602080910402602001604051908101604052809392919081815260200183838082843750602194506103479350505050565b60408051600080825260208083018085528d905260ff8916838501526060830188905260808301859052925193955060019360a080840194937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0830193908390039091019190865af11580156102f4573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015160005473ffffffffffffffffffffffffffffffffffffffff9182169116149998505050505050505050565b60008160200183511015606060405190810160405280602681526020017f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524581526020017f5155495245440000000000000000000000000000000000000000000000000000815250901515610417576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360008381101561012757818101518382015260200161010f565b50500160200151905600a165627a7a72305820aea574e2e94a21025c72282f826b66d9657c3548fb682c5a5ea458ce014743230029",
+ "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x40 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x1626BA7E DUP2 EQ PUSH2 0x45 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x51 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x69 PUSH1 0x4 DUP1 CALLDATALOAD SWAP1 PUSH1 0x24 DUP1 CALLDATALOAD SWAP1 DUP2 ADD SWAP2 ADD CALLDATALOAD PUSH2 0x7D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x12 DUP2 MSTORE PUSH32 0x4C454E4754485F36355F52455155495245440000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x0 SWAP1 DUP2 SWAP1 DUP2 SWAP1 DUP2 SWAP1 DUP2 SWAP1 PUSH1 0x41 DUP8 EQ PUSH2 0x162 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 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 0x127 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x10F JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x154 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 REVERT JUMPDEST POP DUP7 DUP7 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x170 JUMPI INVALID JUMPDEST SWAP1 POP ADD CALLDATALOAD PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 SWAP1 DIV PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 MUL PUSH31 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND PUSH32 0x100000000000000000000000000000000000000000000000000000000000000 SWAP1 DIV SWAP4 POP PUSH2 0x23C DUP8 DUP8 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY POP PUSH1 0x1 SWAP5 POP PUSH2 0x347 SWAP4 POP POP POP POP JUMP JUMPDEST SWAP3 POP PUSH2 0x27A DUP8 DUP8 DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY POP PUSH1 0x21 SWAP5 POP PUSH2 0x347 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 ADD DUP1 DUP6 MSTORE DUP14 SWAP1 MSTORE PUSH1 0xFF DUP10 AND DUP4 DUP6 ADD MSTORE PUSH1 0x60 DUP4 ADD DUP9 SWAP1 MSTORE PUSH1 0x80 DUP4 ADD DUP6 SWAP1 MSTORE SWAP3 MLOAD SWAP4 SWAP6 POP PUSH1 0x1 SWAP4 PUSH1 0xA0 DUP1 DUP5 ADD SWAP5 SWAP4 PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 DUP4 ADD SWAP4 SWAP1 DUP4 SWAP1 SUB SWAP1 SWAP2 ADD SWAP2 SWAP1 DUP7 GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2F4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 ADD MLOAD PUSH1 0x0 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF SWAP2 DUP3 AND SWAP2 AND EQ SWAP10 SWAP9 POP POP POP POP POP POP POP 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 0x26 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x475245415445525F4F525F455155414C5F544F5F33325F4C454E4754485F5245 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x5155495245440000000000000000000000000000000000000000000000000000 DUP2 MSTORE POP SWAP1 ISZERO ISZERO PUSH2 0x417 JUMPI PUSH1 0x40 MLOAD PUSH32 0x8C379A000000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x4 ADD DUP1 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 DUP4 DUP2 LT ISZERO PUSH2 0x127 JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x10F JUMP JUMPDEST POP POP ADD PUSH1 0x20 ADD MLOAD SWAP1 JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xae 0xa5 PUSH21 0xE2E94A21025C72282F826B66D9657C3548FB682C5A 0x5e LOG4 PC 0xce ADD 0x47 NUMBER 0x23 STOP 0x29 ",
+ "sourceMap": "708:1180:1:-;;;;;;;;;;;;;;;;;;;;;;;1338:548;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1338:548:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1561:18;;;;;;;;;;;;;;;;;1470:12;;;;;;;;;;1545:2;1519:28;;1498:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;1498:91:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1616:15:1;;1632:1;1616:18;;;;;;;;;;;;;;;;;;;1610:25;;;1600:35;;1657:31;1669:15;;1657:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1686:1:1;;-1:-1:-1;1657:11:1;;-1:-1:-1;;;;1657:31:1:i;:::-;1645:43;;1710:32;1722:15;;1710:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1739:2:1;;-1:-1:-1;1710:11:1;;-1:-1:-1;;;;1710:32:1:i;:::-;1779:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1698:44;;-1:-1:-1;1779:24:1;;;;;;;;-1:-1:-1;1779:24:1;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;1779:24:1;;;;;1823:12;;:32;;;;:12;;:32;;1338:548;-1:-1:-1;;;;;;;;;1338:548:1:o;5639:488:2:-;5760:14;5823:5;5831:2;5823:10;5811:1;:8;:22;;5847:38;;;;;;;;;;;;;;;;;;;;;;;5790:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;5790:105:2;-1:-1:-1;;6074:13:2;5976:2;6074:13;6068:20;;5639:488::o"
+ }
+ }
+ },
+ "sources": {
+ "current/protocol/Exchange/interfaces/IWallet.sol": {
+ "id": 0
+ },
+ "current/test/TestWallet/TestWallet.sol": {
+ "id": 1
+ },
+ "current/utils/LibBytes/LibBytes.sol": {
+ "id": 2
+ },
+ "current/utils/LibMem/LibMem.sol": {
+ "id": 3
+ }
+ },
+ "sourceCodes": {
+ "current/protocol/Exchange/interfaces/IWallet.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 IWallet {\n\n /// @dev Verifies that a signature is valid.\n /// @param hash Message hash that is signed.\n /// @param signature Proof of signing.\n /// @return Validity of order signature.\n function isValidSignature(\n bytes32 hash,\n bytes signature\n )\n external\n view\n returns (bool isValid);\n}\n",
+ "current/test/TestWallet/TestWallet.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 \"../../protocol/Exchange/interfaces/IWallet.sol\";\nimport \"../../utils/LibBytes/LibBytes.sol\";\n\ncontract TestWallet is \n IWallet,\n LibBytes\n{\n\n string constant LENGTH_65_REQUIRED = \"LENGTH_65_REQUIRED\";\n\n // The owner of this wallet.\n address WALLET_OWNER;\n\n /// @dev constructs a new `TestWallet` with a single owner.\n /// @param walletOwner The owner of this wallet.\n constructor (address walletOwner) public {\n WALLET_OWNER = walletOwner;\n }\n\n /// @dev Validates an EIP712 signature.\n /// The signer must match the owner of this wallet.\n /// @param hash Message hash that is signed.\n /// @param eip712Signature Proof of signing.\n /// @return Validity of signature.\n function isValidSignature(\n bytes32 hash,\n bytes eip712Signature\n )\n external\n view\n returns (bool isValid)\n {\n require(\n eip712Signature.length == 65,\n LENGTH_65_REQUIRED\n );\n\n uint8 v = uint8(eip712Signature[0]);\n bytes32 r = readBytes32(eip712Signature, 1);\n bytes32 s = readBytes32(eip712Signature, 33);\n address recoveredAddress = ecrecover(hash, v, r, s);\n isValid = WALLET_OWNER == recoveredAddress;\n return isValid;\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 GREATER_THAN_ZERO_LENGTH_REQUIRED = \"GREATER_THAN_ZERO_LENGTH_REQUIRED\";\n string constant GREATER_OR_EQUAL_TO_4_LENGTH_REQUIRED = \"GREATER_OR_EQUAL_TO_4_LENGTH_REQUIRED\";\n string constant GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED = \"GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED\";\n string constant GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED = \"GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED\";\n string constant GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED = \"GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED\";\n string constant GREATER_OR_EQUAL_TO_SOURCE_BYTES_LENGTH_REQUIRED = \"GREATER_OR_EQUAL_TO_SOURCE_BYTES_LENGTH_REQUIRED\";\n\n /// @dev Pops the last byte off of a byte array by modifying its length.\n /// @param b Byte array that will be modified.\n /// @return The byte that was popped off.\n function popLastByte(bytes memory b)\n internal\n pure\n returns (bytes1 result)\n {\n require(\n b.length > 0,\n GREATER_THAN_ZERO_LENGTH_REQUIRED\n );\n\n // Store last byte.\n result = b[b.length - 1];\n\n assembly {\n // Decrement length of byte array.\n let newLen := sub(mload(b), 1)\n mstore(b, newLen)\n }\n return result;\n }\n\n /// @dev Pops the last 20 bytes off of a byte array by modifying its length.\n /// @param b Byte array that will be modified.\n /// @return The 20 byte address that was popped off.\n function popLast20Bytes(bytes memory b)\n internal\n pure\n returns (address result)\n {\n require(\n b.length >= 20,\n GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED\n );\n\n // Store last 20 bytes.\n result = readAddress(b, b.length - 20);\n\n assembly {\n // Subtract 20 from byte array length.\n let newLen := sub(mload(b), 20)\n mstore(b, newLen)\n }\n return result;\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 GREATER_OR_EQUAL_TO_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 GREATER_OR_EQUAL_TO_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 GREATER_OR_EQUAL_TO_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 GREATER_OR_EQUAL_TO_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 the first 4 bytes from a byte array of arbitrary length.\n /// @param b Byte array to read first 4 bytes from.\n /// @return First 4 bytes of data.\n function readFirst4(bytes memory b)\n internal\n pure\n returns (bytes4 result)\n {\n require(\n b.length >= 4,\n GREATER_OR_EQUAL_TO_4_LENGTH_REQUIRED\n );\n assembly {\n result := mload(add(b, 32))\n }\n return result;\n }\n\n /// @dev Reads nested bytes from a specific position.\n /// @param b Byte array containing nested bytes.\n /// @param index Index of nested bytes.\n /// @return result Nested bytes.\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 uint256 nestedBytesLength = readUint256(b, index);\n index += 32;\n\n // Assert length of <b> is valid, given\n // length of nested bytes\n require(\n b.length >= index + nestedBytesLength,\n GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED\n );\n\n // Allocate memory and copy value to result\n result = new bytes(nestedBytesLength);\n memCopy(\n getMemAddress(result) + 32, // +32 skips array length\n getMemAddress(b) + index + 32,\n nestedBytesLength\n );\n\n return result;\n }\n\n /// @dev Inserts bytes at 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 bytes to insert.\n function writeBytes(\n bytes memory b,\n uint256 index,\n bytes memory input\n )\n internal\n pure\n {\n // Assert length of <b> is valid, given\n // length of input\n require(\n b.length >= index + 32 /* 32 bytes to store length */ + input.length,\n GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED\n );\n\n // Copy <input> into <b>\n memCopy(\n getMemAddress(b) + 32 + index, // +32 to skip length of <b>\n getMemAddress(input), // includes length of <input>\n input.length + 32 // +32 bytes to store <input> length\n );\n }\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(\n bytes memory lhs,\n bytes memory rhs\n )\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 Performs a deep copy of a byte array onto another byte array of greater than or equal length.\n /// @param dest Byte array that will be overwritten with source bytes.\n /// @param source Byte array to copy onto dest bytes.\n function deepCopyBytes(\n bytes memory dest,\n bytes memory source\n )\n internal\n pure\n {\n uint256 sourceLen = source.length;\n // Dest length must be >= source length, or some bytes would not be copied.\n require(\n dest.length >= sourceLen,\n GREATER_OR_EQUAL_TO_SOURCE_BYTES_LENGTH_REQUIRED\n );\n memCopy(\n getMemAddress(dest) + 32, // +32 to skip length of <dest>\n getMemAddress(source) + 32, // +32 to skip length of <source>\n sourceLen\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\n /// @dev Gets the memory address for a byte array.\n /// @param input Byte array to lookup.\n /// @return memoryAddress Memory address of byte array.\n function getMemAddress(bytes memory input)\n internal\n pure\n returns (uint256 memoryAddress)\n {\n assembly {\n memoryAddress := input\n }\n return memoryAddress;\n }\n\n /// @dev Copies `length` bytes from memory location `source` to `dest`.\n /// @param dest memory address to copy bytes to.\n /// @param source memory address to copy bytes from.\n /// @param length number of bytes to copy.\n function memCopy(\n uint256 dest,\n uint256 source,\n uint256 length\n )\n internal\n pure\n {\n if (length < 32) {\n // Handle a partial word by reading destination and masking\n // off the bits we are interested in.\n // This correctly handles overlap, zero lengths and source == dest\n assembly {\n let mask := sub(exp(256, sub(32, length)), 1)\n let s := and(mload(source), not(mask))\n let d := and(mload(dest), mask)\n mstore(dest, or(s, d))\n }\n } else {\n // Skip the O(length) loop when source == dest.\n if (source == dest) {\n return;\n }\n\n // For large copies we copy whole words at a time. The final\n // word is aligned to the end of the range (instead of after the\n // previous) to handle partial words. So a copy will look like this:\n //\n // ####\n // ####\n // ####\n // ####\n //\n // We handle overlap in the source and destination range by\n // changing the copying direction. This prevents us from\n // overwriting parts of source that we still need to copy.\n //\n // This correctly handles source == dest\n //\n if (source > dest) {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because it\n // is easier to compare with in the loop, and these\n // are also the addresses we need for copying the\n // last bytes.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the last 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the last bytes in\n // source already due to overlap.\n let last := mload(sEnd)\n\n // Copy whole words front to back\n // Note: the first check is always true,\n // this could have been a do-while loop.\n for {} lt(source, sEnd) {} {\n mstore(dest, mload(source))\n source := add(source, 32)\n dest := add(dest, 32)\n }\n \n // Write the last 32 bytes\n mstore(dEnd, last)\n }\n } else {\n assembly {\n // We subtract 32 from `sEnd` and `dEnd` because those\n // are the starting points when copying a word at the end.\n length := sub(length, 32)\n let sEnd := add(source, length)\n let dEnd := add(dest, length)\n\n // Remember the first 32 bytes of source\n // This needs to be done here and not after the loop\n // because we may have overwritten the first bytes in\n // source already due to overlap.\n let first := mload(source)\n\n // Copy whole words back to front\n // We use a signed comparisson here to allow dEnd to become\n // negative (happens when source and dest < 32). Valid\n // addresses in local memory will never be larger than\n // 2**255, so they can be safely re-interpreted as signed.\n // Note: the first check is always true,\n // this could have been a do-while loop.\n for {} slt(dest, dEnd) {} {\n mstore(dEnd, mload(sEnd))\n sEnd := sub(sEnd, 32)\n dEnd := sub(dEnd, 32)\n }\n \n // Write the first 32 bytes\n mstore(dest, first)\n }\n }\n }\n }\n}\n"
+ },
+ "sourceTreeHashHex": "0xd6195500bd81530242b4f57f341b2c39507e2b549c42d39944cbcd78550a1edb",
+ "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