aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations
diff options
context:
space:
mode:
authorFabio B <kandinsky454@protonmail.ch>2018-11-22 01:06:32 +0800
committerGitHub <noreply@github.com>2018-11-22 01:06:32 +0800
commit327311788809267a250e99f4af2a7544024bc842 (patch)
tree66a52a9dafda539feba630af3c388189754133b9 /packages/migrations
parent8ea2eb9102058a03d96e488507c71db0cc082356 (diff)
parent61b3305af3a7a599f83370aa8ebe8157738506fb (diff)
downloaddexon-sol-tools-327311788809267a250e99f4af2a7544024bc842.tar.gz
dexon-sol-tools-327311788809267a250e99f4af2a7544024bc842.tar.zst
dexon-sol-tools-327311788809267a250e99f4af2a7544024bc842.zip
Merge pull request #1301 from 0xProject/feature/migrationsDocRef
Add Migrations Doc Ref
Diffstat (limited to 'packages/migrations')
-rw-r--r--packages/migrations/CHANGELOG.json10
-rw-r--r--packages/migrations/package.json9
-rw-r--r--packages/migrations/src/index.ts10
-rw-r--r--packages/migrations/src/migration.ts11
-rw-r--r--packages/migrations/typedoc-tsconfig.json7
5 files changed, 40 insertions, 7 deletions
diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json
index 5b0d58909..0056a3166 100644
--- a/packages/migrations/CHANGELOG.json
+++ b/packages/migrations/CHANGELOG.json
@@ -1,5 +1,15 @@
[
{
+ "version": "2.1.0",
+ "changes": [
+ {
+ "note":
+ "Export all type declarations used by the public interface, as well as the `ContractAddresses` mapping",
+ "pr": 1301
+ }
+ ]
+ },
+ {
"timestamp": 1542208198,
"version": "2.0.4",
"changes": [
diff --git a/packages/migrations/package.json b/packages/migrations/package.json
index 8eaae96ba..04503c0b2 100644
--- a/packages/migrations/package.json
+++ b/packages/migrations/package.json
@@ -13,7 +13,13 @@
"clean": "shx rm -rf lib",
"lint": "tslint --format stylish --project .",
"migrate:v2": "run-s build script:migrate:v2",
- "script:migrate:v2": "node ./lib/migrate.js --contracts-version 2.0.0"
+ "script:migrate:v2": "node ./lib/migrate.js",
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
+ },
+ "config": {
+ "postpublish": {
+ "assets": []
+ }
},
"license": "Apache-2.0",
"devDependencies": {
@@ -25,6 +31,7 @@
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.11.0",
+ "typedoc": "0.13.0",
"typescript": "3.0.1",
"yargs": "^10.0.3"
},
diff --git a/packages/migrations/src/index.ts b/packages/migrations/src/index.ts
index 8f629a24b..4f22c30b9 100644
--- a/packages/migrations/src/index.ts
+++ b/packages/migrations/src/index.ts
@@ -1 +1,11 @@
+export {
+ Provider,
+ TxData,
+ JSONRPCRequestPayload,
+ JSONRPCErrorCallback,
+ TxDataPayable,
+ JSONRPCResponsePayload,
+ JSONRPCResponseError,
+} from 'ethereum-types';
+export { ContractAddresses } from '@0x/contract-addresses';
export { runMigrationsAsync, runMigrationsOnceAsync } from './migration';
diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts
index 86c76a54b..61ac56938 100644
--- a/packages/migrations/src/migration.ts
+++ b/packages/migrations/src/migration.ts
@@ -11,10 +11,9 @@ import { erc20TokenInfo, erc721TokenInfo } from './utils/token_info';
/**
* Creates and deploys all the contracts that are required for the latest
- * version of the 0x protocol. Custom migrations can be defined here. This will
- * be called with the CLI 'migrate:v2' command.
- * @param provider Web3 provider instance.
- * @param txDefaults Default transaction values to use when deploying contracts.
+ * version of the 0x protocol.
+ * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to.
+ * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
* @returns The addresses of the contracts that were deployed.
*/
export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<ContractAddresses> {
@@ -159,8 +158,8 @@ let _cachedContractAddresses: ContractAddresses;
* Exactly like runMigrationsAsync but will only run the migrations the first
* time it is called. Any subsequent calls will return the cached contract
* addresses.
- * @param provider Web3 provider instance.
- * @param txDefaults Default transaction values to use when deploying contracts.
+ * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to.
+ * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
* @returns The addresses of the contracts that were deployed.
*/
export async function runMigrationsOnceAsync(
diff --git a/packages/migrations/typedoc-tsconfig.json b/packages/migrations/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/migrations/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}