✨ v1.2.0 has been released! ✨ #66
Elnaril
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
No support for another Universal Router function in this release, though I have implemented 3 NFT ones (see dev branch 1.2.0.dev3.SEAPORT). But just after that the Uniswap Team decided to remove the NFT functions from the Router!
So I removed them as well ...
Ok, but what's in this release then?!
Well, there are some convenient methods that will make your life much easier when using this SDK!
1/
build_transaction()
Instead of just building the input data, you can now build the whole transaction!
It can be as simple as:
Example with a swap, from the doc:
2/
compute_gas_fees()
The SDK provides now a handy method to compute the current "priority fee" and "max fee per gas":
For both above methods:
The gas fees are computed automatically based on the current chain conditions and on a
trx_speed
parameter which can take the following values:TransactionSpeed.SLOW
TransactionSpeed.AVERAGE
TransactionSpeed.FAST
(default)TransactionSpeed.FASTER
3/
fetch_permit2_allowance()
This new codec method requests the permit2 allowance function to know if the UR has enough valid allowance, and to get the current permit2 nonce for a given wallet and token.
4/ Miscellaneous
eth_account.encode_structured_data()
function has been replaced with the favouredeth_account.messages.encode_typed_data()
one.Feel free to give me any feedback on this release here, or open a discussion or a ticket about a feature that should be in the next one!
Beta Was this translation helpful? Give feedback.
All reactions