diff options
author | Hsuan Lee <boczeratul@gmail.com> | 2019-03-06 17:46:50 +0800 |
---|---|---|
committer | Hsuan Lee <boczeratul@gmail.com> | 2019-03-06 17:46:50 +0800 |
commit | 35703539d0f2b4ddb3b11d0de8c9634af59ab71f (patch) | |
tree | ae3731221dbbb3a6fa40060a8d916cfd3f738289 /packages/website/md | |
parent | 92a1fde5b1ecd81b07cdb5bf0c9c1cd3544799db (diff) | |
download | dexon-0x-contracts-stable.tar.gz dexon-0x-contracts-stable.tar.zst dexon-0x-contracts-stable.zip |
Deploy @dexon-foundation/0x.jsstable
Diffstat (limited to 'packages/website/md')
65 files changed, 0 insertions, 1060 deletions
diff --git a/packages/website/md/docs/0xjs/0.0.1/async.md b/packages/website/md/docs/0xjs/0.0.1/async.md deleted file mode 100644 index 8abaef331..000000000 --- a/packages/website/md/docs/0xjs/0.0.1/async.md +++ /dev/null @@ -1,26 +0,0 @@ -0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods. - -_Async/await syntax (recommended):_ - -```javascript -try { - var availableAddresses = await zeroEx.getAvailableAddressesAsync(); -} catch (error) { - console.log('Caught error: ', error); -} -``` - -_Promise syntax:_ - -```javascript -zeroEx - .getAvailableAddressesAsync() - .then(function(availableAddresses) { - console.log(availableAddresses); - }) - .catch(function(error) { - console.log('Caught error: ', error); - }); -``` - -As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately. diff --git a/packages/website/md/docs/0xjs/0.0.1/errors.md b/packages/website/md/docs/0xjs/0.0.1/errors.md deleted file mode 100644 index e97973ccf..000000000 --- a/packages/website/md/docs/0xjs/0.0.1/errors.md +++ /dev/null @@ -1 +0,0 @@ -All error messages thrown by the 0x.js library are part of a documented string enum. Each error message is in all-caps, snake-case format. This makes the error messages easily identifiable, unique and grep-able. The error enums listing all possible errors the library could throw can be found in the `Types` section. diff --git a/packages/website/md/docs/0xjs/0.0.1/installation.md b/packages/website/md/docs/0xjs/0.0.1/installation.md deleted file mode 100644 index 3860df1cc..000000000 --- a/packages/website/md/docs/0xjs/0.0.1/installation.md +++ /dev/null @@ -1,31 +0,0 @@ -0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. - -#### CommonJS _(recommended)_: - -**Install** - -```bash -npm install 0x.js --save -``` - -**Import** - -```javascript -import { ZeroEx } from '0x.js'; -``` - -#### UMD: - -**Install** - -Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project. - -**Import** - -```html -<script type="text/javascript" src="0x.js"></script> -``` - -### Wiki - -Check out our [wiki](https://0x.org/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more! diff --git a/packages/website/md/docs/0xjs/0.0.1/introduction.md b/packages/website/md/docs/0xjs/0.0.1/introduction.md deleted file mode 100644 index 008376d33..000000000 --- a/packages/website/md/docs/0xjs/0.0.1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any ERC20 token. Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20 token balance/allowance and much more. diff --git a/packages/website/md/docs/0xjs/0.0.1/versioning.md b/packages/website/md/docs/0xjs/0.0.1/versioning.md deleted file mode 100644 index 6bcaa5b4d..000000000 --- a/packages/website/md/docs/0xjs/0.0.1/versioning.md +++ /dev/null @@ -1 +0,0 @@ -This project adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. Since the library is still an alpha, it's public interface is not yet stable and we will introduce backward incompatible changes to the interface without incrementing the major version until the `1.0.0` release. Our convention until then will be to increment the minor version whenever we introduce backward incompatible changes to the public interface, and to increment the patch version otherwise. This way, it is safe for you to include 0x.js in your projects with the tilda (e.g `~0.22.0`) without fear that a patch update would break your app. diff --git a/packages/website/md/docs/0xjs/1.0.1/async.md b/packages/website/md/docs/0xjs/1.0.1/async.md deleted file mode 100644 index bd5ae9d8a..000000000 --- a/packages/website/md/docs/0xjs/1.0.1/async.md +++ /dev/null @@ -1,31 +0,0 @@ -0x packages are promise-based libraries. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods. - -_Async/await syntax (recommended):_ - -```javascript -try { - const signature = await signatureUtils.ecSignOrderHashAsync( - providerEngine, - orderHashHex, - maker, - SignerType.Default, - ); -} catch (error) { - console.log('Caught error: ', error); -} -``` - -_Promise syntax:_ - -```javascript -signatureUtils - .ecSignOrderHashAsync(providerEngine, orderHashHex, maker, SignerType.Default) - .then(function(signature) { - console.log(signature); - }) - .catch(function(error) { - console.log('Caught error: ', error); - }); -``` - -As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately. diff --git a/packages/website/md/docs/0xjs/1.0.1/installation.md b/packages/website/md/docs/0xjs/1.0.1/installation.md deleted file mode 100644 index d5c13e710..000000000 --- a/packages/website/md/docs/0xjs/1.0.1/installation.md +++ /dev/null @@ -1,40 +0,0 @@ -0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. - -#### CommonJS _(recommended)_: - -**Install** - -```bash -npm install 0x.js --save -``` - -**Import** - -```javascript -import { - assetDataUtils, - BigNumber, - ContractWrappers, - generatePseudoRandomSalt, - Order, - orderHashUtils, - signatureUtils, - SignerType, -} from '0x.js'; -``` - -#### UMD: - -**Install** - -Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project. - -**Import** - -```html -<script type="text/javascript" src="0x.js"></script> -``` - -### Wiki - -Check out our [wiki](https://0x.org/wiki) for articles on how to get 0x.js setup with Ganache, Infura and more! diff --git a/packages/website/md/docs/0xjs/1.0.1/introduction.md b/packages/website/md/docs/0xjs/1.0.1/introduction.md deleted file mode 100644 index 4d5d314d3..000000000 --- a/packages/website/md/docs/0xjs/1.0.1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20/ERC721 token balance/allowance and much more. diff --git a/packages/website/md/docs/0xjs/1.0.1/versioning.md b/packages/website/md/docs/0xjs/1.0.1/versioning.md deleted file mode 100644 index 6bae835d3..000000000 --- a/packages/website/md/docs/0xjs/1.0.1/versioning.md +++ /dev/null @@ -1 +0,0 @@ -Since v1.0.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^1.0.0` to take advantage of non-breaking bug fixes. diff --git a/packages/website/md/docs/0xjs/2.0.0/async.md b/packages/website/md/docs/0xjs/2.0.0/async.md deleted file mode 100644 index c84eebf94..000000000 --- a/packages/website/md/docs/0xjs/2.0.0/async.md +++ /dev/null @@ -1,26 +0,0 @@ -0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods. - -_Async/await syntax (recommended):_ - -```javascript -try { - var availableAddresses = await web3Wrapper.getAvailableAddressesAsync(); -} catch (error) { - console.log('Caught error: ', error); -} -``` - -_Promise syntax:_ - -```javascript -web3Wrapper - .getAvailableAddressesAsync() - .then(function(availableAddresses) { - console.log(availableAddresses); - }) - .catch(function(error) { - console.log('Caught error: ', error); - }); -``` - -As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately. diff --git a/packages/website/md/docs/0xjs/2.0.0/installation.md b/packages/website/md/docs/0xjs/2.0.0/installation.md deleted file mode 100644 index 87d763572..000000000 --- a/packages/website/md/docs/0xjs/2.0.0/installation.md +++ /dev/null @@ -1,38 +0,0 @@ -0x.js ships as both a [UMD](https://github.com/umdjs/umd) module and a [CommonJS](https://en.wikipedia.org/wiki/CommonJS) package. - -#### CommonJS _(recommended)_: - -**Install** - -```bash -npm install 0x.js --save -``` - -**Import** - -```javascript -import { - assetDataUtils, - BigNumber, - ContractWrappers, - generatePseudoRandomSalt, - orderHashUtils, - signatureUtils, -} from '0x.js'; -``` - -#### UMD: - -**Install** - -Download the UMD module from our [releases page](https://github.com/0xProject/0x-monorepo/releases) and add it to your project. - -**Import** - -```html -<script type="text/javascript" src="0x.js"></script> -``` - -### Wiki - -Check out our [wiki](https://0x.org/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more! diff --git a/packages/website/md/docs/asset_buyer/installation.md b/packages/website/md/docs/asset_buyer/installation.md deleted file mode 100644 index 3c0c95068..000000000 --- a/packages/website/md/docs/asset_buyer/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -#### Install - -```bash -yarn add @0x/asset-buyer -``` - -#### Import - -```javascript -import { AssetBuyer } from '@0x/asset-buyer'; -``` - -or - -```javascript -var AssetBuyer = require('@0x/asset-buyer').AssetBuyer; -``` diff --git a/packages/website/md/docs/asset_buyer/introduction.md b/packages/website/md/docs/asset_buyer/introduction.md deleted file mode 100644 index bac81c760..000000000 --- a/packages/website/md/docs/asset_buyer/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [asset-buyer](https://github.com/0xProject/0x-monorepo/tree/development/packages/asset-buyer) documentation! AssetBuyer is a library that provides an easy way to buy any asset with ETH in one click, leveraging 0x liquidity and the [Forwarder contract](https://0x.org/docs/contracts#Forwarder). diff --git a/packages/website/md/docs/asset_buyer/usage.md b/packages/website/md/docs/asset_buyer/usage.md deleted file mode 100644 index 209c15062..000000000 --- a/packages/website/md/docs/asset_buyer/usage.md +++ /dev/null @@ -1,39 +0,0 @@ -#### Construction - -Connecting to a standard relayer API compliant url: - -```typescript -const provider = web3.currentProvider; -const apiUrl = 'https://api.relayer.com/v2'; -const assetBuyer = AssetBuyer.getAssetBuyerForStandardRelayerAPIUrl(provider, apiUrl); -``` - -Providing your own orders: - -```typescript -const provider = web3.currentProvider; -const orders = []; // get these from your own API, a relayer, a friend, from anywhere -const assetBuyer = AssetBuyer.getAssetBuyerForProvidedOrders(provider, orders); -``` - -#### Get a quote - -A [BuyQuote](#types-BuyQuote) object contains enough information to display buy information to an end user - -```typescript -const erc20TokenAddress = '0x5fa3c....'; -const amountToBuy = new BigNumber(50000000000000000000); -const buyQuote = await assetBuyer.getBuyQuoteForERC20TokenAddressAsync(erc20TokenAddress, amountToBuy); -const quoteInfo = buyQuote.worstCaseQuoteInfo; -console.log(quoteInfo.ethAmount); // the total amount the user needs to pay to buy the desired amount (including ZRX fees) -console.log(quoteInfo.feeAmount); // a portion of the total ethAmount above that was used to buy affiliate fees -console.log(quoteInfo.ethPerAssetPrice); // the rate that this quote provides (e.g. 0.0035ETH / REP) -``` - -#### Perform a buy - -Pass the [BuyQuote](#types-BuyQuote) object from above back to the assetBuyer in order to initiate the buy transaction - -```typescript -const txHash = await assetBuyer.executeBuyQuoteAsync(buyQuote); // the hash of the transaction submitted to the Ethereum network -``` diff --git a/packages/website/md/docs/connect/1/installation.md b/packages/website/md/docs/connect/1/installation.md deleted file mode 100644 index d457b0577..000000000 --- a/packages/website/md/docs/connect/1/installation.md +++ /dev/null @@ -1,15 +0,0 @@ -**Install** - -```bash -npm install @0xproject/connect --save -``` - -**Import** - -```javascript -import { HttpClient } from '@0xproject/connect'; -``` - -### Wiki - -Check out our [0x Connect introduction tutorial](https://0x.org/wiki#Intro-Tutorial) for information on how to integrate relayers into your application. diff --git a/packages/website/md/docs/connect/1/introduction.md b/packages/website/md/docs/connect/1/introduction.md deleted file mode 100644 index 4e3039442..000000000 --- a/packages/website/md/docs/connect/1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported token pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific token pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/connect/2/introduction.md b/packages/website/md/docs/connect/2/introduction.md deleted file mode 100644 index 8e251b327..000000000 --- a/packages/website/md/docs/connect/2/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported asset pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific asset pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/connect/3/installation.md b/packages/website/md/docs/connect/3/installation.md deleted file mode 100644 index 8ed6172bf..000000000 --- a/packages/website/md/docs/connect/3/installation.md +++ /dev/null @@ -1,15 +0,0 @@ -**Install** - -```bash -npm install @0x/connect --save -``` - -**Import** - -```javascript -import { HttpClient } from '@0x/connect'; -``` - -### Wiki - -Check out our [0x Connect introduction tutorial](https://0x.org/wiki#Intro-Tutorial) for information on how to integrate relayers into your application. diff --git a/packages/website/md/docs/contract_wrappers/1/installation.md b/packages/website/md/docs/contract_wrappers/1/installation.md deleted file mode 100644 index d5c7fbdba..000000000 --- a/packages/website/md/docs/contract_wrappers/1/installation.md +++ /dev/null @@ -1,11 +0,0 @@ -**Install** - -```bash -npm install @0xproject/contract-wrappers --save -``` - -**Import** - -```javascript -import { ContractWrappers } from '@0xproject/contract-wrappers'; -``` diff --git a/packages/website/md/docs/contract_wrappers/1/introduction.md b/packages/website/md/docs/contract_wrappers/1/introduction.md deleted file mode 100644 index ccc81b373..000000000 --- a/packages/website/md/docs/contract_wrappers/1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [Contract-wrappers](https://github.com/0xProject/0x-monorepo/tree/development/packages/contract-wrappers) documentation! Contract-wrappers is a library for interacting with the Ethereum smart contracts that make up the 0x protocol. With it, you can easily send transactions and make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). diff --git a/packages/website/md/docs/contract_wrappers/2/installation.md b/packages/website/md/docs/contract_wrappers/2/installation.md deleted file mode 100644 index 50610550a..000000000 --- a/packages/website/md/docs/contract_wrappers/2/installation.md +++ /dev/null @@ -1,11 +0,0 @@ -**Install** - -```bash -npm install @0x/contract-wrappers --save -``` - -**Import** - -```javascript -import { ContractWrappers } from '@0x/contract-wrappers'; -``` diff --git a/packages/website/md/docs/ethereum_types/installation.md b/packages/website/md/docs/ethereum_types/installation.md deleted file mode 100644 index 5371cfa47..000000000 --- a/packages/website/md/docs/ethereum_types/installation.md +++ /dev/null @@ -1,11 +0,0 @@ -**Install** - -```bash -yarn add ethereum-types -``` - -**Import** - -```typescript -import { Provider } from 'ethereum-types'; -``` diff --git a/packages/website/md/docs/ethereum_types/introduction.md b/packages/website/md/docs/ethereum_types/introduction.md deleted file mode 100644 index 43484cdd1..000000000 --- a/packages/website/md/docs/ethereum_types/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [ethereum-types](https://github.com/0xProject/0x-monorepo/packages/ethereum-types) documentation! This package provides ethereum specific (but not library-specific) types that are meant to be shared between other ethereum packages. diff --git a/packages/website/md/docs/json_schemas/1/installation.md b/packages/website/md/docs/json_schemas/1/installation.md deleted file mode 100644 index 50a37bae1..000000000 --- a/packages/website/md/docs/json_schemas/1/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/json-schemas -``` - -**Import** - -```javascript -import { schemas } from '@0xproject/json-schemas'; -``` - -or - -```javascript -var schemas = require('@0xproject/json-schemas').schemas; -``` diff --git a/packages/website/md/docs/json_schemas/1/introduction.md b/packages/website/md/docs/json_schemas/1/introduction.md deleted file mode 100644 index 5b2e90387..000000000 --- a/packages/website/md/docs/json_schemas/1/introduction.md +++ /dev/null @@ -1,3 +0,0 @@ -Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. - -If you are not using a Javascript-based language for your project, you can use a Javascript environment to render the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). All the schema files are currently TypeScript that require evaluation in order to be recognized as valid JSON. diff --git a/packages/website/md/docs/json_schemas/1/schemas.md b/packages/website/md/docs/json_schemas/1/schemas.md deleted file mode 100644 index 11f9df329..000000000 --- a/packages/website/md/docs/json_schemas/1/schemas.md +++ /dev/null @@ -1,28 +0,0 @@ -0x Protocol Schemas - -- [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number) -- [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts) -- [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts) -- [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts) - -0x.js Schemas - -- [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts) -- [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts) -- [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts) -- [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts) -- [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts) -- [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts) -- [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts) -- [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts) - -Standard Relayer API Schemas - -- [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts) -- [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts) -- [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts) -- [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts) -- [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts) -- [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts) -- [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts) -- [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts) diff --git a/packages/website/md/docs/json_schemas/1/usage.md b/packages/website/md/docs/json_schemas/1/usage.md deleted file mode 100644 index 68b801153..000000000 --- a/packages/website/md/docs/json_schemas/1/usage.md +++ /dev/null @@ -1,14 +0,0 @@ -The following example shows you how to validate a 0x order using the `@0xproject/json-schemas` package. - -```javascript -import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas'; - -const {orderSchema} = schemas; -const validator = new SchemaValidator(); - -const order = { - ... -}; -const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors -const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean -``` diff --git a/packages/website/md/docs/json_schemas/2/schemas.md b/packages/website/md/docs/json_schemas/2/schemas.md deleted file mode 100644 index 78e6df372..000000000 --- a/packages/website/md/docs/json_schemas/2/schemas.md +++ /dev/null @@ -1,40 +0,0 @@ -Basic Schemas - -- [Address type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/address_schema.json) -- [Number type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/number_schema.json) -- [Hex type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/hex_schema.json) -- [JS number](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/js_number.json) - -0x Protocol Schemas - -- [Order](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_schema.json) -- [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/signed_order_schema.json) -- [OrderHash](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_hash_schema.json) -- [ECSignature](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/ec_signature_schema.json) - -0x.js Schemas - -- [BlockParam](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/block_param_schema.json) -- [BlockRange](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/block_range_schema.json) -- [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/index_filter_values_schema.json) -- [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_fill_requests_schema.json) -- [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_cancel_schema.json) -- [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json) -- [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/signed_orders_schema.json) -- [Token](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/token_schema.json) -- [TxData](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/tx_data_schema.json) - -Standard Relayer API Schemas - -- [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/paginated_collection_schema.json) -- [Error response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_error_response_schema.json) -- [Order config payload](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json) -- [Order config response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json) -- [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json) -- [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json) -- [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json) -- [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json) -- [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json) -- [Trade info](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json) -- [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json) -- [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json) diff --git a/packages/website/md/docs/json_schemas/3/installation.md b/packages/website/md/docs/json_schemas/3/installation.md deleted file mode 100644 index a99886113..000000000 --- a/packages/website/md/docs/json_schemas/3/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0x/json-schemas -``` - -**Import** - -```javascript -import { schemas } from '@0x/json-schemas'; -``` - -or - -```javascript -var schemas = require('@0x/json-schemas').schemas; -``` diff --git a/packages/website/md/docs/json_schemas/3/introduction.md b/packages/website/md/docs/json_schemas/3/introduction.md deleted file mode 100644 index 0039d014a..000000000 --- a/packages/website/md/docs/json_schemas/3/introduction.md +++ /dev/null @@ -1,3 +0,0 @@ -Welcome to the [json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. - -If you are not using a Javascript-based language for your project, you can use a Javascript environment to render the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). diff --git a/packages/website/md/docs/json_schemas/3/schemas.md b/packages/website/md/docs/json_schemas/3/schemas.md deleted file mode 100644 index 90fcfdffe..000000000 --- a/packages/website/md/docs/json_schemas/3/schemas.md +++ /dev/null @@ -1,41 +0,0 @@ -Basic Schemas - -- [Address type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/address_schema.json) -- [Number type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/number_schema.json) -- [Whole number type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/whole_number_schema.json) -- [Hex type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/hex_schema.json) -- [JS number](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/js_number.json) - -0x Protocol Schemas - -- [Order](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_schema.json) -- [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/signed_order_schema.json) -- [OrderHash](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_hash_schema.json) -- [ECSignature](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/ec_signature_schema.json) - -0x.js Schemas - -- [BlockParam](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/block_param_schema.json) -- [BlockRange](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/block_range_schema.json) -- [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/index_filter_values_schema.json) -- [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_fill_requests_schema.json) -- [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_cancel_schema.json) -- [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json) -- [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/signed_orders_schema.json) -- [Token](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/token_schema.json) -- [TxData](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/tx_data_schema.json) - -Standard Relayer API Schemas - -- [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/paginated_collection_schema.json) -- [Error response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_error_response_schema.json) -- [Order config payload](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json) -- [Order config response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json) -- [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json) -- [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json) -- [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json) -- [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json) -- [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json) -- [Trade info](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json) -- [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json) -- [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json) diff --git a/packages/website/md/docs/json_schemas/3/usage.md b/packages/website/md/docs/json_schemas/3/usage.md deleted file mode 100644 index 2b72eeaad..000000000 --- a/packages/website/md/docs/json_schemas/3/usage.md +++ /dev/null @@ -1,14 +0,0 @@ -The following example shows you how to validate a 0x order using the `@0x/json-schemas` package. - -```javascript -import {SchemaValidator, ValidatorResult, schemas} from '@0x/json-schemas'; - -const {orderSchema} = schemas; -const validator = new SchemaValidator(); - -const order = { - ... -}; -const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors -const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean -``` diff --git a/packages/website/md/docs/migrations/1/installation.md b/packages/website/md/docs/migrations/1/installation.md deleted file mode 100644 index 78403037b..000000000 --- a/packages/website/md/docs/migrations/1/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0x/migrations -``` - -**Import** - -```javascript -import { runMigrationsAsync } from '@0x/migrations'; -``` - -or - -```javascript -var runMigrationsAsync = require('@0x/migrations').runMigrationsAsync; -``` diff --git a/packages/website/md/docs/migrations/1/introduction.md b/packages/website/md/docs/migrations/1/introduction.md deleted file mode 100644 index 70b13c5f8..000000000 --- a/packages/website/md/docs/migrations/1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [@0x/migrations](https://github.com/0xProject/0x-monorepo/tree/development/packages/migrations) documentation! This package is intended for developers who would like to deploy the 0x protocol system of smart contracts to a custom testnet. If you want to test against existing testnets, check out our pre-deployed [Ganache snapshot](https://0x.org/wiki#Ganache-Setup-Guide) or where 0x is already deployed on [popular testnets](https://0x.org/wiki#Deployed-Addresses). diff --git a/packages/website/md/docs/order_utils/1/installation.md b/packages/website/md/docs/order_utils/1/installation.md deleted file mode 100644 index 68a7cf960..000000000 --- a/packages/website/md/docs/order_utils/1/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/order-utils -``` - -**Import** - -```javascript -import { createSignedOrderAsync } from '@0xproject/order-utils'; -``` - -or - -```javascript -var createSignedOrderAsync = require('@0xproject/order-utils').createSignedOrderAsync; -``` diff --git a/packages/website/md/docs/order_utils/1/introduction.md b/packages/website/md/docs/order_utils/1/introduction.md deleted file mode 100644 index d5f3f2925..000000000 --- a/packages/website/md/docs/order_utils/1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [@0xproject/order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders. diff --git a/packages/website/md/docs/order_utils/2/installation.md b/packages/website/md/docs/order_utils/2/installation.md deleted file mode 100644 index d4bac6a53..000000000 --- a/packages/website/md/docs/order_utils/2/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0x/order-utils -``` - -**Import** - -```javascript -import { createSignedOrderAsync } from '@0x/order-utils'; -``` - -or - -```javascript -var createSignedOrderAsync = require('@0x/order-utils').createSignedOrderAsync; -``` diff --git a/packages/website/md/docs/order_utils/2/introduction.md b/packages/website/md/docs/order_utils/2/introduction.md deleted file mode 100644 index 567896603..000000000 --- a/packages/website/md/docs/order_utils/2/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders. diff --git a/packages/website/md/docs/order_watcher/1/installation.md b/packages/website/md/docs/order_watcher/1/installation.md deleted file mode 100644 index 4b28f583d..000000000 --- a/packages/website/md/docs/order_watcher/1/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/order-watcher -``` - -**Import** - -```javascript -import { OrderWatcher } from '@0xproject/order-watcher'; -``` - -or - -```javascript -var OrderWatcher = require('@0xproject/order-utils').OrderWatcher; -``` diff --git a/packages/website/md/docs/order_watcher/1/introduction.md b/packages/website/md/docs/order_watcher/1/introduction.md deleted file mode 100644 index f922d922f..000000000 --- a/packages/website/md/docs/order_watcher/1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [@0xproject/order-watcher](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-watcher) documentation! OrderWatcher is a daemon that efficiently watches a set of orders, emitting events whenever the validity of an order changes. It can be used by relayers to prune an orderbook, or by traders to keep orders fetched from a Relayer up-to-date. diff --git a/packages/website/md/docs/order_watcher/2/installation.md b/packages/website/md/docs/order_watcher/2/installation.md deleted file mode 100644 index 883eb40e5..000000000 --- a/packages/website/md/docs/order_watcher/2/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0x/order-watcher -``` - -**Import** - -```javascript -import { OrderWatcher } from '@0x/order-watcher'; -``` - -or - -```javascript -var OrderWatcher = require('@0x/order-utils').OrderWatcher; -``` diff --git a/packages/website/md/docs/order_watcher/2/introduction.md b/packages/website/md/docs/order_watcher/2/introduction.md deleted file mode 100644 index b2d574053..000000000 --- a/packages/website/md/docs/order_watcher/2/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [order-watcher](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-watcher) documentation! OrderWatcher is a daemon that efficiently watches a set of orders, emitting events whenever the validity of an order changes. It can be used by relayers to prune an orderbook, or by traders to keep orders fetched from a Relayer up-to-date. diff --git a/packages/website/md/docs/smart_contracts/1/introduction.md b/packages/website/md/docs/smart_contracts/1/introduction.md deleted file mode 100644 index 81715a3d1..000000000 --- a/packages/website/md/docs/smart_contracts/1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x smart contracts](https://github.com/0xProject/0x-monorepo/tree/development/contracts/core) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. diff --git a/packages/website/md/docs/smart_contracts/2/introduction.md b/packages/website/md/docs/smart_contracts/2/introduction.md deleted file mode 100644 index b2c3d8f8d..000000000 --- a/packages/website/md/docs/smart_contracts/2/introduction.md +++ /dev/null @@ -1,6 +0,0 @@ -Welcome to the [0x smart contracts](https://github.com/0xProject/0x-monorepo/tree/development/contracts/core) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. - -### Helpful wiki articles: - -- [Deployed smart contract addresses](https://0x.org/wiki#Deployed-Addresses) -- [0x Protocol Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md) diff --git a/packages/website/md/docs/sol-compiler/1/installation.md b/packages/website/md/docs/sol-compiler/1/installation.md deleted file mode 100644 index 9c8561d9b..000000000 --- a/packages/website/md/docs/sol-compiler/1/installation.md +++ /dev/null @@ -1,23 +0,0 @@ -#### CLI Installation - -```bash -yarn global add @0xproject/sol-compiler -``` - -#### API Installation - -```bash -yarn add @0xproject/sol-compiler -``` - -**Import** - -```typescript -import { Compiler } from '@0xproject/sol-compiler'; -``` - -or - -```javascript -var Compiler = require('@0xproject/sol-compiler').Compiler; -``` diff --git a/packages/website/md/docs/sol-compiler/1/introduction.md b/packages/website/md/docs/sol-compiler/1/introduction.md deleted file mode 100644 index 3b7332111..000000000 --- a/packages/website/md/docs/sol-compiler/1/introduction.md +++ /dev/null @@ -1,8 +0,0 @@ -Welcome to the [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler) documentation! Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) that adds: - -- Smart re-compilation: Only recompiles when smart contracts have changed -- Ability to compile an entire project instead of only individual `.sol` files -- Compilation using the Solidity version specified at the top of each individual `.sol` file -- Proper parsing of Solidity version ranges -- Support for the standard [input description](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description) for what information you'd like added to the resulting `artifacts` file (i.e 100% configurable artifacts content). -- Storage of constructor args, source maps and paths to all dependency source files. diff --git a/packages/website/md/docs/sol-compiler/1/usage.md b/packages/website/md/docs/sol-compiler/1/usage.md deleted file mode 100644 index 79c9b32ba..000000000 --- a/packages/website/md/docs/sol-compiler/1/usage.md +++ /dev/null @@ -1,24 +0,0 @@ -#### CLI Usage - -```bash -$ sol-compiler -Options: - --version Show version number [boolean] - --contracts-dir path of contracts directory to compile [string] - --artifacts-dir path to write contracts artifacts to [string] - --contracts comma separated list of contracts to compile - [string] [default: "*"] - --help Show help [boolean] -``` - -#### API Usage - -```typescript -import { Compiler } from '@0xproject/sol-compiler'; - -const compiler = new Compiler(); - -(async () => { - await compiler.compileAllAsync(); -})().catch(console.log); -``` diff --git a/packages/website/md/docs/sol-compiler/2/installation.md b/packages/website/md/docs/sol-compiler/2/installation.md deleted file mode 100644 index 7e7b690fe..000000000 --- a/packages/website/md/docs/sol-compiler/2/installation.md +++ /dev/null @@ -1,23 +0,0 @@ -#### CLI Installation - -```bash -yarn global add @0x/sol-compiler -``` - -#### API Installation - -```bash -yarn add @0x/sol-compiler -``` - -**Import** - -```typescript -import { Compiler } from '@0x/sol-compiler'; -``` - -or - -```javascript -var Compiler = require('@0x/sol-compiler').Compiler; -``` diff --git a/packages/website/md/docs/sol-compiler/2/usage.md b/packages/website/md/docs/sol-compiler/2/usage.md deleted file mode 100644 index 68e5a988f..000000000 --- a/packages/website/md/docs/sol-compiler/2/usage.md +++ /dev/null @@ -1,24 +0,0 @@ -#### CLI Usage - -```bash -$ sol-compiler -Options: - --version Show version number [boolean] - --contracts-dir path of contracts directory to compile [string] - --artifacts-dir path to write contracts artifacts to [string] - --contracts comma separated list of contracts to compile - [string] [default: "*"] - --help Show help [boolean] -``` - -#### API Usage - -```typescript -import { Compiler } from '@0x/sol-compiler'; - -const compiler = new Compiler(); - -(async () => { - await compiler.compileAllAsync(); -})().catch(console.log); -``` diff --git a/packages/website/md/docs/sol_coverage/installation.md b/packages/website/md/docs/sol_coverage/installation.md deleted file mode 100644 index 7c9840ab8..000000000 --- a/packages/website/md/docs/sol_coverage/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add -D @0x/sol-coverage -``` - -**Import** - -```javascript -import { CoverageSubprovider } from '@0x/sol-coverage'; -``` - -or - -```javascript -var CoverageSubprovider = require('@0x/sol-coverage').CoverageSubprovider; -``` diff --git a/packages/website/md/docs/sol_coverage/introduction.md b/packages/website/md/docs/sol_coverage/introduction.md deleted file mode 100644 index f21f8ecbe..000000000 --- a/packages/website/md/docs/sol_coverage/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [sol-coverage](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-coverage) documentation! Sol-coverage is a Solidity coverage tool. diff --git a/packages/website/md/docs/sol_coverage/usage.md b/packages/website/md/docs/sol_coverage/usage.md deleted file mode 100644 index d194f8abd..000000000 --- a/packages/website/md/docs/sol_coverage/usage.md +++ /dev/null @@ -1,74 +0,0 @@ -Sol-coverage uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with `ProviderEngine`, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article. - -The CoverageSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. - -Coverage subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data. - -In order to use `CoverageSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it. - -### Sol-compiler - -If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. - -```typescript -import { SolCompilerArtifactsAdapter } from '@0x/sol-coverage'; -// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in -const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir); -``` - -### Truffle - -If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. - -```typescript -import { TruffleArtifactAdapter } from '@0x/sol-coverage'; -const projectRoot = '.'; -const solcVersion = '0.5.0'; -const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion); -``` - -Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`. - -### Other framework/toolset - -You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`. - -```typescript -import { AbstractArtifactAdapter } from '@0x/sol-trace'; - -class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...}; -const artifactAdapter = new YourCustomArtifactsAdapter(...); -``` - -### Usage - -```typescript -import { CoverageSubprovider } from '@0x/sol-coverage'; -import ProviderEngine = require('web3-provider-engine'); - -const provider = new ProviderEngine(); -// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from. -const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; -const isVerbose = true; -const coverageSubprovider = new CoverageSubprovider(artifactsAdapter, defaultFromAddress, isVerbose); - -provider.addProvider(coverageSubprovider); -// Add all your other providers -provider.start(); -``` - -After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call: - -```typescript -await coverageSubprovider.writeCoverageAsync(); -``` - -This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/coverage.json.md) - so you can use it with any of the existing Istanbul reporters. - -```bash -yarn add -D istanbul -istanbul report html -open coverage/index.html -``` - -Use [Geth](https://github.com/ethereum/go-ethereum) as a backing node. We recommend using our [Devnet Docker container](https://hub.docker.com/r/0xorg/devnet) which sets up a Geth node for testing purposes. Ganache support is a [work in progress](https://github.com/0xProject/0x-monorepo/issues/1520). diff --git a/packages/website/md/docs/sol_profiler/installation.md b/packages/website/md/docs/sol_profiler/installation.md deleted file mode 100644 index e29ac5ae7..000000000 --- a/packages/website/md/docs/sol_profiler/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add -D @0x/sol-profiler -``` - -**Import** - -```javascript -import { ProfilerSubprovider } from '@0x/sol-profiler'; -``` - -or - -```javascript -var ProfilerSubprovider = require('@0x/sol-profiler').ProfilerSubprovider; -``` diff --git a/packages/website/md/docs/sol_profiler/introduction.md b/packages/website/md/docs/sol_profiler/introduction.md deleted file mode 100644 index bd53fb0fe..000000000 --- a/packages/website/md/docs/sol_profiler/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [sol-profiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-profiler) documentation! Sol-profiler is a Solidity profiler tool. diff --git a/packages/website/md/docs/sol_profiler/usage.md b/packages/website/md/docs/sol_profiler/usage.md deleted file mode 100644 index 0fbc31bc1..000000000 --- a/packages/website/md/docs/sol_profiler/usage.md +++ /dev/null @@ -1,74 +0,0 @@ -Sol-profiler uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `ProfilerSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with `ProviderEngine`, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article. - -The ProfilerSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. - -Profiler subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data. - -In order to use `ProfilerSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it. - -### Sol-compiler - -If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. - -```typescript -import { SolCompilerArtifactsAdapter } from '@0x/sol-profiler'; -// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in -const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir); -``` - -### Truffle - -If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. - -```typescript -import { TruffleArtifactAdapter } from '@0x/sol-profiler'; -const projectRoot = '.'; -const solcVersion = '0.5.0'; -const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion); -``` - -Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`. - -### Other framework/toolset - -You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`. - -```typescript -import { AbstractArtifactAdapter } from '@0x/sol-trace'; - -class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...}; -const artifactAdapter = new YourCustomArtifactsAdapter(...); -``` - -### Usage - -```typescript -import { ProfilerSubprovider } from '@0x/sol-profiler'; -import ProviderEngine = require('web3-provider-engine'); - -const provider = new ProviderEngine(); -// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from. -const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; -const isVerbose = true; -const profilerSubprovider = new ProfilerSubprovider(artifactsAdapter, defaultFromAddress, isVerbose); - -provider.addProvider(profilerSubprovider); -// Add all your other providers -provider.start(); -``` - -After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call: - -```typescript -await profilerSubprovider.writeProfilerOutputAsync(); -``` - -This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/profiler.json.md) - so you can use it with any of the existing Istanbul reporters. - -```bash -yarn add -D istanbul -istanbul report html -open coverage/index.html -``` - -Use [Geth](https://github.com/ethereum/go-ethereum) as a backing node. We recommend using our [Devnet Docker container](https://hub.docker.com/r/0xorg/devnet) which sets up a Geth node for testing purposes. Ganache support is a [work in progress](https://github.com/0xProject/0x-monorepo/issues/1520). diff --git a/packages/website/md/docs/sol_trace/installation.md b/packages/website/md/docs/sol_trace/installation.md deleted file mode 100644 index eb7bf08b8..000000000 --- a/packages/website/md/docs/sol_trace/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add -D @0x/sol-trace -``` - -**Import** - -```javascript -import { RevertTraceSubprovider } from '@0x/sol-trace'; -``` - -or - -```javascript -var RevertTraceSubprovider = require('@0x/sol-trace').RevertTraceSubprovider; -``` diff --git a/packages/website/md/docs/sol_trace/introduction.md b/packages/website/md/docs/sol_trace/introduction.md deleted file mode 100644 index 73f5c2bcd..000000000 --- a/packages/website/md/docs/sol_trace/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [sol-trace](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-trace) documentation! Sol-trace gives you a human-readable error stack trace when a revert happens in your Solidity code. diff --git a/packages/website/md/docs/sol_trace/usage.md b/packages/website/md/docs/sol_trace/usage.md deleted file mode 100644 index d117a0faf..000000000 --- a/packages/website/md/docs/sol_trace/usage.md +++ /dev/null @@ -1,62 +0,0 @@ -Sol-trace uses transaction traces to reconstruct the stack trace when reverts happen in Solidity. In order for it to gather these traces, you must add the `RevertTraceSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with `ProviderEngine`, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article. - -The `RevertTraceSubprovider` eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. - -Trace subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data. - -In order to use `RevertTraceSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it. - -### Sol-compiler - -If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. - -```typescript -import { SolCompilerArtifactsAdapter } from '@0x/sol-trace'; -// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in -const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir); -``` - -### Truffle - -If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. - -```typescript -import { TruffleArtifactAdapter } from '@0x/sol-trace'; -const projectRoot = '.'; -const solcVersion = '0.5.0'; -const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion); -``` - -Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`. - -### Other framework/toolset - -You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`. - -```typescript -import { AbstractArtifactAdapter } from '@0x/sol-trace'; - -class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...}; -const artifactAdapter = new YourCustomArtifactsAdapter(...); -``` - -### Usage - -```typescript -import { RevertTraceSubprovider } from '@0x/sol-trace'; -import ProviderEngine = require('web3-provider-engine'); - -const provider = new ProviderEngine(); -// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from. -const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; -const isVerbose = true; -const revertTraceSubprovider = new RevertTraceSubprovider(artifactsAdapter, defaultFromAddress, isVerbose); - -provider.addProvider(revertTraceSubprovider); -// Add all your other providers -provider.start(); -``` - -Now when you run your tests, it should print out stack traces when encountering an error. - -Use [Geth](https://github.com/ethereum/go-ethereum) as a backing node. We recommend using our [Devnet Docker container](https://hub.docker.com/r/0xorg/devnet) which sets up a Geth node for testing purposes. Ganache support is a [work in progress](https://github.com/0xProject/0x-monorepo/issues/1520). diff --git a/packages/website/md/docs/subproviders/1/installation.md b/packages/website/md/docs/subproviders/1/installation.md deleted file mode 100644 index a049ff0ec..000000000 --- a/packages/website/md/docs/subproviders/1/installation.md +++ /dev/null @@ -1,15 +0,0 @@ -```bash -npm install @0xproject/subproviders --save -``` - -**Import** - -```typescript -import { LedgerSubprovider } from '@0xproject/subproviders'; -``` - -or - -```javascript -var LedgerSubprovider = require('@0xproject/subproviders').LedgerSubprovider; -``` diff --git a/packages/website/md/docs/subproviders/1/introduction.md b/packages/website/md/docs/subproviders/1/introduction.md deleted file mode 100644 index fe7fb6a8d..000000000 --- a/packages/website/md/docs/subproviders/1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [Subproviders](https://github.com/0xProject/0x-monorepo/tree/development/packages/subproviders) documentation! Subproviders is a package containing useful [subproviders](https://0x.org/wiki#Web3-Provider-Explained) that can be used with the [Web3 Provider Engine](https://github.com/MetaMask/provider-engine) library. diff --git a/packages/website/md/docs/subproviders/1/ledger_node_hid.md b/packages/website/md/docs/subproviders/1/ledger_node_hid.md deleted file mode 100644 index 3089817af..000000000 --- a/packages/website/md/docs/subproviders/1/ledger_node_hid.md +++ /dev/null @@ -1,17 +0,0 @@ -By default, node-hid transport support is an optional dependency. This is due to the requirement of native usb developer packages on the host system. If these aren't installed the entire `npm install` fails. We also no longer export node-hid transport client factories. To re-create this see our integration tests or follow the example below: - -```typescript -import Eth from '@ledgerhq/hw-app-eth'; -import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'; -async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumClient> { - const ledgerConnection = await TransportNodeHid.create(); - const ledgerEthClient = new Eth(ledgerConnection); - return ledgerEthClient; -} - -// Create a LedgerSubprovider with the node-hid transport -ledgerSubprovider = new LedgerSubprovider({ - networkId, - ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync, -}); -``` diff --git a/packages/website/md/docs/subproviders/2/installation.md b/packages/website/md/docs/subproviders/2/installation.md deleted file mode 100644 index 025dd0dee..000000000 --- a/packages/website/md/docs/subproviders/2/installation.md +++ /dev/null @@ -1,15 +0,0 @@ -```bash -npm install @0x/subproviders --save -``` - -**Import** - -```typescript -import { LedgerSubprovider } from '@0x/subproviders'; -``` - -or - -```javascript -var LedgerSubprovider = require('@0x/subproviders').LedgerSubprovider; -``` diff --git a/packages/website/md/docs/web3_wrapper/1/installation.md b/packages/website/md/docs/web3_wrapper/1/installation.md deleted file mode 100644 index 92794d9b0..000000000 --- a/packages/website/md/docs/web3_wrapper/1/installation.md +++ /dev/null @@ -1,25 +0,0 @@ -**Install** - -```bash -npm install @0xproject/web3-wrapper --save -``` - -**Import** - -```javascript -import { Web3Wrapper } from '@0xproject/web3-wrapper'; -``` - -or - -```javascript -var Web3Wrapper = require('@0xproject/web3-wrapper').Web3Wrapper; -``` - -If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: - -``` -"include": [ - "./node_modules/web3-typescript-typings/index.d.ts", -] -``` diff --git a/packages/website/md/docs/web3_wrapper/1/introduction.md b/packages/website/md/docs/web3_wrapper/1/introduction.md deleted file mode 100644 index 17bd316f1..000000000 --- a/packages/website/md/docs/web3_wrapper/1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [Web3Wrapper](https://github.com/0xProject/0x-monorepo/tree/development/packages/web3-wrapper) documentation! Web3-wrapper is a JSON-RPC client for Ethereum nodes. It is a type-safe alternative to [Web3.js](https://github.com/ethereum/web3.js/) written in TypeScript. diff --git a/packages/website/md/docs/web3_wrapper/2/installation.md b/packages/website/md/docs/web3_wrapper/2/installation.md deleted file mode 100644 index 14c4f066c..000000000 --- a/packages/website/md/docs/web3_wrapper/2/installation.md +++ /dev/null @@ -1,25 +0,0 @@ -**Install** - -```bash -npm install @0x/web3-wrapper --save -``` - -**Import** - -```javascript -import { Web3Wrapper } from '@0x/web3-wrapper'; -``` - -or - -```javascript -var Web3Wrapper = require('@0x/web3-wrapper').Web3Wrapper; -``` - -If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: - -``` -"include": [ - "./node_modules/web3-typescript-typings/index.d.ts", -] -``` |