I started from the beginning to make sure my success was reproducible (at least on my machine!).
Here's a summary of the steps, and keep in mind that I'm on macOS:
$ brew install nim
$ pip install web3
$ git clone https://github.com/status-im/nimplay.git
$ cd nimplay
$ make get-nimclang-docker
$ git submodule update --init
$ make get-wabt
$ make tools
$ nim c -d:release -p:./vendor/nimcrypto -p:./vendor/stint -p:./vendor/nim-stew/ --out:./tools/abi_gen ./tools/abi_gen.nim
$ make examples
In one terminal I setup embark demo
and in the embark_demo
directory I run docker run ...
per the README in my geth-hera-docker
repo.
In another terminal in the embark_demo
directory I run embark run --nobrowser
.
In another terminal I cat
and copy the one wallet in embark_demo/.embark/development/datadir/keystore
and then in a node REPL with web3 loaded I do:
> web3.eth.accounts.decrypt('...', '')
Where ...
is the pasted wallet. Next, I need to copy the private key and put it in .priv_key_hex
inside the nimplay directory. To make sure it doesn't have a newline at the end (which seems to cause a problem) I use the -e
flag for echo
and add \c
at the end of the string:
$ echo -e "...\c" > .priv_key_hex
Where ...
is the pasted private key (with leading 0x
).
Ready to deploy!
$ export RPC_URL=http://localhost:8545
$ ./tools/deploy.py ./examples/king_of_the_hill.wasm
In the terminal running docker run ...
I see something like this:
INFO [09-29|16:32:55.532] Submitted contract creation fullhash=0xa424d94ec8a9278a64c87fb4bd138361d85041646065919716da5aff6e32266a contract=0x11a918aBEbf4Dc3B3761164BD1c771C91095d18f
Because I have multiple python versions installed, I had to use
pip3 install web3
.