Releases: q9f/eth.rb
lib eth.rb v0.5.14
lib eth.rb 0.5.14 is a feature release.
Packed Solidity Encoding
This release ships the packed solidity encoder enabling smart contract interactions that require tightly packed encoding.
types = ["int16", "bytes1", "uint16", "string"]
values = [
-1, "\B", 0x03, "Hello, world!",
]
Eth::Abi.solidity_packed(types, values)
# => "ffff42000348656c6c6f2c20776f726c6421"
Unlike standard ABI coding, which includes type-specific padding and length prefixes, packed encoding concatenates values directly without extra metadata.
EIP-7702 type-4 transactions
This release implements EIP-7702 transactions, including authorization lists.
auth_list = [
Tx::Eip7702::Authorization.new(
chain_id: 31337,
address: "700b6a60ce7eaaea56f065753d8dcb9653dbad35",
nonce: 2,
recovery_id: 0,
r: "a4f2c5243c3d6d82168ef35b3d3df1e50cefee1bc212c769bd1968061c395260",
s: "7f346c1804300b96d687a90ce5bcea0883c12bc45b6a8a294e29ff7c02b42a65",
),
Tx::Eip7702::Authorization.new(
chain_id: Chain::ETHEREUM,
address: "700b6a60ce7eaaea56f065753d8dcb9653dbad35",
nonce: 11,
r: "acec76e844690cf2f58317d13d910b270cf0b9e307db8094402dc46b4f456a81",
s: "570d6ea163a505896aa2674d56810033cd4d03b13787065b5abe57cde485e52a",
recovery_id: 0,
)]
Tx.new({
# ...
authorization_list: auth_list,
# ...
})
EIP-7702 introduces transaction type 0x04
, and it’s part of the proposal to support Ethereum accounts that can temporarily become smart contracts. This is tied to "transient smart contract accounts", an evolution toward more flexible account abstraction.
What's Changed
- docs: update changelog by @q9f in #304
- gem: bump version to 0.5.14 by @q9f in #305
- ci: update ruby version by @q9f in #307
- spec: switch from infura to drpc by @q9f in #308
- build(deps): bump JamesIves/github-pages-deploy-action from 4.7.1 to 4.7.2 by @dependabot in #309
- gem: update copyright headers by @q9f in #312
- eth/abi: implement packed encoder by @q9f in #310
- docs: update README.md by @eltociear in #314
- Update README.md by @rojotek in #317
- Updated nesting of describe blocks in the EIP-1559 spec. by @rojotek in #318
- spec/solidity: mute system call output by @q9f in #319
- eth/eip712: prepare tests for packed encoding by @q9f in #216
- build(deps): bump JamesIves/github-pages-deploy-action from 4.7.2 to 4.7.3 by @dependabot in #327
- spec/client: don't require any rpc api token for tests by @q9f in #326
- Move the tests that are failing due to a geth upgrade to pending by @rojotek in #330
- spec/client: fix nonce too low error handling in spec by @q9f in #331
- Add support for EIP-7702 transactions by @rojotek in #320
- Add ability to decode event parameters using ABI reference. by @bogdan in #328
- chore: run rufo, add docs by @q9f in #332
New Contributors
- @eltociear made their first contribution in #314
- @rojotek made their first contribution in #317
- @bogdan made their first contribution in #328
Full Changelog: v0.5.13...v0.5.14
lib eth.rb v0.5.13
lib eth.rb v0.5.13 is a service release to increase performance and stability.
What's Changed
- gem: bump version to 0.5.13 by @q9f in #281
- Fix undefined method `raise_error' for an instance of Eth::Tx::Eip1559 (NoMethodError) by @RogerPodacter in #282
- eth/chain: update list of chains by @q9f in #283
- eth/client: always return hash even if transaction didn't succeed by @q9f in #284
- build(deps): bump JamesIves/github-pages-deploy-action from 4.6.1 to 4.6.3 by @dependabot in #288
- build(deps): bump JamesIves/github-pages-deploy-action from 4.6.3 to 4.7.1 by @dependabot in #294
- build(deps): bump codecov/codecov-action from 4 to 5 by @dependabot in #295
- Adds support to check for the ethereum "null/zero address" by @mattrasband in #296
- eth/address: rename null address to zero address by @q9f in #297< 8000 /a>
- eth/util: fix single-byte hex-string nibbles by @q9f in #298
- eth/tx: only enforce block gas limit on mainnet by @q9f in #299
- eth/chain: update ids by @q9f in #300
- eth/api: update to latest available go-ethereum apis by @q9f in #301
- ci: fix codecov uploader by @q9f in #302
- spec: update ethereum/tests fixtures by @q9f in #303
New Contributors
- @RogerPodacter made their first contribution in #282
- @mattrasband made their first contribution in #296
Full Changelog: v0.5.12...v0.5.13
lib eth.rb v0.5.12
lib eth.rb v0.5.12 is a service release to increase performance and stability.
what's changed
- build(deps): bump actions/checkout from 3 to 4 by @dependabot in #246
- ci: unpatch geth by @q9f in #248
- eth/eip721: fix data type bug for bytes, fix #251 by @q9f in #252
- Fix typo in contract_spec.rb by @flanagansteve in #253
- build(deps): bump JamesIves/github-pages-deploy-action from 4.4.3 to 4.5.0 by @dependabot in #256
- build(deps): bump github/codeql-action from 2 to 3 by @dependabot in #257
- build(deps): bump JamesIves/github-pages-deploy-action from 4.5.0 to 4.6.1 by @dependabot in #275
- eth/api: remove coinbase as default account by @q9f in #269
- ci: update ruby version by @q9f in #271
- Support tuple params in EventLog by @ShiningRay in #276
- fix event signature by @wuminzhe in #250
- gem: run rufo by @q9f in #277
- Allow to call JSON RPC with custom block number by @wafcio in #268
- abi/event: confirm decoding tuples works by @q9f in #278
- Support negative number from JSON RPC by @wafcio in #267
- eth/abi: fix negative integer *coding by @q9f in #279
- eth: update version by @q9f in #280
new contributors
- @flanagansteve made their first contribution in #253
- @ShiningRay made their first contribution in #276
- @wuminzhe made their first contribution in #250
- @wafcio made their first contribution in #268
Full Changelog: v0.5.11...v0.5.12
lib eth.rb v0.5.11 beta
lib eth.rb v0.5.11 10000 is a service release to increase performance and stability.
what's changed
- tested with Ruby 3.2 by @kurotaky in #199
- docs: update changelog for 0.5.10 by @q9f in #200
- eth/client: rewrite send to send_request by @q9f in #201
- eth/client: deduplicate code by @q9f in #202
- eth/abi: split abi class into encoder and decoder by @q9f in #203
- eth/api: update execution apis to latest spec by @q9f in #204
- eth/util: fix compressed public key to address by @an-lee in #206
- Abi.decoder handles arrays of string and bytes by @randoum in #207
- Add moonbeam networks by @a-moreira in #209
- Manually overwrite solc path by @randoum in #212
- eth/solidity: add docs for solc path override by @q9f in #213
- deps: update secp256k1 to 6 by @q9f in #214
- Manual default_account by @randoum in #215
- eth/abi: add abicoder gem tests collection by @q9f in #218
- ens/resolver: remove pending for etc coin type by @q9f in #219
- deps: require forwardable for contracts by @q9f in #227
- eth/contract: ensure contract name is title case by @q9f in #228
- docs: minor fixups by @q9f in #229
- Checking userinfo with the uri method by @kurotaky in #233
- eth/solidity: enable --via-ir by @q9f in #232
- eth/client: remove default gas limit attribute by @q9f in #235
- eth/tx: update tx initcode cost for shanghai by @q9f in #237
- build(deps): bump JamesIves/github-pages-deploy-action from 4.4.1 to 4.4.2 by @dependabot in #240
- eth/abi: allow encoding address types by @q9f in #242
- build(deps): bump JamesIves/github-pages-deploy-action from 4.4.2 to 4.4.3 by @dependabot in #244
- Fix the decoding of unsigned transactions by @pienkowb in #243
- spec: run rufo by @q9f in #245
new contributors
- @an-lee made their first contribution in #206
- @randoum made their first contribution in #207
- @pienkowb made their first contribution in #243
Full Changelog: v0.5.10...v0.5.11
lib eth.rb v0.5.10 beta
lib eth.rb v0.5.10 is a service release to increase performance and stability.
- fixes a bug to correctly select the contract function #191
- provide a
Client.resolve_ens
function (and properly resolve ens) #192 - provide a
Client.transfer_erc20{,_and_wait}
function #197
what's changed
- docs: update changelog for 0.5.9 by @q9f in #187
- docs: add coc by @q9f in #188
- docs: add contribution guidelines by @q9f in #189
- docs: create security policy by @q9f in #190
- eth/client: correctly select functions by @q9f in #191
- eth/ens: actually resolve ens names instead of returning owner by @q9f in #192
- eth/client: do not allow accessing local accounts on remote connections by @q9f in #193
- eth/contract: ensure address arrays support by @q9f in #194
- docs: update readme by @q9f in #195
- eth/client: add transfer_erc20 function by @q9f in #197
- eth/ens: restore docs for normalize by @q9f in #198
full changelog: v0.5.9...v0.5.10
lib eth.rb v0.5.9 beta
lib eth.rb v0.5.9 is a service release to increase performance and stability.
- adds new chains like holesovice or goerli arbitrum #181
- adds
Client.tx_succeeded?
and raises if aClient.transact_and_wait
reverts #173 #183 #186 - adds support for moonbeam (required camel case) #172
- adds groundwork for dynamic abi struct encoding #135 #185
what's changed
- ci: add libyaml on ubuntu by @q9f in #175
- solidity: sanitize the contract path before compiling by @q9f in #176
- docs: fix readme workflow badge by @q9f in #178
- eth: happy new 2023 by @q9f in #179
- docs: update changelog for 0.5.8 by @q9f in #180
- eth/chain: update available chains by @q9f in #181
- eth: rename functions prefixed with is_ by @q9f in #182
- eth/client: add
tx_succeeded?
by @a-moreira in #173 - eth/client: support camel case (convert before sending the tx) by @a-moreira in #172
- eth/client: add test for tx_succeeded? by @q9f in #183
- eth/client: dup params to prevent marshalling on client obj by @q9f in #184
- eth/abi: dynamic struct encoding (#135) by @peter-chung-xfers in #185
- eth/client: raise an error if a contract interaction reverts by @q9f in #186
new contributors
- @a-moreira made their first contribution in #173
- @peter-chung-xfers made their first contribution in #185
full changelog: v0.5.8...v0.5.9
lib eth.rb v0.5.8 beta
lib eth.rb v0.5.8 is a service release to increase performance and stability.
- the client now supports basic ens resolver support.
- you can now supply an amount for payable contract functions.
- note: using the client's
.transfer
function now requires to provide **kwargs instead of parameters:
client.transfer("0c53FFA57Ec554451315c2568d22477dB8e71356", 1 * Eth::Unit::ETHER, sender_key: my_key)
what's changed
- docs: update changelog by @q9f in #160
- gem: bump version to 0.5.8 by @q9f in #161
- build(deps): bump JamesIves/github-pages-deploy-action from 4.4.0 to 4.4.1 by @dependabot in #162
- gem: bump required ruby version to 3 by @q9f in #165
- client: remove invalid parameters from call_raw method by @dansimpson in #166
- client: add ENS resolve support by @dansimpson in #150
- client: ability for call contract methods with specific transaction value was added by @d4mk0 in #168
- client: ability to manual set nonce of tx for transfer, deploy, transact methods was added. by @d4mk0 in #169
- client: satisfy yard docs for transfer kwargs by @q9f in #170
new contributors
full changelog: v0.5.7...v0.5.8
lib eth.rb v0.5.7 beta
lib eth.rb v0.5.7 is a service release to increase performance and stability.
- the client now supports basic http authentication with username and password.
- default fees were increased to prevent forever pending transactions.
what's changed
- gem: bump version to 0.5.7 by @q9f in #131
- docs: update CHANGELOG by @q9f in #132
- build(deps): bump JamesIves/github-pages-deploy-action from 4.3.3 to 4.3.4 by @dependabot in #133
- chore: add polygon chain test case by @geeknees in #146
- fixed to return uint256[] correctly when passed as type by @geeknees in #147
- build(deps): bump JamesIves/github-pages-deploy-action from 4.3.4 to 4.4.0 by @dependabot in #140
- fix Eth:Tx.decode for transaction with s length < 64 chars by @Regul777 in #148
- eth/client: add http basic support auth by @johnnybutler7 in #151
- eth/client: rename http basic to http auth by @q9f in #154
- eth/signature: fix allowing ledger v values of 0 by @q9f in #155
- docs: move readme usage to wiki by @q9f in #156
- eth/client: update default fees by @q9f in #157
- eth/client: fix api documentation by @q9f in #158
- docs: add readme header for yard by @q9f in #159
known issues
- transferring erc-20 tokens or nfts is not very straightforward #145
- passing arrays to contract functions is currently not possible #143
- moonbeam clients do not accept snake case parameters #141
- currently, you cannot call
payable
methods #137 - dynamic nested arrays are still unimplemented for eip-712 #127
new contributors
- @geeknees made their first contribution in #146
- @Regul777 made their first contribution in #148
- @johnnybutler7 made their first contribution in #151
full changelog: v0.5.6...v0.5.7
lib eth.rb v0.5.6 beta
lib eth.rb v0.5.6 is a service release to increase performance and stability.
- the client now allows to override the gas limit for contract deployments in case you experience out-of-gas issues.
- the abi encoder now supports dynamic arrays.
what's changed
- eth/client: include contract constructor args when estimating intrinsic gas by @dansimpson in #111
- eth/abi: allow parsing numerics from string inputs by @q9f in #112
- eth/signature: fix prefix_message for multibyte characters by @kudohamu in #120
- eth/abi: raise error if numeric comes as string by @q9f in #114
- eth/client: add gas limit override option for contract deployments by @dansimpson in #128
- eth/abi: support dynamic array encoding by @peter-chung-xfers in #122
- gem: bump version to 0.5.6 by @q9f in #130
new contributors
- @dansimpson made their first contribution in #111
- @kudohamu made their first contribution in #120
- @peter-chung-xfers made their first contribution in #122
full changelog: v0.5.5...v0.5.6
lib eth.rb v0.5.5 beta
lib eth.rb v0.5.5 is a service release to increase performance and stability.
- the client allows now to pass constructor arguments to a contract deployment.
- matic and mumbai networks were added.
what's changed
- gem: bump version to 0.5.5 by @q9f in #89
- docs: update changelog for 0.5.4 by @q9f in #90
- ci: add weekly dependency checks by @q9f in #91
- build(deps): bump github/codeql-action from 1 to 2 by @dependabot in #92
- build(deps): bump actions/checkout from 2 to 3 by @dependabot in #93
- build(deps): bump JamesIves/github-pages-deploy-action from 4.1.7 to 4.3.3 by @dependabot in #94
- Add missing def_delegator for constructor_inputs by @beacoding in #96
- eth/abi: fix handling of hex values for byte strings by @q9f in #100
- eth/abi: add a testcase for handling hex and bin strings by @q9f in #101
- Fix Eth::Abi::DecodingError in call method by @kurotaky in #105
- Enable passing in constructor params to deploy by @beacoding in #106
- eth/chain: add matic/mumbai by @q9f in #107
- eth: some docs and cleanups by @q9f in #108
new contributors
- @dependabot made their first contribution in #92
- @beacoding made their first contribution in #96
full changelog: v0.5.4...v0.5.5