8000 Release lib eth.rb v0.5.14 · q9f/eth.rb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lib eth.rb v0.5.14

Latest
Compare
Choose a tag to compare
@q9f q9f released this 16 Apr 20:08
· 1 commit to main since this release
v0.5.14
2389c5c

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

Full Changelog: v0.5.13...v0.5.14

0