-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PoC 중간 Token 개수 정해 Route 경로 찾기 완료, router 포팅 프로젝트 구조 작업 중 save * PoC 제작 완료 및 테스트 작성 완료(테스트 케이스는 더 추가하면 좋음) * Update poc/my_router_test.go Co-authored-by: Lee ByeongJun <[email protected]> * Update poc/my_router_test.go Co-authored-by: Lee ByeongJun <[email protected]> * my_router_test에 test case name 추가 * 필드 이름 추가 * 테스트 케이스 추가 --------- Co-authored-by: tolelom <[email protected]> Co-authored-by: Lee ByeongJun <[email protected]>
- Loading branch information
1 parent
dceaa95
commit 9c28f2e
Showing
20 changed files
with
400 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package router | ||
|
||
type BestSwapRoute struct { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package core | ||
|
||
type AlphaRouterConfig struct { | ||
v3ProtocolPoolSelection ProtocolPoolSelection | ||
maxSwapsPerPath int | ||
maxSplits int | ||
minSplits int | ||
distributionPercent int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package core | ||
|
||
type BestSwapRoute struct { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ package currency | |
|
||
// Currency는 Token | NativeCurrency | ||
type Currency interface { | ||
GetToken() Token | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ type Token struct { | |
BaseCurrency | ||
address string | ||
} | ||
|
||
func (t *Token) getToken() Token { | ||
return *t | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package core | ||
|
||
type IPortionProvider interface { | ||
GetPortionAmount(tokenOutAmount float64, tradeType TradeType, swapConfig SwapOptions) (float64, error) | ||
} | ||
|
||
type PortionProvider struct { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package core | ||
|
||
type ProtocolPoolSelection struct { | ||
topN int | ||
topNDirectSwaps int | ||
topNTokenInOut int | ||
topNSecondHop int | ||
topNWithEachBaseToken int | ||
topNWithBaseToken int | ||
|
||
// selectable variable | ||
//topNSecondHopForTokenAddress | ||
//tokensToAvoidOnSecondHops | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package core | ||
|
||
type SwapRoute struct { | ||
route Routes | ||
} | ||
|
||
type IRouter interface { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package core | ||
|
||
type Routes struct { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package core | ||
|
||
type Trade struct { | ||
//v3Routes V3Routes | ||
tradeType TradeType | ||
} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.