epm 0.3.11 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +50 -17
  3. data/README.md +99 -100
  4. data/Rakefile +6 -0
  5. data/bin/epm +26 -7
  6. data/lib/epm/version.rb +1 -1
  7. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9305034862412d5b38d2f2500d5485212184fc0
4
- data.tar.gz: 07c35e7466a169ae1a88aed55e487df0a9cf6e0f
3
+ metadata.gz: b2243df695de9b993d40a6a4b4a0a508c9272cfc
4
+ data.tar.gz: e6a547e74ddf0f85f3dd130167fdad5ed851cae6
5
5
  SHA512:
6
- metadata.gz: 629ddf71a60fe757e7ec7caeaec729b944c73a13a91175df66620ff34ecbe3bd1102c33c6c890524b1ada835c3fb1de5347121e2059d9f2124091fbcd4ee3082
7
- data.tar.gz: daf494720627e4ccb465290c5f93340d7086aac244eb3281e29143d41115f16e6bdd593ee8cd23f5dddc92d843d3ff476474ab9d41506dab21423a0b50257e1e
6
+ metadata.gz: 5090e48dd09a334c0b566c966cf4e6bd9ae105972c708751566f263b5b1dcef5c3faa142b3b215d8e9b650fa11cbb7af228749d179512867f42eef087f3e198c
7
+ data.tar.gz: 2e34a750d93df0209f6eb832e5b79464d76aa3fb7a8ae27785549f524ef7e7b0ca011647c9edc3dd272ab29abad116a3e4ac08eda1db43a9946bf40f0637a9c4
data/LICENSE.md CHANGED
@@ -1,23 +1,56 @@
1
- The MIT License (MIT)
1
+ Copyright (c) [2014] [Project Douglas Limited]
2
2
 
3
- Copyright (c) 2014 Watershed Legal Service, PLLC
3
+ Any person who (1) obtains a copy of this software and associated documentation
4
+ files (the "Software") and (2) agrees to the terms of this license agreement may
5
+ free of charge, deal in the Software without restriction, including (without limitation)
6
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
7
+ and/or sell copies of the Software, and to permit persons to whom the Software
8
+ is furnished to do so.
4
9
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
10
+ By using the Software, you agree to the following terms:
11
11
 
12
- The above copyright notice and this permission notice shall be included in
12
+ 1. The above copyright notice and this permission notice shall be included in
13
13
  all copies or substantial portions of the Software.
14
14
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
15
+ 2. The software is provided "as is", without warranty of any kind, express or
16
+ implied, including but not limited to the warranties of merchantability,
17
+ fitness for a particular purpose and noninfringement. In no event shall the
18
+ authors or copyright holders be liable for any claim, damages or other
19
+ liability, whether in an action of contract, tort or otherwise, arising from,
20
+ out of or in connection with the software or the use or other dealings in
21
+ the software.
22
22
 
