aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/exchange-libs
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-02-04 17:12:49 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-02-04 17:38:02 +0800
commit6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4 (patch)
tree768bb7240b510a8e9f0c735ae658497583160627 /contracts/exchange-libs
parent1d3fff32a29b4e958cd32acb016577683df95d3d (diff)
downloaddexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.gz
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.bz2
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.lz
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.xz
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.zst
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.zip
Temp
Diffstat (limited to 'contracts/exchange-libs')
-rw-r--r--contracts/exchange-libs/compiler.json21
-rw-r--r--contracts/exchange-libs/package.json5
-rw-r--r--contracts/exchange-libs/src/artifacts.ts21
-rw-r--r--contracts/exchange-libs/src/artifacts/index.ts17
-rw-r--r--contracts/exchange-libs/src/wrappers.ts9
-rw-r--r--contracts/exchange-libs/src/wrappers/index.ts6
-rw-r--r--contracts/exchange-libs/tsconfig.json20
7 files changed, 52 insertions, 47 deletions
diff --git a/contracts/exchange-libs/compiler.json b/contracts/exchange-libs/compiler.json
index c4f0c6bd9..2a69896e6 100644
--- a/contracts/exchange-libs/compiler.json
+++ b/contracts/exchange-libs/compiler.json
@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
+ "optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,13 +17,13 @@
}
},
"contracts": [
- "TestLibs",
- "LibOrder",
- "LibMath",
- "LibFillResults",
- "LibAbiEncoder",
- "LibEIP712",
- "LibAssetProxyErrors",
- "LibConstants"
+ "src/LibAbiEncoder.sol",
+ "src/LibAssetProxyErrors.sol",
+ "src/LibConstants.sol",
+ "src/LibEIP712.sol",
+ "src/LibFillResults.sol",
+ "src/LibMath.sol",
+ "src/LibOrder.sol",
+ "test/TestLibs.sol"
]
}
diff --git a/contracts/exchange-libs/package.json b/contracts/exchange-libs/package.json
index f3efdd00e..a2279af91 100644
--- a/contracts/exchange-libs/package.json
+++ b/contracts/exchange-libs/package.json
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
+ "contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
- "abis": "generated-artifacts/@(LibMath|LibOrder|LibFillResults|LibAbiEncoder|TestLibs|LibEIP712).json"
+ "abis": "./generated-artifacts/@(LibAbiEncoder|LibAssetProxyErrors|LibConstants|LibEIP712|LibFillResults|LibMath|LibOrder|TestLibs).json",
+ "abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -49,6 +51,7 @@
"@0x/dev-utils": "^1.0.24",
"@0x/sol-compiler": "^2.0.2",
"@0x/tslint-config": "^2.0.2",
+ "@0x/contracts-gen": "^1.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
"chai": "^4.0.1",
diff --git a/contracts/exchange-libs/src/artifacts.ts b/contracts/exchange-libs/src/artifacts.ts
new file mode 100644
index 000000000..5e660e1a8
--- /dev/null
+++ b/contracts/exchange-libs/src/artifacts.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated by contracts-gen. Don't edit manually.
+import { ContractArtifact } from 'ethereum-types';
+
+import * as LibAbiEncoder from '../generated-artifacts/LibAbiEncoder.json';
+import * as LibAssetProxyErrors from '../generated-artifacts/LibAssetProxyErrors.json';
+import * as LibConstants from '../generated-artifacts/LibConstants.json';
+import * as LibEIP712 from '../generated-artifacts/LibEIP712.json';
+import * as LibFillResults from '../generated-artifacts/LibFillResults.json';
+import * as LibMath from '../generated-artifacts/LibMath.json';
+import * as LibOrder from '../generated-artifacts/LibOrder.json';
+import * as TestLibs from '../generated-artifacts/TestLibs.json';
+export const artifacts = {
+ LibAbiEncoder: LibAbiEncoder as ContractArtifact,
+ LibAssetProxyErrors: LibAssetProxyErrors as ContractArtifact,
+ LibConstants: LibConstants as ContractArtifact,
+ LibEIP712: LibEIP712 as ContractArtifact,
+ LibFillResults: LibFillResults as ContractArtifact,
+ LibMath: LibMath as ContractArtifact,
+ LibOrder: LibOrder as ContractArtifact,
+ TestLibs: TestLibs as ContractArtifact,
+};
diff --git a/contracts/exchange-libs/src/artifacts/index.ts b/contracts/exchange-libs/src/artifacts/index.ts
deleted file mode 100644
index 3955bbe2b..000000000
--- a/contracts/exchange-libs/src/artifacts/index.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as LibAbiEncoder from '../../generated-artifacts/LibAbiEncoder.json';
-import * as LibEIP721 from '../../generated-artifacts/LibEIP712.json';
-import * as LibFillResults from '../../generated-artifacts/LibFillResults.json';
-import * as LibMath from '../../generated-artifacts/LibMath.json';
-import * as LibOrder from '../../generated-artifacts/LibOrder.json';
-import * as TestLibs from '../../generated-artifacts/TestLibs.json';
-
-export const artifacts = {
- TestLibs: TestLibs as ContractArtifact,
- LibAbiEncoder: LibAbiEncoder as ContractArtifact,
- LibFillResults: LibFillResults as ContractArtifact,
- LibMath: LibMath as ContractArtifact,
- LibOrder: LibOrder as ContractArtifact,
- LibEIP721: LibEIP721 as ContractArtifact,
-};
diff --git a/contracts/exchange-libs/src/wrappers.ts b/contracts/exchange-libs/src/wrappers.ts
new file mode 100644
index 000000000..840886181
--- /dev/null
+++ b/contracts/exchange-libs/src/wrappers.ts
@@ -0,0 +1,9 @@
+// This file is auto-generated by contracts-gen. Don't edit manually.
+export * from '../generated-wrappers/lib_abi_encoder';
+export * from '../generated-wrappers/lib_asset_proxy_errors';
+export * from '../generated-wrappers/lib_constants';
+export * from '../generated-wrappers/lib_e_i_p712';
+export * from '../generated-wrappers/lib_fill_results';
+export * from '../generated-wrappers/lib_math';
+export * from '../generated-wrappers/lib_order';
+export * from '../generated-wrappers/test_libs';
diff --git a/contracts/exchange-libs/src/wrappers/index.ts b/contracts/exchange-libs/src/wrappers/index.ts
deleted file mode 100644
index baaae6e34..000000000
--- a/contracts/exchange-libs/src/wrappers/index.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export * from '../../generated-wrappers/test_libs';
-export * from '../../generated-wrappers/lib_abi_encoder';
-export * from '../../generated-wrappers/lib_fill_results';
-export * from '../../generated-wrappers/lib_math';
-export * from '../../generated-wrappers/lib_order';
-export * from '../../generated-wrappers/lib_e_i_p712';
diff --git a/contracts/exchange-libs/tsconfig.json b/contracts/exchange-libs/tsconfig.json
index 27ca35085..1b5d54175 100644
--- a/contracts/exchange-libs/tsconfig.json
+++ b/contracts/exchange-libs/tsconfig.json
@@ -1,18 +1,16 @@
{
"extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
+ "compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
- "./generated-artifacts/TestLibs.json",
- "./generated-artifacts/LibOrder.json",
- "./generated-artifacts/LibFillResults.json",
- "./generated-artifacts/LibAbiEncoder.json",
- "./generated-artifacts/LibEIP712.json",
- "./generated-artifacts/LibMath.json"
+ "generated-artifacts/LibAbiEncoder.json",
+ "generated-artifacts/LibAssetProxyErrors.json",
+ "generated-artifacts/LibConstants.json",
+ "generated-artifacts/LibEIP712.json",
+ "generated-artifacts/LibFillResults.json",
+ "generated-artifacts/LibMath.json",
+ "generated-artifacts/LibOrder.json",
+ "generated-artifacts/TestLibs.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}