zkSync-AMM-contract
zkSync-AMM-contract copied to clipboard
ZK-rollups use ZKPs by combining a large number of Layer 2 transactions (off-chain) into one transaction that then gets mined on the Ethereum mainnet. Instead of mining 100s of transactions individual...
ποΈ Constant Product Automated Market Maker (AMM) Contract build on zkSync ZK rollup layer2 solution ποΈ
There are 3 contracts: token0.sol and token1.sol are erc20 tokens and CPAMM is AMM contract to swap these two tokens. Instructions how to deploy and verify contracts on zkSync explorer below
π Table of Contents
- General Info
- Technologies Used
- Features
- Requirements For Initial Setup
- Setup
- Contact
π© General Information
- Contract allows users to set and get greeting message on zkSync network
π» Technologies Used
- zksync-web3 library
- layer2 zk rollup
π Features
ZK-Rollup has absolute dominance in user experience, which can be concretely expressed as a :
- high level of security,
- fast
- economic transactions.
π Requirements For Initial Setup
π Setup
1. πΎ Clone/Download the Repository
2. π¦ Install Dependencies:
$ cd repository_file
$ yarn
3. π .env environment variables required to set up
Create .env file inside project folder
- You can get your private key from your wallet(β οΈDon't share your private key with untrusted parties)
PRIVATE_KEY = <Private key of your wallet u want to deploy contracts from>
4. π Run Compile
$ yarn hardhat compile
5. π Deploy to zkSync ( β οΈ Make sure to have ETH on your wallet in GOERLI testnet β οΈ)
$ yarn hardhat deploy-zksync
7. π Verify contracts
- π Go to zkScan explorer and find your deployed contract.
- βοΈ Go to "Π‘ode" tab and click "Verify & Publish":
- π€ Choose how you want to verify: Via flattened source code || Via Standard Input JSON.
- β Enter the required data and you have successfully verified your contract.
π¬ Contact
Created by @LESKOV - feel free to contact me!