Overview
This tutorial is suitable for developers with advanced knowledge of ink! and intermediate understanding of Rust. Using the examples provided, you will build and deploy a full implementation of Uniswap V2 DEX.
Prerequisites
Experience gained from following the previous guides will be beneficial for this tutorial.
Tutorial | Difficulty |
---|---|
Your First Flipper Contract | Basic ink! - Basic Rust |
NFT contract with PSP34 | Intermediate ink! - Basic Rust |
In addition to:
- An already provisioned ink! environment.
- Intermediate knowledge of Rust. Visit here for more information about Rust.
- General knowledge of AMMs & Uniswap V2 (as this tutorial will focus on implementation).
What Will We Be Doing?
In this tutorial we will build and deploy the following Solidity implementations of Uniswap V2 Core, using ink!
What Version of Ink! Will I Need?
What Topics Will Be Covered in This Guide?
- The full implementation of Uniswap V2 DEX.
- File structure for a project composed of several contracts.
- Trait and generic implementations in separate files.
- Using safe math in Rust/ink!
- Porting Solidity to ink!
- Using modifiers and creating custom modifiers.
- Using cross-contract calls.
Summary
I. File & Folder structure of the project
II. Pair contract
III. Factory contract