aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/utils
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/utils')
-rw-r--r--contracts/utils/compiler.json15
-rw-r--r--contracts/utils/package.json5
-rw-r--r--contracts/utils/src/artifacts.ts19
-rw-r--r--contracts/utils/src/artifacts/index.ts19
-rw-r--r--contracts/utils/src/wrappers.ts8
-rw-r--r--contracts/utils/src/wrappers/index.ts2
-rw-r--r--contracts/utils/tsconfig.json20
7 files changed, 49 insertions, 39 deletions
diff --git a/contracts/utils/compiler.json b/contracts/utils/compiler.json
index 7473ea6d1..a54f547df 100644
--- a/contracts/utils/compiler.json
+++ b/contracts/utils/compiler.json
@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
+ "optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -19,5 +16,13 @@
}
}
},
- "contracts": ["TestConstants", "TestLibBytes", "LibBytes", "Ownable", "IOwnable", "ReentrancyGuard", "SafeMath"]
+ "contracts": [
+ "src/LibBytes.sol",
+ "src/Ownable.sol",
+ "src/ReentrancyGuard.sol",
+ "src/SafeMath.sol",
+ "src/interfaces/IOwnable.sol",
+ "test/TestConstants.sol",
+ "test/TestLibBytes.sol"
+ ]
}
diff --git a/contracts/utils/package.json b/contracts/utils/package.json
index 33d94cc33..afa4a7011 100644
--- a/contracts/utils/package.json
+++ b/contracts/utils/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/@(IOwnable|Ownable|LibBytes|ReentrancyGuard|SafeMath|TestConstants|TestLibBytes).json"
+ "abis": "./generated-artifacts/@(IOwnable|LibBytes|Ownable|ReentrancyGuard|SafeMath|TestConstants|TestLibBytes).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": "*",
"@types/bn.js": "^4.11.0",
diff --git a/contracts/utils/src/artifacts.ts b/contracts/utils/src/artifacts.ts
new file mode 100644
index 000000000..26f665eec
--- /dev/null
+++ b/contracts/utils/src/artifacts.ts
@@ -0,0 +1,19 @@
+// This file is auto-generated by contracts-gen. Don't edit manually.
+import { ContractArtifact } from 'ethereum-types';
+
+import * as IOwnable from '../generated-artifacts/IOwnable.json';
+import * as LibBytes from '../generated-artifacts/LibBytes.json';
+import * as Ownable from '../generated-artifacts/Ownable.json';
+import * as ReentrancyGuard from '../generated-artifacts/ReentrancyGuard.json';
+import * as SafeMath from '../generated-artifacts/SafeMath.json';
+import * as TestConstants from '../generated-artifacts/TestConstants.json';
+import * as TestLibBytes from '../generated-artifacts/TestLibBytes.json';
+export const artifacts = {
+ LibBytes: LibBytes as ContractArtifact,
+ Ownable: Ownable as ContractArtifact,
+ ReentrancyGuard: ReentrancyGuard as ContractArtifact,
+ SafeMath: SafeMath as ContractArtifact,
+ IOwnable: IOwnable as ContractArtifact,
+ TestConstants: TestConstants as ContractArtifact,
+ TestLibBytes: TestLibBytes as ContractArtifact,
+};
diff --git a/contracts/utils/src/artifacts/index.ts b/contracts/utils/src/artifacts/index.ts
deleted file mode 100644
index a5c2b215c..000000000
--- a/contracts/utils/src/artifacts/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as IOwnable from '../../generated-artifacts/IOwnable.json';
-import * as LibBytes from '../../generated-artifacts/LibBytes.json';
-import * as Ownable from '../../generated-artifacts/Ownable.json';
-import * as ReentrancyGuard from '../../generated-artifacts/ReentrancyGuard.json';
-import * as SafeMath from '../../generated-artifacts/SafeMath.json';
-import * as TestConstants from '../../generated-artifacts/TestConstants.json';
-import * as TestLibBytes from '../../generated-artifacts/TestLibBytes.json';
-
-export const artifacts = {
- TestConstants: TestConstants as ContractArtifact,
- TestLibBytes: TestLibBytes as ContractArtifact,
- IOwnable: IOwnable as ContractArtifact,
- LibBytes: LibBytes as ContractArtifact,
- Ownable: Ownable as ContractArtifact,
- SafeMath: SafeMath as ContractArtifact,
- ReentrancyGuard: ReentrancyGuard as ContractArtifact,
-};
diff --git a/contracts/utils/src/wrappers.ts b/contracts/utils/src/wrappers.ts
new file mode 100644
index 000000000..fc8e4584a
--- /dev/null
+++ b/contracts/utils/src/wrappers.ts
@@ -0,0 +1,8 @@
+// This file is auto-generated by contracts-gen. Don't edit manually.
+export * from '../generated-wrappers/i_ownable';
+export * from '../generated-wrappers/lib_bytes';
+export * from '../generated-wrappers/ownable';
+export * from '../generated-wrappers/reentrancy_guard';
+export * from '../generated-wrappers/safe_math';
+export * from '../generated-wrappers/test_constants';
+export * from '../generated-wrappers/test_lib_bytes';
diff --git a/contracts/utils/src/wrappers/index.ts b/contracts/utils/src/wrappers/index.ts
deleted file mode 100644
index 823b7fa4b..000000000
--- a/contracts/utils/src/wrappers/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from '../../generated-wrappers/test_constants';
-export * from '../../generated-wrappers/test_lib_bytes';
diff --git a/contracts/utils/tsconfig.json b/contracts/utils/tsconfig.json
index 68251e6b0..efd71ff93 100644
--- a/contracts/utils/tsconfig.json
+++ b/contracts/utils/tsconfig.json
@@ -1,19 +1,15 @@
{
"extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
+ "compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
- "./generated-artifacts/TestConstants.json",
- "./generated-artifacts/TestLibBytes.json",
- "./generated-artifacts/IOwnable.json",
- "./generated-artifacts/Ownable.json",
- "./generated-artifacts/LibBytes.json",
- "./generated-artifacts/SafeMath.json",
- "./generated-artifacts/ReentrancyGuard.json"
+ "generated-artifacts/IOwnable.json",
+ "generated-artifacts/LibBytes.json",
+ "generated-artifacts/Ownable.json",
+ "generated-artifacts/ReentrancyGuard.json",
+ "generated-artifacts/SafeMath.json",
+ "generated-artifacts/TestConstants.json",
+ "generated-artifacts/TestLibBytes.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}