Skip to main content

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.

TutorialDifficulty
Your First Flipper ContractBasic ink! - Basic Rust

In addition to:

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?

ink! 4.0.0
OpenBrush 3.0.0

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