From b9f44fb43fdce65be79d39934fabc5003f65c216 Mon Sep 17 00:00:00 2001 From: Lane Rettig Date: Wed, 14 Nov 2018 21:32:49 -0500 Subject: [PATCH 1/3] Add instructions on truffle Including truffle-hdwallet-provider per #97 --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 61378d7..7e6d223 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,33 @@ The team also hosts a (roughly) fortnightly public "Ewasm community hangout" cal ## Writing and compiling smart contracts +### Solidity/EVM + +You can deploy smart contracts written in Solidity and targeting EVM to the Ewasm testnet by using Truffle, just as you do with the Ethereum mainnet, testnets, and testrpc (Ganache). First, install [`truffle-hdwallet-provider`](https://github.com/trufflesuite/truffle-hdwallet-provider) as follows (note the specific release): + +``` +> npm install --save truffle-hdwallet-provider@web3-one +``` + +You'll want to use a `truffle.js` such as the following: + +```javascript +var HDWalletProvider = require("truffle-hdwallet-provider"); + +module.exports = { + networks: { + ewasm: { + network_id: "*", + provider: () => new HDWalletProvider("PRIVATE_KEY", "http://ewasm.ethereum.org:8545"), + }, + } +}; +``` + +Replace `PRIVATE_KEY` with the appropriate private key for the account you used to tap the faucet, above. After doing this, the usual truffle commands (such as `truffle migrate --network ewasm`) should work. + +### Other languages + One of the [design goals](https://github.com/ewasm/design/blob/master/rationale.md) of the Ewasm project is to support smart contract development in a wide range of languages, using a range of tooling, including existing, mature toolchains such as LLVM (C/C++, Kotlin, Rust, and [many others](https://en.wikipedia.org/wiki/LLVM)) and JavaScript/TypeScript. In theory, any language that can be compiled to Wasm can be used to write a smart contract (as long as it implements the [contract interface](https://github.com/ewasm/design/blob/master/contract_interface.md) and [Ethereum interface](https://github.com/ewasm/design/blob/master/eth_interface.md)). See [awesome-wasm-langs](https://github.com/appcypher/awesome-wasm-langs) for a list of such languages. At present, we've developed support for the following languages and toolchains: From 78aba116904890e44f1e6603e2088f5633f4d976 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 26 Nov 2018 14:50:37 +0000 Subject: [PATCH 2/3] Add remark about Solidity --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7e6d223..99a2473 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ The team also hosts a (roughly) fortnightly public "Ewasm community hangout" cal ### Solidity/EVM +As of November 2018 Solidity is not capable of outputting Ewasm bytecode - however it is on the Solidity roadmap to support Ewasm. Given the Ewasm testnet is capable of running EVM bytecode it is possible to use Solidity as a contract language. + You can deploy smart contracts written in Solidity and targeting EVM to the Ewasm testnet by using Truffle, just as you do with the Ethereum mainnet, testnets, and testrpc (Ganache). First, install [`truffle-hdwallet-provider`](https://github.com/trufflesuite/truffle-hdwallet-provider) as follows (note the specific release): ``` From cbba5be1a41ce2c3c73868e6bda1e143a7e0142f Mon Sep 17 00:00:00 2001 From: Lane Rettig Date: Mon, 26 Nov 2018 15:06:52 +0000 Subject: [PATCH 3/3] Minor cleanup Clean up some of the language around Solidity, and bold text about hdwallet provider version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 99a2473..dfbadf1 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,9 @@ The team also hosts a (roughly) fortnightly public "Ewasm community hangout" cal ### Solidity/EVM -As of November 2018 Solidity is not capable of outputting Ewasm bytecode - however it is on the Solidity roadmap to support Ewasm. Given the Ewasm testnet is capable of running EVM bytecode it is possible to use Solidity as a contract language. +Solidity is not currently capable of outputting Ewasm bytecode. However, Ewasm support is on the Solidity roadmap. Given that the Ewasm testnet is capable of running EVM bytecode it is possible to use Solidity as a contract language. -You can deploy smart contracts written in Solidity and targeting EVM to the Ewasm testnet by using Truffle, just as you do with the Ethereum mainnet, testnets, and testrpc (Ganache). First, install [`truffle-hdwallet-provider`](https://github.com/trufflesuite/truffle-hdwallet-provider) as follows (note the specific release): +You can deploy smart contracts written in Solidity and targeting EVM to the Ewasm testnet by using Truffle, just as you do with the Ethereum mainnet, testnets, and testrpc (Ganache). First, install [`truffle-hdwallet-provider`](https://github.com/trufflesuite/truffle-hdwallet-provider) as follows (**note the specific release**, `@web3-one`): ``` > npm install --save truffle-hdwallet-provider@web3-one