基于区块链的毕业设计Elixir-Ethereum – 灵丹妙药以太坊

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Elixir-Ethereum – 灵丹妙药以太坊 是一篇很好的国外资料

Elixir-Ethereum

Elixir interface to Ethereum JSON-RPC w/smart contract support

This library presents a convenient interface to control one or more Ethereum nodes using the Elixir programming language. It abstracts away the need to deal with the JSON-RPC API directly and handles hex encoding/decoding when needed.

Functions return the idiomatic {:ok, data} | {:error, reason} tuples whenever possible. The goal is to cover the entire JSON-RPC API of the standard Geth implemetation.

This project aims to have @specs for every function and is using Dialyzer + ExUnit for testing/linting.

Recent Additions:

  • Smart Contract deployment
  • ABI registration
  • Filter registration
  • Tx receipt retrieval
  • Token

Pull requests welcomed. This library also includes some of the more commonly used “admin” and “personal” API functions which will require the node to be started with --rpcapi "db,eth,net,web3,personal". The sensitive interfaces should only be done in a safe network environment if at all.

Examples of Currently Implemented JSON-RPC methods

iex> Ethereum.client_version {:ok, "v1.6.5-stable-cf87713d/darwin-amd64/go1.8.3"}  iex> Ethereum.sha3("0x68656c6c6f20776f726c64") {:ok, "47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"}  iex> Ethereum.net_version {:ok, "1"}  iex> Ethereum.peer_count {:ok, "19"}  iex> Ethereum.listening {:ok, true}  iex> Ethereum.protocol_version {:ok, 63}  iex> Ethereum.syncing {:ok, false}  iex> Ethereum.coinbase {:ok, "78fc2b9b6cf9b18f91037a5e0e074a479be9dca1"}  iex> Ethereum.mining {:ok, true}  iex> Ethereum.hashrate {:ok, "0"}  iex> Ethereum.gas_price {:ok, 22061831512}  iex> Ethereum.accounts {:ok, ["0x78fc2b9b6cf9b18f91037a5e0e074a479be9dca1",   "0x141feb71895530f537c847d62f039d9be895bd35",   "0xe55c5bb9d42307e03fb4aa39ccb878c16f6f901e",   "0x50172f916cb2e64172919090af4ff0ba4638d8dd"]}  iex> Ethereum.block_number {:ok, 3858216}  iex> Ethereum.get_balance("0xfE8bf4ca8A6170E759E89EDB5cc9adec3e33493f") # Donations accepted :-) {:ok, 0.4650075166583676}  iex> Ethereum.transaction_count("0xfE8bf4ca8A6170E759E89EDB5cc9adec3e33493f") {:ok, 3858216}  iex> Ethereum.new_account("h4ck3r", "h4ck3r") {:ok, "50172f916cb2e64172919090af4ff0ba4638d8dd"}  iex> Ethereum.unlock_account("0xe55c5bb9d42307e03fb4aa39ccb878c16f6f901e", "h4ck3r") {:ok, true}  iex> Ethereum.lock_account("0xe55c5bb9d42307e03fb4aa39ccb878c16f6f901e") {:ok, true}  iex> Ethereum.send_transaction("0xe55c5bb9d42307e03fb4aa39ccb878c16f6f901e", "0xfE8bf4ca8A6170E759E89EDB5cc9adec3e33493f", 0.00043, "h4ck3r") {:ok, "88c646f79ecb2b596f6e51f7d5db2abd67c79ff1f554e9c6cd2915f486f34dcb"} 

Complete list of currently implemeted features:

Eth Namespace Functions

- defdelegate get_transaction_by_hash(hash), to: Eth - defdelegate get_transaction_receipt_by_hash(hash), to: Eth - defdelegate get_block_by_hash(hash, full_txns), to: Eth - defdelegate get_block_by_number(number, full \ false), to: Eth - defdelegate get_balance(account_hash), to: Eth - defdelegate protocol_version(), to: Eth - defdelegate syncing(), to: Eth - defdelegate coinbase(), to: Eth - defdelegate mining(), to: Eth - defdelegate hashrate(), to: Eth - defdelegate gas_price(), to: Eth - defdelegate accounts(), to: Eth - defdelegate block_number(), to: Eth - defdelegate transaction_count(hash), to: Eth - defdelegate get_filter_changes(hash), to: Eth - defdelegate eth_call(params), to: Eth - defdelegate eth_send(transaction), to: Eth, as: - :eth_send_transaction - defdelegate uninstall_filter(id), to: Eth - defdelegate new_filter(map), to: Eth 

Web3 Namespace Functions

- defdelegate client_version(), to: Web3 - defdelegate sha3(str), to: Web3 

Net Namespace Functions

- defdelegate version(), to: Net - defdelegate peer_count(), to: Net - defdelegate listening(), to: Net 

Personal Namespace Functions

