What is paction
paction is a command line tool to interact with smart contract for Ethereum.
You can use paction to deploy a smart contract, write data to a deployed contract, or read data from a deployed contract without writing a script.
Install
1. From source
git clone [email protected]:dapperlabs/paction.git
cd paction
npm start
2. Install globally (not available, until the package is published on npm)
npm install -g paction
Features
-
Interactive tool No need to remember any syntax of any config file, because there is no config file at all. paction gets the config and your choices by interactively asking you questions.
-
Support automation You can automate the process by saving your commands into a file, and pipe the file content to paction to execute.
-
Support contract deployment, read and write to a contract. paction uses standard JSON RPC calls for the above actions.
-
Offline mode Since paction is based on JSON PRC calls, it have the options for you to let it send the JSON RPC HTTP payload to a Ethereum Node, or print the payload and send it anytime by your own.
-
Support different signing methods for signing transactions paction allows you to sign a transaction by your own private key or by sending to a Ethereum node that has your private key. Or you can get the transaction data and sign externally using your own wallet.
-
Support different network paction supports mainnet and testnet (Rinkeby).
-
Dependencies paction tries to be as lightweight as possible, it only depends on 4 official ethereum javascript libraries (ethereumjs-tx, ethereumjs-util, web3, web3-eth-abi) and 1 popular http client library (axios).
How to run
export WEB3_URL=https://api.infura.io/v1/jsonrpc/rinkeby
paction
paction requires an environment variable: WEB3_URL
, which specifies the network. In the above example, the WEB3_URL
is pointing to a Rinkeby node hosted by infura, so paction needs to send transactions, it will send them to Rinkeby.
Examples
See here
Contributions
We welcome pull requests. To get started, just fork this repo, clone it locally, and run:
make install
source .env.example
make test
Please make pull requests against the develop
branch.