Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ft/zkswap stable and v3 #642

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/source/curve/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ var arbitrumPancakeStablePoolsBytes []byte
//go:embed pools/pancake-stable/bsc.json
var bscPancakeStablePoolsBytes []byte

// ZkSwap-stable pool bytes

//go:embed pools/zkswap-stable/zksync.json
var zksyncPoolsBytes []byte

var bytesByPath = map[string][]byte{
"pools/arbitrum.json": arbitrumPoolsBytes,
"pools/avalanche.json": avalanchePoolsBytes,
Expand All @@ -90,4 +95,5 @@ var bytesByPath = map[string][]byte{
"pools/ellipsis/bsc.json": ellipsisBscPoolsBytes,
"pools/pancake-stable/arbitrum.json": arbitrumPancakeStablePoolsBytes,
"pools/pancake-stable/bsc.json": bscPancakeStablePoolsBytes,
"pools/zkswap-stable/zksync.json": zksyncPoolsBytes,
}
26 changes: 26 additions & 0 deletions pkg/source/curve/pools/zkswap-stable/zksync.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"id": "0x15309aaf4fedf346e5204331027b4ef7b75b1dd7",
"name": "USDC/USDC/USDT",
"type": "curve-base",
"lpToken": "0x31c330f2febda65693ec8801b77a93c6d1f479e4",
"aPrecision": "2000",
"tokens": [
{
"address": "0x1d17cbcf0d6d143135ae902365d2e5e2a16538d4",
"precision": "1",
"rate": "1000000000000000000"
},
{
"address": "0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4",
"precision": "1",
"rate": "1000000000000000000"
},
{
"address": "0x493257fd37edb34451f62edf8d2a0c418852ba4c",
"precision": "1",
"rate": "1000000000000000000"
}
]
}
]
4 changes: 4 additions & 0 deletions pkg/valueobject/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ var (
ExchangeCurve Exchange = "curve"
ExchangeEllipsis Exchange = "ellipsis"
ExchangePancakeStable Exchange = "pancake-stable"
ExchangeZkSwapStable Exchange = "zkswap-stable"

ExchangeCurveStablePlain Exchange = "curve-stable-plain"
ExchangeCurveStableNg Exchange = "curve-stable-ng"
Expand Down Expand Up @@ -157,6 +158,7 @@ var (
ExchangeRamsesV2 Exchange = "ramses-v2"
ExchangePharaohV2 Exchange = "pharaoh-v2"
ExchangeDackieV3 Exchange = "dackie-v3"
ExchangeZkSwapV3 Exchange = "zkswap-v3"
ExchangeHoriza Exchange = "horiza"
ExchangeBaseSwapV3 Exchange = "baseswap-v3"
ExchangeArbiDexV3 Exchange = "arbidex-v3"
Expand Down Expand Up @@ -446,6 +448,7 @@ var AMMSourceSet = map[Exchange]struct{}{
ExchangeCurveTwoCryptoNg: {},
ExchangeEllipsis: {},
ExchangePancakeStable: {},
ExchangeZkSwapStable: {},
ExchangeUniSwapV3: {},
ExchangeKyberswapElastic: {},
ExchangeBalancer: {},
Expand Down Expand Up @@ -509,6 +512,7 @@ var AMMSourceSet = map[Exchange]struct{}{
ExchangeSushiSwapV3: {},
ExchangeRamsesV2: {},
ExchangeDackieV3: {},
ExchangeZkSwapV3: {},
ExchangeHoriza: {},
ExchangeBaseSwapV3: {},
ExchangeArbiDexV3: {},
Expand Down
Loading