- defdelegate new_account(password, password_confirmation), to: Personal - defdelegate unlock_account(account, password), to: Personal - defdelegate lock_account(account), to: Personal - defdelegate send_transaction(from, to, amount, password), to: Personal 

Aggregate/Stats Functions

- defdelegate get_recent_averages(sample_size), to: Aggregates - defdelegate get_recent_blocks(sample_size), to: Aggregates - defdelegate get_recent_blocktimes(sample_size), to: Aggregates - defdelegate get_recent_blocks_with_blocktimes(sample_size), to: Aggregates - defdelegate get_recent_transactions_per_block(sample_size), to: Aggregates - defdelegate get_average_blocktime(blocks), to: Aggregates - defdelegate get_average_difficulty(blocks), to: Aggregates 

Encoding + Utils

- defdelegate unhex(str), to: HexUtils - defdelegate to_hex(str), to: HexUtils - defdelegate is_valid_address?(address), to: HexUtils - defdelegate hex_to_decimal(hex_string), to: HexUtils 

ABI Functions

defdelegate load_abi(file), to: ABI defdelegate reformat_abi(abi), to: ABI defdelegate abi_method_signature(abi, name), to: ABI, as: :method_signature defdelegate encode_abi_event(signature), to: ABI, as: :encode_event defdelegate encode_abi_data(signature), to: ABI, as: :encode_data defdelegate encode_abi_options(options, keys), to: ABI, as: :encode_options defdelegate encode_abi_option(value), to: ABI, as: :encode_option defdelegate encode_abi_method_call(abi, name, input), to: ABI, as: :encode_method_call defdelegate decode_abi_data(types_signature, data), to: ABI, as: :decode_data defdelegate decode_abi_output(abi, name, output), to: ABI, as: :decode_output defdelegate decode_abi_event(data, signature), to: ABI, as: :decode_event defdelegate abi_keys_to_decimal(map, keys), to: ABI, as: :keys_to_decimal 

Installation

hex.pm

