Ether Binder
Set of utilities for interacting with Ethereum and it's smart contracts with PHP, with generating ABI bindings and Ethereum-related types
|
Concrete Transaction types extend abstract class Transaction, and this should be used for typing, unless explicit specific type of transaction is expected.
Ether binder right now supports Legacy transactions and London transactions. Blob transactions will be added when the spec will be finalized. Access list transactions will not be supported for generation in bindings Bear in mind, London transactions support Access List, but access list is not filled in from bindings.
There is Enum for transaction types TransactionType
that allows to select transaction type from type number (like in post-london format of transaction encoding - the first number of RLP, before transaction array), and it allows to instantiate it.
RPC has helper method to check if EIP1559 transaction could be used on current chain.
To prepare transaction, create new transaction object, and fill in its fields using chainable method calls. Note: returned transaction is not clone, as it's the case with OOGmp, the output can be ignored.
Complete "bones" for transaction code are as follows:
Every transaction has 2 method for encoding and 2 methods for decoding. As in most places in the library, you get to choose if you want binary blob, or hexadecimal representation.
Please note that there is also encoding for signing, which differs from encoding of entire transaction (like encoding for getting transaction hash)
There are other utility functions, which should be self-explanatory.