aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/exchange-libs
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/exchange-libs')
-rw-r--r--contracts/exchange-libs/compiler.json21
-rw-r--r--contracts/exchange-libs/package.json7
-rw-r--r--contracts/exchange-libs/src/artifacts.ts25
-rw-r--r--contracts/exchange-libs/src/artifacts/index.ts17
-rw-r--r--contracts/exchange-libs/src/wrappers.ts13
-rw-r--r--contracts/exchange-libs/src/wrappers/index.ts6
-rw-r--r--contracts/exchange-libs/tsconfig.json20
7 files changed, 61 insertions, 48 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 695301da1..ebe3e8195 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",
@@ -44,6 +46,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/libs/README.md",
"devDependencies": {
+ "@0x/contracts-gen": "^1.0.0",
"@0x/abi-gen": "^2.0.1",
"@0x/contracts-test-utils": "^3.0.2",
"@0x/dev-utils": "^2.0.1",
@@ -72,7 +75,7 @@
"@0x/utils": "^4.0.2",
"@0x/web3-wrapper": "^4.0.1",
"ethereum-types": "^2.0.0",
- "lodash": "^4.17.5"
+ "lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"
diff --git a/contracts/exchange-libs/src/artifacts.ts b/contracts/exchange-libs/src/artifacts.ts
new file mode 100644
index 000000000..861d6f3d2
--- /dev/null
+++ b/contracts/exchange-libs/src/artifacts.ts
@@ -0,0 +1,25 @@
+/*
+ * -----------------------------------------------------------------------------
+ * Warning: 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..05244d87b
--- /dev/null
+++ b/contracts/exchange-libs/src/wrappers.ts
@@ -0,0 +1,13 @@
+/*
+ * -----------------------------------------------------------------------------
+ * Warning: 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"]
}