Ethereum represents one of the most interesting technological developments in the past few years, taking the fundamental principles of a blockchain, and allowing executable “contracts” to be written. These contracts can be relatively simple but also incredibly powerful.

This post will walk you through setting up a development environment so that you can deploy and test your own smart contracts on the Ethereum test blockchain (“Ropsten”).

Installing Parity

Parity is a fast Ethereum browser, a tool which allows you to interact with the blockchain. On my laptop at least, it is significantly faster to synchronise and use than geth, which is probably the “standard” tool for interacting with the Ethereum blockchain.

To install for your platform, follow the instructions on the Parity site. If you use Mac OSX or Ubuntu, this is as simple as running the following command:

bash <(curl https://get.parity.io -Lk)

Connecting to the Ropsten testnet

To run Parity and connect to the testnet, use the following command:

parity — chain=ropsten

You’ll see a stream of stuff fly by in the terminal as Parity connects to the testnet, and starts the process of synchronising the blockchain. This might take a while…but rest assured it’s much faster than using the Ethereum Wallet app.

While you wait, you can still get started using Parity through its lovely web interface.

Setting up Parity

Parity comes with a really nice, fully featured web interface. This allows you to view and create wallets (where you keep your Ether), interact with other apps and to create or interact with Contracts.

By default, the parity web interface should be available at http://127.0.0.1:8180

The Parity web interface

When you first launch the web interface, it will guide you through creating a wallet. Use a strong password, but remember as this is on the testnet, the Ether you collect here aren’t anywhere near as valuable as “real” Ether.

Get some testnet Ether

To deploy and interact with a Contract on the blockchain (testnet or otherwise) you’ll need some Ether. Getting Ether on the testnet is a little easier than on the main blockchain, and there are a couple of options:

  • Try and find a working testnet faucet — you’ll enter your wallet address and (hopefully) receive some Ether
  • Ask nicely in the Ethereum gitter chat
  • Set up Ethminer to mine for some Ether

After a bit of time trying the first two options, I resolved to mine my own Ether, and it wasn’t too hard.

Setting up Ethminer

Ethminer is a separate tool which talks to the blockchain via Parity with the aim of validating the transactions that occur. As a reward for validating the transactions, you will occasionally receive some Ether. It’s not super quick to receive the Ether, but it’s pretty quick to setup, so I just left it for a few hours and came back to almost 100 Ether in my wallet. WooHoo!

To install in Ubuntu:

sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum ethminer

Now, to get everything hooked up, you’ll need to run a slightly modified Parity command. First, make a note of the wallet address you created in the web interface. Now restart parity using the following:

parity — chain=ropsten --rpc --author=<your_wallet_address>

Now in a new terminal window start ethminer:

ethminer -G

Note: The -G option enables GPU mining, which speeds it up. However, this does assume you have a suitable card and have set up your using the appropriate graphics card drivers etc. If it doesn’t work, try again without the -G.

Ethminer doing some mining

Again, you’ll see a wall of stuff stream past — this is ethminer starting to do its business. I left it for a few hours and came back to some Ether.

Writing a contract

Once you have some Ether, you can stop mining and start writing!

Parity has a built in contract development tool, which is pretty nice. Make sure you can see it by going first to the Settings in the Parity web interface and ensuring it is enabled.

Parity settings

Now you can go to the Contracts tab, hit the Develop button and you’re ready to go!

Developing an example smart contract

As for what to write, that’s for another article. You can get started with your own cryptocurrency and learning more about Solidity, one of the languages used to programme smart contracts. But you now have all the tools and some Ether!

原文地址:https://medium.com/@joshua_e_k/setting-up-ethereum-smart-contract-development-using-parity-on-ubuntu-abca4da3dce2

Setting up Ethereum smart contract development using Parity on Ubuntu相关推荐

  1. 《Smart Contract Development: Challenges and Opportunities》论文笔记

     论文地址:下载地址  年份:2019  这篇论文主要的工作时,开展了一个探索性的研究,调查统计了区块链中的智能合约(只要针对以太坊:最受欢迎的针对智能合约的区块链平台)存在的挑战与问题,和开发者们对 ...

  2. Using APIs in Your Ethereum Smart Contract with Oraclize

    原文地址:https://medium.com/coinmonks/using-apis-in-your-ethereum-smart-contract-with-oraclize-956564342 ...

  3. Smart contract security Papers---智能合约安全论文

    友情提示:原创博客,禁止转载,谢谢配合 [CCS'22]Towards Automated Safety Vetting of Smart Contracts in Decentralized App ...

  4. 使用Node.js部署智能合約(Smart Contract)

    從智能合約原始檔.編譯.部署,一氣呵成 我想大部分的人應該都是為了寫智能合約(Smart Contract)而選擇使用Ethereum,在開發應用程式(Dapp)時,若能透過程式碼自動部署智能合約,就 ...

  5. 如何编写智能合约(Smart Contract)?(II)建立加密代币

    如何编写智能合约(Smart Contract)?(II)建立加密代币 接着上一篇如何编写智能合约(Smart Contract)?,本篇文章,我们将写一个简单的加密代币的智能合约来给大家诠释加密代币 ...

  6. Reversing Ethereum Smart Contracts: Part 2

    In my previous tutorial, we began reversing engineering the Greeter.sol contract. Specifically, we l ...

  7. Understanding Ethereum Smart Contracts

    You might have heard the term "smart contract," and you might even know that they are &quo ...

  8. 智能合约Smart Contract技术详解

    文章目录 合约编写 基本介绍 构造方法 ipfs mint 提现 白名单 合约 前端 部署 验证合约代码 前端和合约交互 准备工作 获取已经mint了的数量 mint 合约编写 建议读者先了解下sol ...

  9. Smart Contract Vulnerabilities:Vulnerable Does Not Imply Exploited总结

    Smart Contract Vulnerabilities: Vulnerable Does Not Imply Exploited Usenix Security A 2021 研究背景 通过调查 ...

最新文章

  1. java B2B2C电子商务平台分析之十一------配置中心和消息总线
  2. 鸿蒙之后华为把欧拉也捐了,还承诺不做欧拉商用发行版
  3. OpenCV下利用傅里叶变换和逆变换实现图像卷积算法,并附自己对于卷积核/模板核算子的理解
  4. 常用MySQL数据库命令
  5. python笔记之正则表达式
  6. allegro标注尺寸设置_标注新升级 | SOLIDWORKS 2020新功能揭秘
  7. android 系统(99)---MTK 平台系统重启分类
  8. java的printf语法_Java中printf的用法总结
  9. 关于BeanUtils.copyProperties的用法和优缺点
  10. 详说sizeof与strlen的区别与联系
  11. 西狐爱墙:为中国祈福!
  12. TIA安装GSD文件
  13. 单片机仿真软件proteus8安装与使用
  14. 淘宝返利公众号开发、淘宝联盟API权限申请及对接详细教程
  15. 门户前浪退市,从此只做“新浪”
  16. DHCP服务器搭建操作步骤
  17. 计算机所有计算都是在内存,计算机的所有计算都是在内存中进行的
  18. Dubbo源码分析(一):Dubbo源码的结构概述
  19. feded计算机音乐,Romeo And Jazzie/Alan Walker《Faded Refix》[FLAC/MP3-320K]
  20. 企业管理软件从勤哲excel服务器迁移到奥多odoo的感触

热门文章

  1. POJ 1753 Flip Game DFS枚举
  2. Java语言基础--字符串
  3. R学习_multitaper包解析2:子函数spec.mtm.dpss,dpssHelper
  4. Linux常用命令集锦
  5. linux库函数mmap()原理及用法详解
  6. linux 开机启动文件夹,Linux开机启动流程
  7. 修改$_env php,Laravel如何友好的修改.env配置文件详解
  8. KKT条件和拉格朗日乘子法
  9. 云炬金融每日一题20210906
  10. 十二、“最是真心藏不住,一言一语总关情。”(2021.2.11)