diff options
author | Fabio Berger <me@fabioberger.com> | 2018-09-28 19:08:12 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-09-28 19:08:12 +0800 |
commit | ba7de7204d29d4004c347190be7a3b8c84951b82 (patch) | |
tree | 9dddbd1ded45484a6cb968cdf799bf5ce991477b /packages/sra-spec | |
parent | f3ad64aa1c2930affbfd074316b5f407580b7523 (diff) | |
parent | a737cfa004ee1dc18be935f61fb9c289ed5623fd (diff) | |
download | dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.gz dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.bz2 dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.lz dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.xz dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.tar.zst dexon-sol-tools-ba7de7204d29d4004c347190be7a3b8c84951b82.zip |
merge development
Diffstat (limited to 'packages/sra-spec')
-rw-r--r-- | packages/sra-spec/CHANGELOG.json | 36 | ||||
-rw-r--r-- | packages/sra-spec/CHANGELOG.md | 16 | ||||
-rw-r--r-- | packages/sra-spec/package.json | 22 | ||||
-rw-r--r-- | packages/sra-spec/src/api.ts | 2 | ||||
-rw-r--r-- | packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts | 7 | ||||
-rw-r--r-- | packages/sra-spec/src/examples/relayerApiOrder.ts | 7 | ||||
-rw-r--r-- | packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts | 7 | ||||
-rw-r--r-- | packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts | 14 | ||||
-rw-r--r-- | packages/sra-spec/src/examples/relayerApiOrdersResponse.ts | 7 | ||||
-rw-r--r-- | packages/sra-spec/src/examples/signedOrder.ts | 5 | ||||
-rw-r--r-- | packages/sra-spec/src/md/introduction.md | 6 | ||||
-rw-r--r-- | packages/sra-spec/tsconfig.json | 5 |
12 files changed, 97 insertions, 37 deletions
diff --git a/packages/sra-spec/CHANGELOG.json b/packages/sra-spec/CHANGELOG.json index e9bac0c4d..b50b98127 100644 --- a/packages/sra-spec/CHANGELOG.json +++ b/packages/sra-spec/CHANGELOG.json @@ -1,5 +1,41 @@ [ { + "timestamp": 1537907159, + "version": "1.0.4", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { + "timestamp": 1537875740, + "version": "1.0.3", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { + "timestamp": 1537541580, + "version": "1.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { + "timestamp": 1536142250, + "version": "1.0.1", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "version": "1.0.1-rc.6", "changes": [ { diff --git a/packages/sra-spec/CHANGELOG.md b/packages/sra-spec/CHANGELOG.md index 60c1cb78f..501a4cf89 100644 --- a/packages/sra-spec/CHANGELOG.md +++ b/packages/sra-spec/CHANGELOG.md @@ -5,6 +5,22 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.4 - _September 25, 2018_ + + * Dependencies updated + +## v1.0.3 - _September 25, 2018_ + + * Dependencies updated + +## v1.0.2 - _September 21, 2018_ + + * Dependencies updated + +## v1.0.1 - _September 5, 2018_ + + * Dependencies updated + ## v1.0.1-rc.6 - _August 27, 2018_ * Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js diff --git a/packages/sra-spec/package.json b/packages/sra-spec/package.json index b560fa77b..d4e89db53 100644 --- a/packages/sra-spec/package.json +++ b/packages/sra-spec/package.json @@ -1,15 +1,15 @@ { "name": "@0xproject/sra-spec", - "version": "1.0.1-rc.6", + "version": "1.0.4", "engines": { "node": ">=6.12" }, "description": "Standard Relayer API Open API Spec", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", "scripts": { "serve": "redoc-cli serve lib/api.json --watch", - "watch_without_deps": "run-p build-json:watch serve", + "watch_without_deps": "run-p build:watch serve", "lint": "tslint --project .", "test": "swagger-cli validate lib/api.json", "rebuild_and_test": "run-s clean build test", @@ -17,10 +17,10 @@ "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", "clean": "shx rm -rf lib", - "build": "tsc && yarn copy_md_files && yarn build-json", - "build-json": "ts-node build_scripts/buildJson.ts", - "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' ", - "copy_md_files": "copyfiles -u 2 './src/md/**/*.md' ./lib/md", + "build": "tsc -b && yarn copy_md_files && yarn build-json", + "build-json": "node ./lib/build_scripts/buildJson", + "build:watch": "chokidar 'src/**/*' -c 'yarn build' ", + "copy_md_files": "copyfiles -u 2 './src/md/**/*.md' ./lib/src/md", "deploy-site": "discharge deploy" }, "repository": { @@ -34,10 +34,10 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md", "dependencies": { - "@0xproject/json-schemas": "^1.0.1-rc.6" + "@0xproject/json-schemas": "^1.0.4" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.6", + "@0xproject/tslint-config": "^1.0.7", "@loopback/openapi-v3-types": "^0.8.2", "@types/mocha": "^2.2.42", "@types/node": "^10.5.3", @@ -54,7 +54,7 @@ "swagger-cli": "^2.1.1", "ts-node": "^7.0.0", "tslint": "5.11.0", - "typescript": "2.7.1" + "typescript": "3.0.1" }, "publishConfig": { "access": "public" diff --git a/packages/sra-spec/src/api.ts b/packages/sra-spec/src/api.ts index f80d343d8..7cecb0369 100644 --- a/packages/sra-spec/src/api.ts +++ b/packages/sra-spec/src/api.ts @@ -249,7 +249,7 @@ export const api: OpenApiSpec = { }, }, '/v2/order_config': { - get: { + post: { description: `Relayers have full discretion over the orders that they are willing to host on their orderbooks (e.g what fees they charge, etc...). In order for traders to discover their requirements programmatically, they can send an incomplete order to this endpoint and receive the missing fields, specifc to that order. This gives relayers a large amount of flexibility to tailor fees to unique traders, trading pairs and volume amounts. Submit a partial order and receive information required to complete the order: \`senderAddress\`, \`feeRecipientAddress\`, \`makerFee\`, \`takerFee\`. `, operationId: 'getOrderConfig', parameters: generateParameters([], false), diff --git a/packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts b/packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts index 9eead5239..3ab7b29c0 100644 --- a/packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts +++ b/packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts @@ -8,13 +8,14 @@ export const relayerApiAssetDataPairsResponse = { minAmount: '0', maxAmount: '10000000000000000000', precision: 5, - assetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', + assetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', }, assetDataB: { minAmount: '0', - maxAmount: '50000000000000000000', + maxAmount: '1', precision: 5, - assetData: '0x0257179264389b814a946f3e92105513705ca6b990', + assetData: + '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063', }, }, ], diff --git a/packages/sra-spec/src/examples/relayerApiOrder.ts b/packages/sra-spec/src/examples/relayerApiOrder.ts index 31181d677..e3ae66dc3 100644 --- a/packages/sra-spec/src/examples/relayerApiOrder.ts +++ b/packages/sra-spec/src/examples/relayerApiOrder.ts @@ -5,13 +5,14 @@ export const relayerApiOrder = { feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da', senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', makerAssetAmount: '10000000000000000', - takerAssetAmount: '20000000000000000', + takerAssetAmount: '1', makerFee: '100000000000000', takerFee: '200000000000000', expirationTimeSeconds: '1532560590', salt: '1532559225', - makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', + makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', + takerAssetData: + '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063', exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', }, diff --git a/packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts b/packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts index 5251d5b4d..cca68b84d 100644 --- a/packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts +++ b/packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts @@ -2,9 +2,10 @@ export const relayerApiOrderConfigPayload = { makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b', takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', makerAssetAmount: '10000000000000000', - takerAssetAmount: '20000000000000000', - makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', + takerAssetAmount: '1', + makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', + takerAssetData: + '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063', exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', expirationTimeSeconds: '1532560590', }; diff --git a/packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts b/packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts index 40c09eff9..7f0772649 100644 --- a/packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts +++ b/packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts @@ -11,13 +11,14 @@ export const relayerApiOrderbookResponse = { feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da', senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', makerAssetAmount: '10000000000000000', - takerAssetAmount: '20000000000000000', + takerAssetAmount: '1', makerFee: '100000000000000', takerFee: '200000000000000', expirationTimeSeconds: '1532560590', salt: '1532559225', - makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', + makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', + takerAssetData: + '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063', exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', }, @@ -37,13 +38,14 @@ export const relayerApiOrderbookResponse = { feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da', senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', makerAssetAmount: '20000000000000000', - takerAssetAmount: '10000000000000000', + takerAssetAmount: '1', makerFee: '200000000000000', takerFee: '100000000000000', expirationTimeSeconds: '1532560590', salt: '1532559225', - makerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', - takerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', + makerAssetData: + '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063', + takerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', signature: '0x013842a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b3518891', }, diff --git a/packages/sra-spec/src/examples/relayerApiOrdersResponse.ts b/packages/sra-spec/src/examples/relayerApiOrdersResponse.ts index ac16e7e34..eb66b8e81 100644 --- a/packages/sra-spec/src/examples/relayerApiOrdersResponse.ts +++ b/packages/sra-spec/src/examples/relayerApiOrdersResponse.ts @@ -10,13 +10,14 @@ export const relayerApiOrdersResponse = { feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da', senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', makerAssetAmount: '10000000000000000', - takerAssetAmount: '20000000000000000', + takerAssetAmount: '1', makerFee: '100000000000000', takerFee: '200000000000000', expirationTimeSeconds: '1532560590', salt: '1532559225', - makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', + makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', + takerAssetData: + '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063', exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', }, diff --git a/packages/sra-spec/src/examples/signedOrder.ts b/packages/sra-spec/src/examples/signedOrder.ts index 440566027..8513c398f 100644 --- a/packages/sra-spec/src/examples/signedOrder.ts +++ b/packages/sra-spec/src/examples/signedOrder.ts @@ -9,8 +9,9 @@ export const signedOrder = { takerFee: '200000000000000', expirationTimeSeconds: '1532560590', salt: '1532559225', - makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', - takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', + makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498', + takerAssetData: + '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063', exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', }; diff --git a/packages/sra-spec/src/md/introduction.md b/packages/sra-spec/src/md/introduction.md index 6f733c9ab..f27186f41 100644 --- a/packages/sra-spec/src/md/introduction.md +++ b/packages/sra-spec/src/md/introduction.md @@ -180,7 +180,7 @@ The identifier for the Proxy uses a similar scheme to [ABI function selectors](h ```js // ERC20 Proxy ID 0xf47261b0 bytes4(keccak256('ERC20Token(address)')); -// ERC721 Proxy ID 0x08e937fa +// ERC721 Proxy ID 0x02571792 bytes4(keccak256('ERC721Token(address,uint256)')); ``` @@ -192,10 +192,10 @@ For example, encoding the ERC20 token contract (address: 0x1dc4c1cefef38a777b15a 0xf47261b00000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48 ``` -Encoding the ERC721 token contract (address: `0x371b13d97f4bf77d724e78c16b7dc74099f40e84`), token id (id: `99`, which hex encoded is `0x63`) and the ERC721 Transfer Proxy (id: 0x08e937fa) would be: +Encoding the ERC721 token contract (address: `0x371b13d97f4bf77d724e78c16b7dc74099f40e84`), token id (id: `99`, which hex encoded is `0x63`) and the ERC721 Transfer Proxy (id: 0x02571792) would be: ```bash -0x08e937fa000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063 +0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063 ``` For more information see [the Asset Proxy](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#erc20proxy) section of the v2 spec and the [Ethereum ABI Spec](https://solidity.readthedocs.io/en/develop/abi-spec.html). diff --git a/packages/sra-spec/tsconfig.json b/packages/sra-spec/tsconfig.json index e60028885..785ed914d 100644 --- a/packages/sra-spec/tsconfig.json +++ b/packages/sra-spec/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../../tsconfig", "compilerOptions": { - "outDir": "lib" + "outDir": "lib", + "rootDir": "." }, - "include": ["./src/**/*", "./test/*"] + "include": ["./src/**/*", "./test/*", "./build_scripts/*", "./md/*"] } |