aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/erc20
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/erc20')
-rw-r--r--contracts/erc20/compiler.json27
-rw-r--r--contracts/erc20/package.json7
-rw-r--r--contracts/erc20/src/artifacts.ts31
-rw-r--r--contracts/erc20/src/artifacts/index.ts30
-rw-r--r--contracts/erc20/src/wrappers.ts16
-rw-r--r--contracts/erc20/src/wrappers/index.ts11
-rw-r--r--contracts/erc20/tsconfig.json28
7 files changed, 76 insertions, 74 deletions
diff --git a/contracts/erc20/compiler.json b/contracts/erc20/compiler.json
index 264f6231a..033917d22 100644
--- a/contracts/erc20/compiler.json
+++ b/contracts/erc20/compiler.json
@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
+ "optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,16 +17,16 @@
}
},
"contracts": [
- "DummyERC20Token",
- "DummyMultipleReturnERC20Token",
- "DummyNoReturnERC20Token",
- "ReentrantERC20Token",
- "ERC20Token",
- "IERC20Token",
- "MintableERC20Token",
- "UnlimitedAllowanceERC20Token",
- "IEtherToken",
- "WETH9",
- "ZRXToken"
+ "src/ERC20Token.sol",
+ "src/MintableERC20Token.sol",
+ "src/UnlimitedAllowanceERC20Token.sol",
+ "src/WETH9.sol",
+ "src/ZRXToken.sol",
+ "src/interfaces/IERC20Token.sol",
+ "src/interfaces/IEtherToken.sol",
+ "test/DummyERC20Token.sol",
+ "test/DummyMultipleReturnERC20Token.sol",
+ "test/DummyNoReturnERC20Token.sol",
+ "test/ReentrantERC20Token.sol"
]
}
diff --git a/contracts/erc20/package.json b/contracts/erc20/package.json
index 937198f2f..b3517a8c0 100644
--- a/contracts/erc20/package.json
+++ b/contracts/erc20/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/@(DummyERC20Token|DummyMultipleReturnERC20Token|DummyNoReturnERC20Token|ReentrantERC20Token|ERC20Token|IERC20Token|MintableERC20Token|UnlimitedAllowanceERC20Token|IEtherToken|WETH9|ZRXToken).json"
+ "abis": "./generated-artifacts/@(DummyERC20Token|DummyMultipleReturnERC20Token|DummyNoReturnERC20Token|ERC20Token|IERC20Token|IEtherToken|MintableERC20Token|ReentrantERC20Token|UnlimitedAllowanceERC20Token|WETH9|ZRXToken).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/tokens/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/erc20/src/artifacts.ts b/contracts/erc20/src/artifacts.ts
new file mode 100644
index 000000000..c97a73195
--- /dev/null
+++ b/contracts/erc20/src/artifacts.ts
@@ -0,0 +1,31 @@
+/*
+ * -----------------------------------------------------------------------------
+ * Warning: This file is auto-generated by contracts-gen. Don't edit manually.
+ * -----------------------------------------------------------------------------
+ */
+import { ContractArtifact } from 'ethereum-types';
+
+import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
+import * as DummyMultipleReturnERC20Token from '../generated-artifacts/DummyMultipleReturnERC20Token.json';
+import * as DummyNoReturnERC20Token from '../generated-artifacts/DummyNoReturnERC20Token.json';
+import * as ERC20Token from '../generated-artifacts/ERC20Token.json';
+import * as IERC20Token from '../generated-artifacts/IERC20Token.json';
+import * as IEtherToken from '../generated-artifacts/IEtherToken.json';
+import * as MintableERC20Token from '../generated-artifacts/MintableERC20Token.json';
+import * as ReentrantERC20Token from '../generated-artifacts/ReentrantERC20Token.json';
+import * as UnlimitedAllowanceERC20Token from '../generated-artifacts/UnlimitedAllowanceERC20Token.json';
+import * as WETH9 from '../generated-artifacts/WETH9.json';
+import * as ZRXToken from '../generated-artifacts/ZRXToken.json';
+export const artifacts = {
+ ERC20Token: ERC20Token as ContractArtifact,
+ MintableERC20Token: MintableERC20Token as ContractArtifact,
+ UnlimitedAllowanceERC20Token: UnlimitedAllowanceERC20Token as ContractArtifact,
+ WETH9: WETH9 as ContractArtifact,
+ ZRXToken: (ZRXToken as any) as ContractArtifact,
+ IERC20Token: IERC20Token as ContractArtifact,
+ IEtherToken: IEtherToken as ContractArtifact,
+ DummyERC20Token: DummyERC20Token as ContractArtifact,
+ DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
+ DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
+ ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
+};
diff --git a/contracts/erc20/src/artifacts/index.ts b/contracts/erc20/src/artifacts/index.ts
deleted file mode 100644
index ce1ae06ac..000000000
--- a/contracts/erc20/src/artifacts/index.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as DummyERC20Token from '../../generated-artifacts/DummyERC20Token.json';
-import * as DummyMultipleReturnERC20Token from '../../generated-artifacts/DummyMultipleReturnERC20Token.json';
-import * as DummyNoReturnERC20Token from '../../generated-artifacts/DummyNoReturnERC20Token.json';
-import * as ERC20Token from '../../generated-artifacts/ERC20Token.json';
-import * as IERC20Token from '../../generated-artifacts/IERC20Token.json';
-import * as IEtherToken from '../../generated-artifacts/IEtherToken.json';
-import * as MintableERC20Token from '../../generated-artifacts/MintableERC20Token.json';
-import * as ReentrantERC20Token from '../../generated-artifacts/ReentrantERC20Token.json';
-import * as UnlimitedAllowanceERC20Token from '../../generated-artifacts/UnlimitedAllowanceERC20Token.json';
-import * as WETH9 from '../../generated-artifacts/WETH9.json';
-import * as ZRXToken from '../../generated-artifacts/ZRXToken.json';
-
-// tslint:disable:no-unnecessary-type-assertion
-export const artifacts = {
- DummyERC20Token: DummyERC20Token as ContractArtifact,
- DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
- DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
- ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
- ERC20Token: ERC20Token as ContractArtifact,
- IERC20Token: IERC20Token as ContractArtifact,
- MintableERC20Token: MintableERC20Token as ContractArtifact,
- UnlimitedAllowanceERC20Token: UnlimitedAllowanceERC20Token as ContractArtifact,
- IEtherToken: IEtherToken as ContractArtifact,
- WETH9: WETH9 as ContractArtifact,
- // Note(albrow): "as any" hack still required here because ZRXToken does not
- // conform to the v2 artifact type.
- ZRXToken: (ZRXToken as any) as ContractArtifact,
-};
diff --git a/contracts/erc20/src/wrappers.ts b/contracts/erc20/src/wrappers.ts
new file mode 100644
index 000000000..40193e7d8
--- /dev/null
+++ b/contracts/erc20/src/wrappers.ts
@@ -0,0 +1,16 @@
+/*
+ * -----------------------------------------------------------------------------
+ * Warning: This file is auto-generated by contracts-gen. Don't edit manually.
+ * -----------------------------------------------------------------------------
+ */
+export * from '../generated-wrappers/dummy_erc20_token';
+export * from '../generated-wrappers/dummy_multiple_return_erc20_token';
+export * from '../generated-wrappers/dummy_no_return_erc20_token';
+export * from '../generated-wrappers/erc20_token';
+export * from '../generated-wrappers/i_erc20_token';
+export * from '../generated-wrappers/i_ether_token';
+export * from '../generated-wrappers/mintable_erc20_token';
+export * from '../generated-wrappers/reentrant_erc20_token';
+export * from '../generated-wrappers/unlimited_allowance_erc20_token';
+export * from '../generated-wrappers/weth9';
+export * from '../generated-wrappers/zrx_token';
diff --git a/contracts/erc20/src/wrappers/index.ts b/contracts/erc20/src/wrappers/index.ts
deleted file mode 100644
index b4e4ef969..000000000
--- a/contracts/erc20/src/wrappers/index.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export * from '../../generated-wrappers/zrx_token';
-export * from '../../generated-wrappers/weth9';
-export * from '../../generated-wrappers/unlimited_allowance_erc20_token';
-export * from '../../generated-wrappers/reentrant_erc20_token';
-export * from '../../generated-wrappers/mintable_erc20_token';
-export * from '../../generated-wrappers/i_ether_token';
-export * from '../../generated-wrappers/i_erc20_token';
-export * from '../../generated-wrappers/erc20_token';
-export * from '../../generated-wrappers/dummy_no_return_erc20_token';
-export * from '../../generated-wrappers/dummy_multiple_return_erc20_token';
-export * from '../../generated-wrappers/dummy_erc20_token';
diff --git a/contracts/erc20/tsconfig.json b/contracts/erc20/tsconfig.json
index 4df7424be..74419260a 100644
--- a/contracts/erc20/tsconfig.json
+++ b/contracts/erc20/tsconfig.json
@@ -1,23 +1,19 @@
{
"extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
+ "compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
- "./generated-artifacts/DummyERC20Token.json",
- "./generated-artifacts/DummyMultipleReturnERC20Token.json",
- "./generated-artifacts/DummyNoReturnERC20Token.json",
- "./generated-artifacts/ReentrantERC20Token.json",
- "./generated-artifacts/ERC20Token.json",
- "./generated-artifacts/IERC20Token.json",
- "./generated-artifacts/MintableERC20Token.json",
- "./generated-artifacts/UnlimitedAllowanceERC20Token.json",
- "./generated-artifacts/IEtherToken.json",
- "./generated-artifacts/WETH9.json",
- "./generated-artifacts/ZRXToken.json"
+ "generated-artifacts/DummyERC20Token.json",
+ "generated-artifacts/DummyMultipleReturnERC20Token.json",
+ "generated-artifacts/DummyNoReturnERC20Token.json",
+ "generated-artifacts/ERC20Token.json",
+ "generated-artifacts/IERC20Token.json",
+ "generated-artifacts/IEtherToken.json",
+ "generated-artifacts/MintableERC20Token.json",
+ "generated-artifacts/ReentrantERC20Token.json",
+ "generated-artifacts/UnlimitedAllowanceERC20Token.json",
+ "generated-artifacts/WETH9.json",
+ "generated-artifacts/ZRXToken.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}