diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-08 21:42:07 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-10 23:47:38 +0800 |
commit | a6f72de09d7b2c9738b78d2097baa9906838fbe9 (patch) | |
tree | 17126a5b45dabf2c7410d25668c68ce3d78284f0 /packages/website/md/docs/sol-compiler | |
parent | 96037aed5231aa9344e5037aa6cff3d01f4abdae (diff) | |
download | dexon-0x-contracts-a6f72de09d7b2c9738b78d2097baa9906838fbe9.tar.gz dexon-0x-contracts-a6f72de09d7b2c9738b78d2097baa9906838fbe9.tar.zst dexon-0x-contracts-a6f72de09d7b2c9738b78d2097baa9906838fbe9.zip |
Rename deployer to sol-compiler
Diffstat (limited to 'packages/website/md/docs/sol-compiler')
-rw-r--r-- | packages/website/md/docs/sol-compiler/installation.md | 23 | ||||
-rw-r--r-- | packages/website/md/docs/sol-compiler/introduction.md | 13 | ||||
-rw-r--r-- | packages/website/md/docs/sol-compiler/usage.md | 24 |
3 files changed, 60 insertions, 0 deletions
diff --git a/packages/website/md/docs/sol-compiler/installation.md b/packages/website/md/docs/sol-compiler/installation.md new file mode 100644 index 000000000..9c8561d9b --- /dev/null +++ b/packages/website/md/docs/sol-compiler/installation.md @@ -0,0 +1,23 @@ +#### 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/introduction.md b/packages/website/md/docs/sol-compiler/introduction.md new file mode 100644 index 000000000..aa1939006 --- /dev/null +++ b/packages/website/md/docs/sol-compiler/introduction.md @@ -0,0 +1,13 @@ +Welcome to the [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler) documentation! Sol-compiler is a tool for compiling Solidity smart contracts and generating artifacts with ease. + +It serves a similar purpose as parts of the [Truffle framework](http://truffleframework.com/), but with the UNIX philosophy in mind: Make each program do one thing well. This tool is for intermediate to advanced Solidity developers that require greater configurability and reliability. + +Sol-compiler has the following advantages over Truffle: + +* Compile each smart contract with a specific version of Solidity. +* Improved artifact files: + * Storage of constructor args, source maps and paths to all requisite source files. + * An easy to maintain codebase: TypeScript + Single repo. + * Supports Solidity version ranges - contract compiled with latest Solidity version that satisfies the range. + +Sol-compiler can be used as a command-line tool or as an imported module. diff --git a/packages/website/md/docs/sol-compiler/usage.md b/packages/website/md/docs/sol-compiler/usage.md new file mode 100644 index 000000000..79c9b32ba --- /dev/null +++ b/packages/website/md/docs/sol-compiler/usage.md @@ -0,0 +1,24 @@ +#### 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); +``` |