Ethereum.rb Versions Save

Ethereum library for the Ruby language

2.5

4 years ago
  • Fixed Contract.nonce calculation
  • Fixed Transaction.mined?
  • Fix BigDecimal.new deprecation

2.4

4 years ago
  • Fix formatting error
  • Test with Ruby 2.7
  • Test with solidity 0.5.16

2.2

6 years ago

This release contains multiple little improvements and compatibility fixes:

  • Works with solc 0.4.21
  • Use pending transaction nonce as default (allows to send multiple transactions within one block)
  • Relaxed dependency to active record (allows to work with older active record versions)
  • Now testing against ruby 2.3, 2.4 and 2.5
  • Allow using a proxy for HttpClient
  • Fix call payload for empty args
  • Implement batch requests for HTTP client
  • Support for truffle
  • Updated readme

2.1.7

6 years ago

Compatibility fixes for solc 0.4.13 and parity 1.6.10 on Ubuntu.

2.1.0

7 years ago

Signed transactions

Ethereum.rb now supports signing transactions with key using ruby-eth gem.

To create a new key simply do the following:

key = Eth::Key.new

Then you can use the key to deploy contracts and send transactions, i.e.:

contract = Ethereum::Contract.create(file: "...")
contract.key = key
contract.deploy_and_wait("Allo Allo!")
contract.transact_and_wait.set("greeting", "Aloha!")

You can also transfer ether transfer using custom keys:

client.transfer(key, "0x342bcf27DCB234FAb8190e53E2d949d7b2C37411", amount)
client.transfer_and_wait(key, "0x949d7b2C37411eFB763fcDCB234FAb8190e53E2d", amount)

Url helpers for rails applications

Often in the application you want to link to blockchain explorer. This can be problematic if you want links to work with different networks (ropsten, mainnet, kovan) depending on environment you're working on. Following helpers will generate link according to network connected:

link_to_tx("See the transaction", "0x3a4e53b01274b0ca9087750d96d8ba7f5b6b27bf93ac65f3174f48174469846d")
link_to_address("See the wallet", "0xE08cdFD4a1b2Ef5c0FC193877EC6A2Bb8f8Eb373")

They use etherscan.io as a blockexplorer.

Note: Helpers work in rails environment only.

2.0.4

7 years ago

Coding and decoding dynamic arrays

This release introduces encoding and decoding function dynamic array arguments; small bug fixes and documentation improvements too.

2.0.3

7 years ago

This release introduces encoding and decoding function static array arguments, as well as number of bug fixes and documentation improvements.

2.0.2

7 years ago

Update to support parity 1.5.0 and solc 0.4.9.

2.0.1

7 years ago