{"repo":"Elnaril/uniswap-universal-router-decoder","free":true,"listed":false,"github":"https://github.com/Elnaril/uniswap-universal-router-decoder","clone":"git clone https://github.com/Elnaril/uniswap-universal-router-decoder.git","description":"Uniswap Universal Router SDK - Decode and Encode Transactions - Uniswap V2, V3 & V4","language":"Python","stars":278,"topics":["decoder","defi","router","uniswap","ethereum-dapp","encoder","decentralized-exchange","dex","web3py","ethereum"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"Uniswap Universal Router Decoder & Encoder Many thanks to everyone who has ☕️ offered some coffees ! ☕️ or ⭐ starred this project! ⭐ It is greatly appreciated! :) --- --- Project Information Code Quality --- Release Notes See the release notes page v3.0.0 - breaking changes - Update UR address and abi to match v2.1.1 - Add support for UR v2.1.1 swaps - Add async support - Remove support for Python 3.9 - Remove support for Web3 Tip : You can format the decoded input like above with this Gedit plugin ;) How to decode a Uniswap Universal Router transaction It's also possible to decode the whole transaction, given its hash and providing the codec has been built with either a valid Web3 instance or the link to a rpc endpoint. The decoder will get the transaction from the blockchain and decode it, along with its input data: How to decode a Uniswap V3 swap path The RouterCodec class exposes also the method decode.v3 path() which can be used to decode a given Uniswap V3 path. The result is a tuple, starting with the \"in-token\" and ending with the \"out-token\", with the pool fees between each pair. How to encode The Uniswap Universal Router allows the chaining of several functions in the same transaction. This codec supports it (at least for supported functions) and exposes public methods that can be chained. The chaining starts with the encode.chain() method and ends with the build() one which returns the full encoded data to be included in the transaction. Below some examples of enco","default_branch":null,"files":null,"tree":[],"storefront":"/r/Elnaril","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Elnaril/uniswap-universal-router-decoder/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}