23
- In other words, don't be a jerk.
23
+ 3. THE SOFTWARE DOES NOT PROVIDE LEGAL ADVICE AND WAS NOT CREATED TO PROVIDE
24
+ LEGAL ADVICE. IN ADDITION, YOU ALSO AGREE:
25
+
26
+ a. The creators of the Software and its contributors are not your lawyers.
27
+
28
+ b. The Software is not a lawyer.
29
+
30
+ c. Your use of the Software does not, in and of itself, create a legally
31
+ binding contract in any jurisdiction and does not establish a lawyer-client
32
+ relationship between either you and the developer of the Software or between
33
+ you and the Software. Your communication with a non-lawyer will not be subject
34
+ to the attorney-client privilege and (depending on your jurisdiction) may not
35
+ be entitled to protection as confidential communication.
36
+
37
+ d. The dissemination, distribution, or usage of this software shall not constitute
38
+ the provision of legal advice within your jurisdiction or any other. Unless you
39
+ are legally authorized and licensed to do so, you agree to not use the Software
40
+ to provide or assist in the provision of legal advice.
41
+
42
+ e. You acknowledge and understand that each jurisdiction has its own particular
43
+ rules regarding the practice of law. IF YOU USE THIS SOFTWARE TO PROVIDE LEGAL
44
+ ADVICE YOU MAY BE SUBJECT TO CIVIL AND CRIMINAL LIABILITY. PRACTICING LAW WITHOUT
45
+ A LICENSE IS A VIOLATION OF CRIMINAL LAW IN SOME JURISDICTIONS. CONSULT A LAWYER
46
+ LICENSED IN YOUR JURISDICTION IF YOU HAVE ANY QUESTIONS ABOUT WHAT DOES OR DOES
47
+ NOT CONSTITUTE THE PRACTICE OF LAW.
48
+
49
+ f. The providers of this software neither warrant nor guarantee this software shall
50
+ meet the requirements of any particular legal system to form a legally binding
51
+ contract, nor is it their intention to directly or indirectly facilitate or
52
+ encourage the unauthorized practice of law.
53
+
54
+ g. You agree that in order for you to form a legally binding contract that you shall
55
+ seek legal advice from an appropriately qualified and experienced lawyer within
56
+ your jurisdiction.
data/README.md CHANGED
@@ -1,155 +1,152 @@
1
1
  [![Stories in Ready](https://badge.waffle.io/project-douglas/epm.png?label=ready&title=Ready)](https://waffle.io/project-douglas/epm)
2
- # Introduction
3
-
4
- EPM is a package (provision?) manager. It is meant to simplify the management of git hosted repositories which contain Ethereum standard or customized contracts. This package manager should work in the way which most package managers operate -- with the addition that it will be able to interact with the Ethereum BlockChain.
5
-
6
- In addition to installing, uninstalling, updating, and upgrading your packages for you, the Gem will also act as a hub for different Ethereum contract building, testing, simulating, and deploying mechanisms.
7
-
8
- The package manager builds in a standard tipping system which is -- by convention -- built to allow tipping of the EPM system as well as the other tools which developers use to build, test, and deploy their contracts onto the Ethereum BlockChain. The tipping system is on by default as a mechanism to assist in further development of Ethereum contract deployment products. It can, of course, be turned off (this is open source software).
9
-
10
- # Installing
11
-
12
- This is a Ruby gem and will require that you have Ruby on your system (unless and until someone ports this to Python or Node). Once you have ensured that you have Ruby on your system, `gem install epm`.
13
-
14
- # Using
15
-
16
- The gem is a command line tool. All of the commands are built to run primarily from the command line. Of course the gem will integrate as a Ruby gem into your Ruby application, but primarily it is meant to work from the command line.
17
-
18
- ## Contract Tools Features
19
-
20
- `epm install` -- used like brew install to install a particular Ethereum tool. Use in conjuction with the `-l` or `--local` flag to install the tool as the local tool only for this particular project. Otherwise will install the tool as a global user tool.
21
-
22
- `epm uninstall` -- used like brew uninstall to uninstall a particular Ethereum tool. Same restrictions for the `-l` or `--local` flag as with `epm install` are applicable to `epm uninstall`.
23
-
24
- `epm upgrade` -- used like brew upgrade to upgrade a particular Ethereum tool. Same restrictions for the `-l` or `--local` flag as with `epm install` are applicable to `epm upgrade`.
25
2
 
26
- `epm list` -- list installable tools.
27
-
28
- `epm list-installed` -- list currently installed tools.
29
-
30
- ## Package Management Features
31
-
32
- `epm pull` -- will pull contract provisions, contracts, or packages of contracts based on the contract definition files in the project folder. If used without calling any contract definition file after `epm pull` will pull all the necessary components for all of the contract definition files viewable from the project root. If used with a contract definition file after `epm pull` will pull all the necessary components for the contract definition file.
33
-
34
- `epm push` -- will push contract provisions, contracts, or packages of contracts assembled in the project root to the repository noted in the local configuration file's `repository` setting
35
-
36
- `epm update` -- will pull updates to the contract provisions, contracts, or packages of contracts based on the contract definition files in the project folder. Can be used with or without a contract definition file as with `epm pull`.
37
-
38
- ## Contract Workflow Features
39
-
40
- `epm make` -- used to pull Ethereum provisions, contracts, or packaged and build out the application or package(s) in this project based on the contract definition files. If used without calling a particular contract definition file after `epm make` will make all the contract definition files visible from the project root (which is where epm make should be called from). If used with a particular contract definition file after `epm make` will only make that particular contract definition.
41
-
42
- `epm test` -- used to test Ethereum contracts based upon the tester included in the global or local configuration file.
43
-
44
- `epm simulate` -- used to simulate Ethereum contracts or sets of contracts based upon the simulator included in the global or locla configuration file.
3
+ # Introduction
45
4
 
46
- `epm deploy` -- used to deploy contracts to the Ethereum blockchain.
5
+ EPM is a package manager for sets of Ethereum smart contracts. It is meant to simplify the management of git hosted repositories which contain Ethereum contracts. This package manager should work in a way which is roughly analogous to how most package managers operate -- with the addition that it will be able to interact with the Ethereum BlockChain. The Gem will primarily act as a hub for Ethereum contract developers by assisting them in the building, testing, simulating, and deploying of their Ethereum smart contracts.
47
6
 
48
- `epm update-deployed` -- used to send a command to currently running contracts on the Ethereum blockchain to update themselves based on the git diff between the most recent commit of the project repository and the current commit when the contracts were deployed to the blockchain.
7
+ Ethereum Package Manager allows Ethereum contract developers to push contracts straight to their ethereum clients via rpc. EPM also supports various other necessities when developing ethereum contract networks. In addition to deploying contracts to ethereum clients (Ethereal, Ethereum-go, and Eth-cpp currently support RPC; *note*, AlethZero does not), the package has other features as well. The package:
49
8
 
50
- `epm destroy` -- used to send a suicide command to all of the contracts in the Ethereum blockchain which are derived from the project root.
9
+ * keeps a log of the contracts which have been deployed so that you can then easily see those contracts;
10
+ * allows users to transact with contracts;
11
+ * allows users to query contract storage;
12
+ * allows users to deploy a sequence of contracts; and
13
+ * allows users to start, stop, and restart ethereum servers with predefined options.
51
14
 
52
- ## EPM Self-Reflective Features
15
+ The package manager will (soon-ish) add in a standard tipping functionality which is -- by convention but not requirement -- built to allow tipping of the stack which the developer has used to build, test, and deploy their contracts onto the Ethereum BlockChain. The tipping system will be on by default as a mechanism to assist in further development of Ethereum contract deployment products. It can, of course, be turned off (this is, after all, open source software).
53
16
 
54
- `epm configure-local` -- open the local configuration file in the default editor.
17
+ # Installing
55
18
 
56
- `epm configure-global` -- open the global configuration file in the default editor.
19
+ This is a Ruby gem and will require that you have Ruby on your system (unless and until someone ports this to Python or Node).
57
20
 
58
- `epm self-update` -- update the EPM tool to the latest version.
21
+ * On debian variants of Linux, use `sudo apt-get install ruby2.0 ruby 1.9-dev` (2.0 is not a strict dependency, the ruby is fairly standard so there should be no problem running on 1.9 but I'm not sure if it will work with 1.8 the 1.9-dev package adds compilation features which are needed for some of the dependencies).
22
+ * On OSX ruby is installed by default.
23
+ * Windows users can use the rubyinstaller from [here](http://rubyinstaller.org/).
59
24
 
60
- `epm implode` -- remove EPM entirely.
25
+ Once you have ensured that you have Ruby on your system, `gem install epm`.
61
26
 
62
- ## Package Management Features
27
+ ## Important - Configure your Client
63
28
 
64
- `epm install` --
29
+ **The first thing to do** when you have installed the EPM package is to configure the server. The epm config file is placed by default in `~/.epm/epm-rpc.json`. To install the default settings run:
65
30
 
66
- `epm pull` --
31
+ ```bash
32
+ $ rake setup
33
+ ```
67
34
 
68
- `epm push` --
35
+ After running the rake command (rake is ruby's make), then you can edit the config file in whatever editor you use. Set your preferred settings to however you like them. After that you can use the Create and Transact commands freely.
69
36
 
70
- `epm destroy` --
37
+ ## Install Compilers
71
38
 
72
- `epm update` --
39
+ Note, the EPM example config file has paths to all of the compilers. EPM, however is agnostic to which compiler you use. Whichever one (or ones) you want to use, install those. The rest forget about.
73
40
 
74
- `epm list` --
41
+ The compilers you use should be manually installed.
75
42
 
76
- ## Contract Workflow Features
43
+ * Mutan is installed with `go get -u github.com/obscuren/mutan`.
44
+ * LLLC is installed with the cpp-ethereum client (see build instructions [here](https://github.com/ethereum/cpp-ethereum/wiki)).
45
+ * Serpent is installed with the following commands:
77
46
 
78
- `epm make` --
47
+ ```bash
48
+ git clone https://github.com/ethereum/serpent.git
49
+ cd serpent
50
+ sudo python setup.py install
51
+ ```
79
52
 
80
- `epm test` --
53
+ When you send a create or deploy command, EPM will look at the file extension of the contract. When it is `lll` then EPM will call the LLL compiler (from the supplied LLLC path); when it is `mu` or `mut` then EPM will call the Mutan compiler; when it is `se` or `ser` then EPM will call the Serpent compiler.
81
54
 
82
- `epm simulate` --
55
+ # Using the CLI Interface
83
56
 
84
- `epm deploy` --
57
+ All of the commands are built to run primarily from the command line. Of course the gem will integrate as a Ruby gem into your Ruby application, but primarily it is meant to work from the command line.
85
58
 
86
- # Configuration Options
59
+ EPM offers the following commands:
87
60
 
88
- EPM uses what should be a fairly approachable two configuration layers approach to managing configurations. The first level which the gem will look at will be the `~/.epm/config.epm` file. These are the user global configurations. The global configurations will be overwritten by local configuration files in the config.epm file of the root directory of the project you are working on (for the time being epm should be called from this directory). The config.epm file is a [TOML](https://github.com/mojombo/toml) formated configuration file with the following options.
61
+ * `epm start` -- starts the default ethereum server with the configuration options supplied in the config file.
62
+ * `epm stop` -- stops the default ethereum server.
63
+ * `epm restart` -- restarts the default ethereum server.
64
+ * `epm rpc` -- sends any of the rpc commands to the ethereum server. This is useful when developers need access to the rpc commands which are not wrapped and summarized below, or when developers need to use one of the commands below (primarily create and transact) but without the opinionated epm defaults (e.g., endowment of 0, and transact with 0).
65
+ * `epm query` -- queries a storage location on the ethereum blockchain. Accepts two arguments, the first argument is the contract to be queried, and the second argument is the storage location to be queried.
66
+ * `epm transact` -- sends a transaction to an ethereum contract. By definition this will be a 0 value call. The account sending the transaction will need ether, but only to provide the gas for the individual call. The first argument sent to the command line will be the recipient and the remaining arguments sent to the command line will be the data with each of the data slots separated by a space on the command line (or a new element in the array if calling programmatically). Arguments which are prefixed by `0x` will be treated as hex values and arguments which are not will be treated as strings. EPM will compile all of the arguments into a single RPC call which is correctly formated for all of the clients.
67
+ * `epm compile` -- compiles a contract and returns the byte code array for that contract to the command line (or if called programmatically to the calling program).
68
+ * `epm create` -- compiles a contract and sends to the ethereum blockchain. Create is used only for single contracts rather than packages of contracts. Use epm deploy to send packages of contracts to the blockchain.
69
+ * `epm deploy` -- deploy is the most sophisticated command. It is a wrapper for the remainder of the EPM functionality which works in an automated way to deploy as many contracts and send as many transactions as the developer needs to set up a system of contracts. Deploy will work either with local package-definition files or with package-definition files located on any remote git server which the user has access to. See the package definition section below for the domain specific langauge which EPM deploy uses.
89
70
 
90
- ## Global Configuration Options
71
+ # Package Deployment
91
72
 
92
- `editor` -- String denoting the path which EPM should call in order to edit the contract. Default: shell environment's editor.
73
+ Rarely will contract devs only want to deploy one contract. Usually they will want to deploy a series of contracts. EPM assists in this with the package deployment feature. To deploy packages, there are three commands that can be used: `create`, `modify-deploy`, `transact`, `query`, `log`, and `set`.
93
74
 
94
- `linter` -- String denoting the path which EPM should call in order to lint a contract. Default: ???
75
+ These commands **must** be formulated as such:
95
76
 
96
- `tester` -- String denoting the path which EPM should call in order to run your test suite. Default: ???
77
+ ```
78
+ # Package Email: dennis@projectdouglas.org
79
+ # Package Repository: https://github.com/project-douglas/c3D-contracts
97
80
 
98
- `simulator` -- String denoting the path which EPM should call in order to start the simulator. Default: ???
81
+ deploy:
82
+ General/DOUG-v6.lll => {{DOUG}}
83
+ modify-deploy:
84
+ General/repDB.lll => {{rep}}
85
+ (def 'DOUG 0x9c0182658c9d57928b06d3ee20bb2b619a9cbf7b) => (def 'DOUG {{DOUG}})
86
+ transact:
87
+ {{DOUG}} => "register" "rep" {{rep}} "" "" "" "" ""
88
+ query:
89
+ {{DOUG}} => 0x18 => {{DOUG_LIKES_YOU}}
90
+ ```
99
91
 
100
- `compiler` -- String denoting the path which EPM should call in order to compile the contract into the byte language for deployment to the Ethereum BlockChain. Default: ???
92
+ Each line which does not begin with whitespace is read as a command sequence. The remainder of the lines relevant to that command must begin with whitespace (tabs or spaces do not matter). Lines which are blank or begin with a `#` will not be parsed.
101
93
 
102
- `blacklisted-repos` -- Array of strings denoting github or other git repos which are Blacklisted. Default: []
94
+ The first portion of the command is the command, the remainder are the params for the command. Each param is separated by ` => `.
103
95
 
104
- `deployer-keys` -- String denoting the public key of the deploying coder|lawyer -- which some or all contracts can use to ensure a tip is sent to the deployer.
96
+ ## Deploy Command
105
97
 
106
- `infrastructure-keys` -- Array of strings denoting the public keys of the testers, linters, simulators, package managers, and other infrastructure which the deployer used to assist in the deployment of the contract. Strings should be in the form `KEY:AMOUNT:MESSAGE` where KEY is the public hash which the contract will send the tip and where AMOUNT is the **percentage** of the tip which will go to this key. MESSAGE is the signing message of the tip and is optional.
98
+ The command is straight-forward. Deploy a contract params:
107
99
 
108
- ## Local Configuration Options
100
+ 1. File of the contract to be compiled and deployed (relative path from the definition file, or absolute path).
101
+ 2. The variable name of the contract (usually to be used later).
109
102
 
110
- The local configuration options include *all* of the global configuration options, and local configuration options will override the global configuration options. In addition, there are a few local configuration options which are not read by the global config file.
103
+ ## Modify-Deploy Command
111
104
 
112
- `name` -- String denoting the name of the package. If the package contains one contract the package and the contract will be the same thing. If the package contains more than one contract then the package will include all of the contracts.
105
+ This command first modifies a section of a contract (usually substituting in a variable) and then deploys. Modify-deploy a contract params:
113
106
 
114
- `author` -- String denoting the author of the package.
107
+ 1. File of the contract to be compiled and deployed (relative path from the definition file, or absolute path).
108
+ 2. The variable name of the contract (usually to be used later).
109
+ 3. The portion of the contract which will be substituted.
110
+ 4. What is to replace it (which can use variable names established by contracts deployed prior to this modification).
115
111
 
116
- `author-address` -- String denoting the Ethereum address of the author of the package (used for tipping system when others reuse the contract or package).
112
+ Modify-deploy commands may have multiple substitutions. Just add additional substitutions on new indented lines separated by `=>`
117
113
 
118
- `repository` -- String denoting the remote git repository for the package. When the user calls `epm push` EPM will send the package to this address.
114
+ ## Transact Command
119
115
 
120
- # Contract and Package Definition Files
116
+ The transact command is also straight forward. Transact params:
121
117
 
122
- EPM uses contract definition files to build and maintain contracts. Contract definition files are TOML files.
118
+ 1. The recipient of the transaction.
119
+ 2. The data for the transaction.
123
120
 
124
- ## Package Definition Files
121
+ As with all EPM transactions, this is not meant to support value, it is meant to provide data. Each 32 byte transaction slot is separated by a space. Strings can be sent in quotes or not in quotes, hex address can be sent using 0x or without, empty slots are denoted by "".
125
122
 
126
- Define the contracts used in the package and the relationships between them. TODO.
123
+ ## Query Command
127
124
 
128
- ## Contract Definition Files -- Shortform
125
+ The query command is used to query storage spaces. Query params:
129
126
 
130
- The shortform contract definition allows coder|lawyers to pull in \*.ethereum-contract files to the working folder to be tested, simulated, and deployed from established git repositories.
127
+ 1. The address of the contract to query.
128
+ 2. The storage location of the contract to query.
129
+ 3. The variable name to store the result as.
131
130
 
132
- EPM will pull from any git repository, but it will default to github repositories, so when you send it the following repository: `watershedlegal/ethereum-boilerplate-prefaces` it will know that that is a github address. If you would like to add a private repository or a bitbucket or any other repository simply add the full address to the line. If the repository contains multiple `.ethereum-contract` files and you only want one of those files, you can state the contract you want EPM to pull into the working directory by specifying that instead of the repository in the `XXXXXXX.ethereum-definition` file.
131
+ ## Log Command
133
132
 
134
- The `XXXX.ethereum-definition` file will simply be a list of the repositories or contract files which EPM should import into the working directory's repo folder. After that it will be up to the coder|lawyer to build the contracts into a working network or meta contract, test, simulate, and deploy.
133
+ The log command will dump into your deploy log. Log params:
135
134
 
136
- ## Contract Definition Files -- Longform
135
+ 1. key
136
+ 2. val
137
137
 
138
- The longform contract definition allows coder|lawyers to pull in pieces of contracts from different sources and have EPM attempt to assemble a cohesive contract in which the lawyer|coder can then edit before linting, testing, simulating, and deploying.
138
+ ## Set Command
139
139
 
140
- As with the shortform contract definitions, EPM will pull from any repository based on the rules described above. Addresses may point to the entire repository, in which case EPM will pull in all \*.ethereum-provision files. If only one file is wanted for the preface section, that file path can be specified after the repository address. In addition, if only certain line numbers of a certain file are desired to be pulled in then EPM will know to look for that when you add the following string: `REPONAME/FILEPATH:STARTLINE_ENDLINE` where STARTLINE and ENDLINE are the line numbers which you would like to be pulled in.
140
+ The set command is used to set key:val pairs for substitution later. Key params:
141
141
 
142
- The contract definition file is also a TOML formatted configuration file. There are three sections to the contract definition file (which by convention should be XXXXX.ethereum-definition where XXXX is the name of the contract):
142
+ 1. key
143
+ 2. val
143
144
 
144
- 1. `provisions` -- Array of strings denoting the repository addresses which EPM will pull from and formulate into the main provisions of this contract.
145
- 2. `constants` -- Array of KEY:VALUE pairs which set the constant values after building a contract.
146
- 3. `tip-amount` -- Integer denoting the amount of ether to be distributed to the infrastructure network which helped you build and deploy this contract or system of contracts.
147
- 4. `constants` -- Array of KEY:VALUE pairs which set the constant values after building a contract.
148
- 5. `tip-amount` -- Integer denoting the amount of ether to be distributed to the infrastructure network which helped you build and deploy this contract or system of contracts.
145
+ # Tips && Usage
149
146
 
150
- # Roadmap / TODO
147
+ If you want to use AlethZero, that is fine but you will also have to use `eth` headless because AlethZero does not currently have RPC capabilities. I run eth in a second directory listening on a second port with a peer server of AlethZero and it works just fine. Such a set up allows devs to see what is happening in AlethZero (as long as both headless and Aleth connect to the same peer server) but gain the RPC capabilities the package needs.
151
148
 
152
- - [ ] Everything
149
+ Note, EPM is set up to interact with contracts, not to transmit value. You'll have to modify the codebase if you intend to use EPM to send ether to contracts. Better yet, use the actual clients for that...!
153
150
 
154
151
  # Contributing
155
152
 
@@ -162,6 +159,8 @@ The contract definition file is also a TOML formatted configuration file. There
162
159
 
163
160
  # License
164
161
 
165
- MIT License - (c) 2014 - Watershed Legal Services, PLLC. All copyrights are owned by [Watershed Legal Services, PLLC](http://watershedlegal.com).
162
+ Modified MIT License - (c) 2014 - Project Douglas Limited. All copyrights are owned by [Project Douglas Limited](http://projectdouglas.org).
163
+
164
+ See License file.
166
165
 
167
- See License file.
166
+ In other words, don't be a jerk.
data/Rakefile CHANGED
@@ -1,6 +1,12 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
+ desc "Sets up EPM so users can configure"
5
+ task :setup do
6
+ require './lib/epm'
7
+ EPM::Settings.check
8
+ end
9
+
4
10
  desc "Update Sublime Package"
5
11
  task :sublime do
6
12
  Dir.chdir(File.dirname(__FILE__))
data/bin/epm CHANGED
@@ -11,7 +11,11 @@ program :description, 'Ethereum Package Manager assists in the management of Eth
11
11
  ##
12
12
  command :compile do |c|
13
13
  c.syntax = 'epm compile'
14
- c.description = 'Compile an ethereum contract and return the byte code array.'
14
+ # summary is displayed on --help
15
+ c.summary = 'Compile an ethereum contract and return the byte code array.'
16
+ # description is deplayed on subcommand --help
17
+ c.description = 'Compile an ethereum contract and return the byte code array. Compile does not send to the blockchain, it only returns the byte code array.'
18
+ c.example = 'epm compile TheContract.lll'
15
19
  c.action do |args|
16
20
  result = EPM.compile(args)
17
21
  result.each{|l| print l + "\n"}
@@ -20,7 +24,11 @@ end
20
24
 
21
25
  command :create do |c|
22
26
  c.syntax = 'epm create'
23
- c.description = 'Compile an ethereum contract and deploy to the blockchain.'
27
+ # summary is displayed on --help
28
+ c.summary = 'Compile an ethereum contract and deploy to the blockchain.'
29
+ # description is deplayed on subcommand --help
30
+ c.description = 'Compile an ethereum contract and deploy to the blockchain. Create is used only for single contracts rather than packages of contracts. Use epm deploy to send packages of contracts to the blockchain.'
31
+ c.example = 'epm create TheContract.lll'
24
32
  c.action do |args|
25
33
  result = EPM.create(args)
26
34
  result.each{|l| print l + "\n"}
@@ -29,7 +37,11 @@ end
29
37
 
30
38
  command :deploy do |c|
31
39
  c.syntax = 'epm deploy'
32
- c.description = 'Compile and deploy a system of contracts to the blockchain. See gem README for EPM package-definition file syntax.'
40
+ # summary is displayed on --help
41
+ c.summary = 'Compile and deploy a system of contracts to the blockchain.'
42
+ # description is deplayed on subcommand --help
43
+ c.description = 'Compile and deploy a system of contracts to the blockchain. It is a wrapper for the remainder of the EPM functionality which works in an automated way to deploy as many contracts and send as many transactions as the developer needs to set up a system of contracts. Deploy will work either with local package-definition files or with package-definition files located on any remote git server which the user has access to. See gem README for EPM package-definition file syntax.'
44
+ c.example = 'epm deploy https://github.com/project-douglas/eris'
33
45
  c.action do |args|
34
46
  EPM.deploy(args)
35
47
  end
@@ -40,7 +52,11 @@ end
40
52
  ##
41
53
  command :transact do |c|
42
54
  c.syntax = 'epm transact'
43
- c.description = 'Send a transaction to a contract. Note this is to work with contracts, it will not (by default) send ether.'
55
+ # summary is displayed on --help
56
+ c.summary = 'Send a transaction to a contract.'
57
+ # description is deplayed on subcommand --help
58
+ c.description = 'Send a transaction to a contract. By definition this will be a 0 value call. The account sending the transaction will need ether, but only to provide the gas for the individual call. The first argument sent to the command line will be the recipient and the remaining arguments sent to the command line will be the data with each of the data slots separated by a space on the command line (or a new element in the array if calling programmatically). Arguments which are prefixed by `0x` will be treated as hex values and arguments which are not will be treated as strings. EPM will compile all of the arguments into a single RPC call which is correctly formated for all of the clients.'
59
+ c.example = 'epm transact 0xd6e96ee6661367735c15894193bdca276bae27ba newthread 0x0 0x0 0x65ef13e5f4515ee346e5372c4021baa7a723f25a'
44
60
  c.action do |args|
45
61
  EPM.transact(args)
46
62
  print "Transaction Sent.\n"
@@ -49,7 +65,11 @@ end
49
65
 
50
66
  command :query do |c|
51
67
  c.syntax = 'epm query'
52
- c.description = 'Query a storage position of a contract currently on the blockchain.'
68
+ # summary is displayed on --help
69
+ c.summary = 'Query a storage position of a contract currently on the blockchain.'
70
+ # description is deplayed on subcommand --help
71
+ c.description = 'Query a storage position of a contract currently on the blockchain. Accepts two arguments, the first argument is the contract to be queried, and the second argument is the storage location to be queried.'
72
+ c.example = 'epm query 0x65ef13e5f4515ee346e5372c4021baa7a723f25a 0xd6e96ee6661367735c15894193bdca276bae27ba'
53
73
  c.action do |args|
54
74
  print EPM.query(args) + "\n"
55
75
  end
@@ -57,7 +77,7 @@ end
57
77
 
58
78
  command :rpc do |c|
59
79
  c.syntax = 'epm rpc [method] [...args...]'
60
- c.description = 'RPC json query, keywords map to elements in it.'
80
+ c.description = 'Connect to eth and send any RPC command.'
61
81
  c.option '--a ADDRESS', String, 'Some address.'
62
82
  c.option '--x VALUE', String, 'Some value.'
63
83
  c.option '--s STRING', String, 'Some string, for lll, lll code.'
@@ -95,7 +115,6 @@ end
95
115
 
96
116
  command :restart do |c|
97
117
  c.syntax = 'epm restart'
98
- c.summary = ''
99
118
  c.description = 'Restart your default ethereum server.'
100
119
  c.action do
101
120
  print "Please be patient, this will take a few seconds.\n"
data/lib/epm/version.rb CHANGED
@@ -1 +1 @@
1
- VERSION ||= "0.3.11"
1
+ VERSION ||= "0.3.12"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Casey Kuhlman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-29 00:00:00.000000000 Z
11
+ date: 2014-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander