etherts / ewasm-as

Ethereum-flavored WebAssembly AssemblyScript API
MIT License
9 stars 0 forks source link

Truffle integration #1

Open lrettig opened 6 years ago

lrettig commented 6 years ago

Requires #7

I'm stuck on the issue that truffle and cpp-ethereum (aleth) don't play nice, even regardless of Ewasm. When I try to deploy+test a basic truffle unboxed solidity contract onto my local aleth instance, I get the following RPC errors:

2018-08-01 21:40:14  rpc {"error":{"code":0,"data":null,"message":"Unknown account."},"id":14,"jsonrpc":"2.0"}
2018-08-01 21:40:14  rpc {"error":{"code":-32602,"message":"INVALID_PARAMS: Invalid method parameters (invalid name and/or type) recognised"},"id":1533174014721,"jsonrpc":"2.0"}

Full trace: https://gist.github.com/lrettig/63d7e941946a313ec460c6484cecfc82

Cf. https://github.com/ethereum/cpp-ethereum/issues/5160

lrettig commented 6 years ago

Worked around the "Unknown account" issue (see ethereum/cpp-ethereum#5160). aleth is kinda sorta working with truffle for vanilla solc, on to trying to get it working with an Ewasm contract.

nweller commented 5 years ago

Worked around the "Unknown account" issue (see ethereum/aleth#5160). aleth is kinda sorta working with truffle for vanilla solc, on to trying to get it working with an Ewasm contract.

Is your work on this already available somewhere or could you make it available?

For a solc compiler testing framework (SOLTIX), I'd like to add an option to use aleth instead of ganache-cli as a truffle blockchain backend. Ideally I'd like to have a self-contained shell script that starts an aleth instance which plays well with truffle for simple contract deployments, transactions, and listing emited events. A kinda sorta working setup for vanilla solc would be a great starting point.

Thanks!