a straightforward library to build, sign, and broadcast ethereum transactions anywhere you can run ruby.
lib eth.rb v0.5.11 is a service release to increase performance and stability.
Full Changelog: https://github.com/q9f/eth.rb/compare/v0.5.10...v0.5.11
lib eth.rb v0.5.10 is a service release to increase performance and stability.
Client.resolve_ens
function (and properly resolve ens) https://github.com/q9f/eth.rb/pull/192
Client.transfer_erc20{,_and_wait}
function https://github.com/q9f/eth.rb/pull/197
full changelog: https://github.com/q9f/eth.rb/compare/v0.5.9...v0.5.10
lib eth.rb v0.5.9 is a service release to increase performance and stability.
Client.tx_succeeded?
and raises if a Client.transact_and_wait
reverts #173 #183 #186tx_succeeded?
by @a-moreira in https://github.com/q9f/eth.rb/pull/173
full changelog: https://github.com/q9f/eth.rb/compare/v0.5.8...v0.5.9
lib eth.rb v0.5.8 is a service release to increase performance and stability.
.transfer
function now requires to provide **kwargs instead of parameters:client.transfer("0c53FFA57Ec554451315c2568d22477dB8e71356", 1 * Eth::Unit::ETHER, sender_key: my_key)
full changelog: https://github.com/q9f/eth.rb/compare/v0.5.7...v0.5.8
lib eth.rb v0.5.7 is a service release to increase performance and stability.
payable
methods #137full changelog: https://github.com/q9f/eth.rb/compare/v0.5.6...v0.5.7
lib eth.rb v0.5.6 is a service release to increase performance and stability.
full changelog: https://github.com/q9f/eth.rb/compare/v0.5.5...v0.5.6
lib eth.rb v0.5.5 is a service release to increase performance and stability.
full changelog: https://github.com/q9f/eth.rb/compare/v0.5.4...v0.5.5
lib eth.rb v0.5.4 is a service release to increase performance and stability.
:warning: there is a breaking change introduced in the ::Contract
api, namely was replaced by ::Contract.create
.from_file
, .from_abi
, and .from_bin
. https://github.com/q9f/eth.rb/pull/83
lastly, this release adds eip 1271 support for smart-contract authentication, see ::Client.is_valid_signature
. https://github.com/q9f/eth.rb/pull/80
full changelog: https://github.com/q9f/eth.rb/compare/v0.5.3...v0.5.4
lib eth.rb v0.5.3 is a feature release adding support for smart contracts in ruby.
contract = Eth::Contract.create(file: 'spec/fixtures/contracts/dummy.sol')
# => #<Eth::Contract::Dummy:0x00007fbeee936598>
cli = Eth::Client.create "/tmp/geth.ipc"
# => #<Eth::Client::Ipc:0x00007fbeee946128 @gas_limit=21000, @id=0, @max_fee_per_gas=0.2e11, @max_priority_fee_per_gas=0, @path="/tmp/geth.ipc">
address = cli.deploy_and_wait(contract)
# => "0x2f2faa160420cee087ded96bad52475147136bd8"
cli.transact_and_wait(contract, "set", 1234)
# => "0x49ca4c0a5729da19a1d2574de9a444a9cd3219bdad81745b54f9cf3bb83b6a06"
cli.call(contract, "get")
# => 1234
full changelog: https://github.com/q9f/eth.rb/compare/v0.5.2...v0.5.3
lib eth.rb v0.5.2 is a feature release adding support for solidity compiler bindings.
solc = Eth::Solidity.new
# => #<Eth::Solidity:0x000055f05040c6d0 @compiler="/usr/bin/solc">
contract = solc.compile "spec/fixtures/contracts/greeter.sol"
# => {"Greeter"=>
# {"abi"=>
# [{"inputs"=>[{"internalType"=>"string", "name"=>"message", "type"=>"string"}], "stateMutability"=>"nonpayable", "type"=>"constructor"},
# {"inputs"=>[], "name"=>"greet", "outputs"=>[{"internalType"=>"string", "name"=>"", "type"=>"string"}], "stateMutability"=>"view", "type"=>"function"},
# {"inputs"=>[], "name"=>"kill", "outputs"=>[], "stateMutability"=>"nonpayable", "type"=>"function"}],
# "bin"=>
# "6080604052348015...6c634300080c0033"},
# "Mortal"=>
# {"abi"=>[{"inputs"=>[], "stateMutability"=>"nonpayable", "type"=>"constructor"}, {"inputs"=>[], "name"=>"kill", "outputs"=>[], "stateMutability"=>"nonpayable", "type"=>"function"}],
# "bin"=>
# "6080604052348015...6c634300080c0033"}}
now, contract["Greeter"]["bin"]
could be directly used to deploy the contract as Eth::Tx
payload.
full changelog: https://github.com/q9f/eth.rb/compare/v0.5.1...v0.5.2