Link is a scala.js example that demonstrate how to interact with an ethereum blockchain from scala code compiled to JS code and running within a browser. Starting from there you can develop you ethereum application in pure scala. Nice isn't it?
This application takes the web3 object either from a web3 capable browser (MIST, MetaMask, Parity...) if not it falls back using uport-connect. It lets the user query and transact with a contract deployed on the rinkeby ethereum test network. To get some test net ethers, go to the rinkeby faucet.
It is still a very early stage :). To test it:
sbt assemble # whenever you update the scala code cd truffle npm install # only the first time npm run dev
Now you can browse http://localhost:3000. You need a web3 enabled browser or metamask.
npm install -g ethereumjs-testrpc testrpc cd truffle truffle migrate --reset --network development
geth node on Rinkeby
cd docker docker-compose up --build docker exec -it docker_geth_1 geth attach ipc://root/.ethereum/rinkeby/geth.ipc
var address = personal.listAccounts address // copy paste this for rinkeby faucet
Visit Rinkeby faucet and follow their instructions to make your address (previously copied) known to their service.
Go back to your
eth.getBalance(address) // check you received the funds personal.unlockAccount(address)
Finally deploy the contract from a regular shell console:
cd ../truffle truffle migrate --reset --network rinkeby
rm -rf truffle/build
The mid term plan is to fully map the web3.js API.