Common lisp wrapper around ethereum's JSON RPC API. Interact with the ethereum blockchain from your common lisp program!
The api is completely 1-to-1 with the one found here except that it follows the following convention:
- it converts
_
inside method names with/
- it converts camel case method names with kebab-case.
So for example web3_clientVersion
becomes web3/client-version
.
If you have any doubts for a method name, just take a look at the exported symbols inside src/ethi.lisp
. Or just paste in the REPL:
(let ((lst ()))
(do-external-symbols (s (find-package 'ethi) lst)
(push s lst))
lst)
To run the tests locally you will need to run a local private testnet.
- Install
geth
cd
to the project's directory and start it with:
geth --rpc --nodiscover --maxpeers 0 --datadir "t/" init t/CustomGenesis.json
geth --nodiscover --maxpeers 0 --rpc --datadir t/client-data --networkid 555 --unlock "0,1" --password t/password.txt console
--rpc
enables the rpc. Duh...--nodiscover
will make sure your node is not discoverable.--maxpeers 0
will prevent the node from syncing.init t/CustomGenesis.json
will ensure you create a custom testing blockchain.--unlock "0,1"
will unlock the first two accounts--password
will use the password provided in the text fileconsole
will open the console
- Run
(asdf:test-system :ethi)
inside your repl. I am assuming you cloned the project in a directory thatasdf
can see.
See the official instructions for further reading on how to setup a local private testnet.