aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/erc721
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/erc721')
-rw-r--r--contracts/erc721/compiler.json19
-rw-r--r--contracts/erc721/package.json7
-rw-r--r--contracts/erc721/src/artifacts.ts23
-rw-r--r--contracts/erc721/src/artifacts/index.ts20
-rw-r--r--contracts/erc721/src/wrappers.ts12
-rw-r--r--contracts/erc721/src/wrappers/index.ts7
-rw-r--r--contracts/erc721/tsconfig.json20
7 files changed, 56 insertions, 52 deletions
diff --git a/contracts/erc721/compiler.json b/contracts/erc721/compiler.json
index db8589016..09d79ba28 100644
--- a/contracts/erc721/compiler.json
+++ b/contracts/erc721/compiler.json
@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
+ "optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,12 +17,12 @@
}
},
"contracts": [
- "DummyERC721Receiver",
- "InvalidERC721Receiver",
- "DummyERC721Token",
- "ERC721Token",
- "IERC721Receiver",
- "IERC721Token",
- "MintableERC721Token"
+ "src/ERC721Token.sol",
+ "src/MintableERC721Token.sol",
+ "src/interfaces/IERC721Receiver.sol",
+ "src/interfaces/IERC721Token.sol",
+ "test/DummyERC721Receiver.sol",
+ "test/DummyERC721Token.sol",
+ "test/InvalidERC721Receiver.sol"
]
}
diff --git a/contracts/erc721/package.json b/contracts/erc721/package.json
index 4d2c79c46..a8cf7016f 100644
--- a/contracts/erc721/package.json
+++ b/contracts/erc721/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/@(DummyERC721Receiver|InvalidERC721Receiver|DummyERC721Token|ERC721Token|IERC721Receiver|IERC721Token|MintableERC721Token).json"
+ "abis": "./generated-artifacts/@(DummyERC721Receiver|DummyERC721Token|ERC721Token|IERC721Receiver|IERC721Token|InvalidERC721Receiver|MintableERC721Token).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",
@@ -71,7 +74,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/erc721/src/artifacts.ts b/contracts/erc721/src/artifacts.ts
new file mode 100644
index 000000000..79a76e21b
--- /dev/null
+++ b/contracts/erc721/src/artifacts.ts
@@ -0,0 +1,23 @@
+/*
+ * -----------------------------------------------------------------------------
+ * Warning: This file is auto-generated by contracts-gen. Don't edit manually.
+ * -----------------------------------------------------------------------------
+ */
+import { ContractArtifact } from 'ethereum-types';
+
+import * as DummyERC721Receiver from '../generated-artifacts/DummyERC721Receiver.json';
+import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
+import * as ERC721Token from '../generated-artifacts/ERC721Token.json';
+import * as IERC721Receiver from '../generated-artifacts/IERC721Receiver.json';
+import * as IERC721Token from '../generated-artifacts/IERC721Token.json';
+import * as InvalidERC721Receiver from '../generated-artifacts/InvalidERC721Receiver.json';
+import * as MintableERC721Token from '../generated-artifacts/MintableERC721Token.json';
+export const artifacts = {
+ ERC721Token: ERC721Token as ContractArtifact,
+ MintableERC721Token: MintableERC721Token as ContractArtifact,
+ IERC721Receiver: IERC721Receiver as ContractArtifact,
+ IERC721Token: IERC721Token as ContractArtifact,
+ DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
+ DummyERC721Token: DummyERC721Token as ContractArtifact,
+ InvalidERC721Receiver: InvalidERC721Receiver as ContractArtifact,
+};
diff --git a/contracts/erc721/src/artifacts/index.ts b/contracts/erc721/src/artifacts/index.ts
deleted file mode 100644
index 8d5ec8a46..000000000
--- a/contracts/erc721/src/artifacts/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as DummyERC721Receiver from '../../generated-artifacts/DummyERC721Receiver.json';
-import * as DummyERC721Token from '../../generated-artifacts/DummyERC721Token.json';
-import * as ERC721Token from '../../generated-artifacts/ERC721Token.json';
-import * as IERC721Receiver from '../../generated-artifacts/IERC721Receiver.json';
-import * as IERC721Token from '../../generated-artifacts/IERC721Token.json';
-import * as InvalidERC721Receiver from '../../generated-artifacts/InvalidERC721Receiver.json';
-import * as MintableERC721Token from '../../generated-artifacts/MintableERC721Token.json';
-
-// tslint:disable:no-unnecessary-type-assertion
-export const artifacts = {
- DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
- InvalidERC721Receiver: InvalidERC721Receiver as ContractArtifact,
- DummyERC721Token: DummyERC721Token as ContractArtifact,
- ERC721Token: ERC721Token as ContractArtifact,
- IERC721Receiver: IERC721Receiver as ContractArtifact,
- IERC721Token: IERC721Token as ContractArtifact,
- MintableERC721Token: MintableERC721Token as ContractArtifact,
-};
diff --git a/contracts/erc721/src/wrappers.ts b/contracts/erc721/src/wrappers.ts
new file mode 100644
index 000000000..716f6cca4
--- /dev/null
+++ b/contracts/erc721/src/wrappers.ts
@@ -0,0 +1,12 @@
+/*
+ * -----------------------------------------------------------------------------
+ * Warning: This file is auto-generated by contracts-gen. Don't edit manually.
+ * -----------------------------------------------------------------------------
+ */
+export * from '../generated-wrappers/dummy_erc721_receiver';
+export * from '../generated-wrappers/dummy_erc721_token';
+export * from '../generated-wrappers/erc721_token';
+export * from '../generated-wrappers/i_erc721_receiver';
+export * from '../generated-wrappers/i_erc721_token';
+export * from '../generated-wrappers/invalid_erc721_receiver';
+export * from '../generated-wrappers/mintable_erc721_token';
diff --git a/contracts/erc721/src/wrappers/index.ts b/contracts/erc721/src/wrappers/index.ts
deleted file mode 100644
index ba6c51885..000000000
--- a/contracts/erc721/src/wrappers/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export * from '../../generated-wrappers/mintable_erc721_token';
-export * from '../../generated-wrappers/invalid_erc721_receiver';
-export * from '../../generated-wrappers/i_erc721_token';
-export * from '../../generated-wrappers/i_erc721_receiver';
-export * from '../../generated-wrappers/erc721_token';
-export * from '../../generated-wrappers/dummy_erc721_token';
-export * from '../../generated-wrappers/dummy_erc721_receiver';
diff --git a/contracts/erc721/tsconfig.json b/contracts/erc721/tsconfig.json
index 098c3a7f3..3b218affe 100644
--- a/contracts/erc721/tsconfig.json
+++ b/contracts/erc721/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/DummyERC721Receiver.json",
- "./generated-artifacts/InvalidERC721Receiver.json",
- "./generated-artifacts/DummyERC721Token.json",
- "./generated-artifacts/ERC721Token.json",
- "./generated-artifacts/IERC721Receiver.json",
- "./generated-artifacts/IERC721Token.json",
- "./generated-artifacts/MintableERC721Token.json"
+ "generated-artifacts/DummyERC721Receiver.json",
+ "generated-artifacts/DummyERC721Token.json",
+ "generated-artifacts/ERC721Token.json",
+ "generated-artifacts/IERC721Receiver.json",
+ "generated-artifacts/IERC721Token.json",
+ "generated-artifacts/InvalidERC721Receiver.json",
+ "generated-artifacts/MintableERC721Token.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}