If [available in Hex](https://hex.pm/docs/publish), the package can be installed by adding `esprezzo_ethereum` to your list of dependencies in `mix.exs`: def deps do   [{:esprezzo_ethereum, "~> 0.1.0"}] end  Right now you should use the Github: def deps do   [{:esprezzo_ethereum, "GITHUB_ADDRESS"}] end

Documentation can be generated with ExDoc

We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products. Learn more.


网络命名空间函数六角pm

基本cookies
始终处于活动状态
分析cookies
  • 智能合约部署
  • ABI注册
  • 过滤注册
  • 发送回执检索
  • 令牌
  • 基本cookies

    这个库提供了一个方便的接口,可以使用Elixir编程语言控制一个或多个以太坊eth节点。它抽象了直接处理JSON-RPC API的需要,并在需要时处理十六进制编码/解码。

    函数尽可能返回惯用的{:ok,data}{:error,reason}元组。目标是覆盖标准Geth实现的整个JSON-rpcapi。

    该项目旨在为每项功能制定@规格,并使用透析器+ExUnit进行测试/梳理。

    始终处于活动状态

    • 智能合约部署
    • ABI注册
    • 过滤注册
    • 发送回执检索
    • 令牌

    欢迎拉取请求。这个库还包括一些更常用的“admin”和“personal”API函数,这些函数要求节点以–rpcapi“db,eth,net,web3,personal”开头。敏感接口只能在安全的网络环境中进行。

    分析cookies

    iex> Ethereum.client_version {:ok, "v1.6.5-stable-cf87713d/darwin-amd64/go1.8.3"}  iex> Ethereum.sha3("0x68656c6c6f20776f726c64") {:ok, "47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"}  iex> Ethereum.net_version {:ok, "1"}  iex> Ethereum.peer_count {:ok, "19"}  iex> Ethereum.listening {:ok, true}  iex> Ethereum.protocol_version {:ok, 63}  iex> Ethereum.syncing {:ok, false}  iex> Ethereum.coinbase {:ok, "78fc2b9b6cf9b18f91037a5e0e074a479be9dca1"}  iex> Ethereum.mining {:ok, true}  iex> Ethereum.hashrate {:ok, "0"}  iex> Ethereum.gas_price {:ok, 22061831512}  iex> Ethereum.accounts {:ok, ["0x78fc2b9b6cf9b18f91037a5e0e074a479be9dca1",   "0x141feb71895530f537c847d62f039d9be895bd35",   "0xe55c5bb9d42307e03fb4aa39ccb878c16f6f901e",   "0x50172f916cb2e64172919090af4ff0ba4638d8dd"]}  iex> Ethereum.block_number {:ok, 3858216}  iex> Ethereum.get_balance("0xfE8bf4ca8A6170E759E89EDB5cc9adec3e33493f") # Donations accepted :-) {:ok, 0.4650075166583676}  iex> Ethereum.transaction_count("0xfE8bf4ca8A6170E759E89EDB5cc9adec3e33493f") {:ok, 3858216}  iex> Ethereum.new_account("h4ck3r", "h4ck3r") {:ok, "50172f916cb2e64172919090af4ff0ba4638d8dd"}  iex> Ethereum.unlock_account("0xe55c5bb9d42307e03fb4aa39ccb878c16f6f901e", "h4ck3r") {:ok, true}  iex> Ethereum.lock_account("0xe55c5bb9d42307e03fb4aa39ccb878c16f6f901e") {:ok, true}  iex> Ethereum.send_transaction("0xe55c5bb9d42307e03fb4aa39ccb878c16f6f901e", "0xfE8bf4ca8A6170E759E89EDB5cc9adec3e33493f", 0.00043, "h4ck3r") {:ok, "88c646f79ecb2b596f6e51f7d5db2abd67c79ff1f554e9c6cd2915f486f34dcb"} 

    Complete list of currently implemeted features:

    Eth Namespace Functions

    - defdelegate get_transaction_by_hash(hash), to: Eth - defdelegate get_transaction_receipt_by_hash(hash), to: Eth - defdelegate get_block_by_hash(hash, full_txns), to: Eth - defdelegate get_block_by_number(number, full \ false), to: Eth - defdelegate get_balance(account_hash), to: Eth - defdelegate protocol_version(), to: Eth - defdelegate syncing(), to: Eth - defdelegate coinbase(), to: Eth - defdelegate mining(), to: Eth - defdelegate hashrate(), to: Eth - defdelegate gas_price(), to: Eth - defdelegate accounts(), to: Eth - defdelegate block_number(), to: Eth - defdelegate transaction_count(hash), to: Eth - defdelegate get_filter_changes(hash), to: Eth - defdelegate eth_call(params), to: Eth - defdelegate eth_send(transaction), to: Eth, as: - :eth_send_transaction - defdelegate uninstall_filter(id), to: Eth - defdelegate new_filter(map), to: Eth 

    Web3 Namespace Functions

    - defdelegate client_version(), to: Web3 - defdelegate sha3(str), to: Web3 

    Net Namespace Functions

    - defdelegate version(), to: Net - defdelegate peer_count(), to: Net - defdelegate listening(), to: Net 

    Personal Namespace Functions

    - defdelegate new_account(password, password_confirmation), to: Personal - defdelegate unlock_account(account, password), to: Personal - defdelegate lock_account(account), to: Personal - defdelegate send_transaction(from, to, amount, password), to: Personal 

    Aggregate/Stats Functions

    - defdelegate get_recent_averages(sample_size), to: Aggregates - defdelegate get_recent_blocks(sample_size), to: Aggregates - defdelegate get_recent_blocktimes(sample_size), to: Aggregates - defdelegate get_recent_blocks_with_blocktimes(sample_size), to: Aggregates - defdelegate get_recent_transactions_per_block(sample_size), to: Aggregates - defdelegate get_average_blocktime(blocks), to: Aggregates - defdelegate get_average_difficulty(blocks), to: Aggregates 

    Encoding + Utils

    - defdelegate unhex(str), to: HexUtils - defdelegate to_hex(str), to: HexUtils - defdelegate is_valid_address?(address), to: HexUtils - defdelegate hex_to_decimal(hex_string), to: HexUtils 

    ABI Functions

    defdelegate load_abi(file), to: ABI defdelegate reformat_abi(abi), to: ABI defdelegate abi_method_signature(abi, name), to: ABI, as: :method_signature defdelegate encode_abi_event(signature), to: ABI, as: :encode_event defdelegate encode_abi_data(signature), to: ABI, as: :encode_data defdelegate encode_abi_options(options, keys), to: ABI, as: :encode_options defdelegate encode_abi_option(value), to: ABI, as: :encode_option defdelegate encode_abi_method_call(abi, name, input), to: ABI, as: :encode_method_call defdelegate decode_abi_data(types_signature, data), to: ABI, as: :decode_data defdelegate decode_abi_output(abi, name, output), to: ABI, as: :decode_output defdelegate decode_abi_event(data, signature), to: ABI, as: :decode_event defdelegate abi_keys_to_decimal(map, keys), to: ABI, as: :keys_to_decimal 

    Installation

    hex.pm

    If [available in Hex](https://hex.pm/docs/publish), the package can be installed by adding `esprezzo_ethereum` to your list of dependencies in `mix.exs`: def deps do   [{:esprezzo_ethereum, "~> 0.1.0"}] end  Right now you should use the Github: def deps do   [{:esprezzo_ethereum, "GITHUB_ADDRESS"}] end

    可使用ExDoc生成文档

    我们使用可选的第三方分析Cookie了解您如何使用GitHub.com网站所以我们可以制造更好的产品。了解更多。

    部分转自网络,侵权联系删除区块链源码网

    www.interchains.cc

    https://www.interchains.cc/18137.html

    区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 !
    区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Elixir-Ethereum – 灵丹妙药以太坊

    提供最优质的资源集合

    立即查看 了解详情