这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
dfb8076
feat: Starting to create the first method price in the Stonfi controller
Nov 29, 2024
f7ec1a4
feat: Starting to create chain
Nov 29, 2024
acae7fc
feat: stonfi - price method
alvarojfjunior Dec 10, 2024
9a6a0d2
Debug enabled and stable with Ton chain and Stonfi connector.
alvarojfjunior Dec 10, 2024
161eeb7
Minor lint changes.
danilo-silva-funttastic Dec 12, 2024
0eb66af
Adding missing refences and fixing some implementation for TON and St…
danilo-silva-funttastic Dec 12, 2024
6f937be
Adding missing refences and fixing some implementation for TON and St…
danilo-silva-funttastic Dec 12, 2024
321acfd
Merge branch 'hb-development' into fix/pr/feat/stonfi
danilo-silva-funttastic Dec 13, 2024
5726b15
feat: stonfi - somt ton methods
alvarojfjunior Dec 12, 2024
11e42e7
feat: stonfi - somt ton methods
alvarojfjunior Dec 12, 2024
c63525f
feat: stonfi - methods
alvarojfjunior Dec 18, 2024
fb3023e
chore: update package dependencies and resolutions
gregory-benneth-funttastic Dec 18, 2024
1bec207
Updating yarn.lock
danilo-silva-funttastic Dec 19, 2024
525920f
Disabling test files
danilo-silva-funttastic Dec 19, 2024
e9aab51
add dirty compile option (build even if errors occur)
MHHukiewitz Dec 19, 2024
f71dc5a
refactor: update TonController and Ton class methods
gregory-benneth-funttastic Dec 19, 2024
d85316d
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 19, 2024
e7c2bee
Add dedust initial implementation
MHHukiewitz Dec 19, 2024
87d76ee
Add dedust SDK
MHHukiewitz Dec 19, 2024
62c1233
Add waitForTransactionByMessage to listen for confirmed transactions
MHHukiewitz Dec 19, 2024
13fffea
Add types and fix swap parameters
MHHukiewitz Dec 19, 2024
ed9177e
Fix errors
MHHukiewitz Dec 19, 2024
7a183f6
Add maxPriceImpact for swaps and improve error handling
MHHukiewitz Dec 19, 2024
822d7dc
fix: correct account address usage in TonController and Ton class
gregory-benneth-funttastic Dec 19, 2024
df0308d
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 19, 2024
4f00c97
refactor: update TonController to use publicKey for balance retrieval
gregory-benneth-funttastic Dec 19, 2024
0b5fe3a
feat: ton - getTokens
alvarojfjunior Dec 19, 2024
050cceb
feat: ton - getTokens
alvarojfjunior Dec 19, 2024
53c1235
feat: ton - fixBranch
alvarojfjunior Dec 19, 2024
1af2837
Add price_stonfi.json on requests folder
guilherme-barbosa-funttastic Dec 19, 2024
3f2cf12
remane address and chain in remove_ton_key.json on requests folder
guilherme-barbosa-funttastic Dec 19, 2024
824d7ad
adding add_ton_key.json
guilherme-barbosa-funttastic Dec 19, 2024
f47202c
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
Dec 19, 2024
f2fa155
refactor: enhance Ton account handling and improve wallet validation
gregory-benneth-funttastic Dec 20, 2024
f7d6ab4
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 20, 2024
35cdee3
Merge branch 'hb-development' into fix/pr/feat/ton
danilo-silva-funttastic Dec 20, 2024
8a8e73b
Updating yarn.lock
danilo-silva-funttastic Dec 20, 2024
fa53810
Reverting non needed changes.
danilo-silva-funttastic Dec 20, 2024
9735cd1
Reverting non needed changes.
danilo-silva-funttastic Dec 20, 2024
9032cac
Reverting non needed changes.
danilo-silva-funttastic Dec 20, 2024
a49124a
Add test:unit:specific script to run only selected tests
MHHukiewitz Dec 20, 2024
97e5d67
Add test suite for dedust
MHHukiewitz Dec 20, 2024
8e824c4
Fix dedust schema
MHHukiewitz Dec 20, 2024
a7efc07
Reverting changes from non needed files.
danilo-silva-funttastic Dec 20, 2024
eedbe2e
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Dec 20, 2024
dbea6d9
Adding typescript temporary files
danilo-silva-funttastic Dec 20, 2024
f6870ca
chore: update yarn.lock and refactor Ton account handling
gregory-benneth-funttastic Dec 20, 2024
177c9ec
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 20, 2024
1e3354a
Refactor address logging in test3.ts to use publicKey from keyPair
gregory-benneth-funttastic Dec 20, 2024
5ae1235
adding connectors dedust on connectors.routes.ts.
guilherme-barbosa-funttastic Dec 20, 2024
69ffc67
adding connectors dedust on amm.controllers.ts .
guilherme-barbosa-funttastic Dec 20, 2024
0b49b13
adding connectors dedust on connection-manager.ts .
guilherme-barbosa-funttastic Dec 20, 2024
d39962e
adding connectors dedust on root.yml.
guilherme-barbosa-funttastic Dec 20, 2024
7671120
adding ton_dust_trade.json and price_dedust.json on curl.sh.
guilherme-barbosa-funttastic Dec 20, 2024
cf00264
Adding typescript temporary files
danilo-silva-funttastic Dec 20, 2024
b764461
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Dec 20, 2024
d218a55
Refactor Ton account handling and update dependencies
gregory-benneth-funttastic Dec 20, 2024
51735cf
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 20, 2024
6d33b19
Reverting non needed changes.
danilo-silva-funttastic Dec 20, 2024
64ba55d
fix get transaction
alvarojfjunior Dec 20, 2024
2c2b631
fix get transaction
alvarojfjunior Dec 20, 2024
4b60d18
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Dec 20, 2024
7ef3ca6
Refactor Stonfi trade execution to enhance wallet management and key …
gregory-benneth-funttastic Dec 20, 2024
525fcc3
Merge branch 'hb-development' into fix/pr/feat/ton
danilo-silva-funttastic Dec 23, 2024
167e517
Updating test 06.
danilo-silva-funttastic Dec 23, 2024
ab11dc5
Removing test file.
danilo-silva-funttastic Dec 23, 2024
2d9d506
creating new test files for ton and ston_fi
hudson-oliveira-funttastic Dec 23, 2024
90f1392
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
hudson-oliveira-funttastic Dec 23, 2024
7d6773f
adding test files for ton and ston_fi
hudson-oliveira-funttastic Dec 23, 2024
32656b2
Reverting yarn.lock
hudson-oliveira-funttastic Dec 23, 2024
b03524b
Refactor TonController balance retrieval to use batch processing
gregory-benneth-funttastic Dec 24, 2024
f9c0495
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 24, 2024
3ff8ddb
Improving root.yml and fixing dedust-schema.json.
danilo-silva-funttastic Dec 24, 2024
bf74df6
Fixing price method and cleaning gateway.http.
danilo-silva-funttastic Dec 24, 2024
d16f830
Removing unsed methods.json file and improving general project lint.
danilo-silva-funttastic Dec 24, 2024
b044e01
Several small fixes and solving lint problems.
danilo-silva-funttastic Dec 24, 2024
c2ec3d7
Updating package.json
danilo-silva-funttastic Dec 24, 2024
be1eac4
Removing non needed file.
danilo-silva-funttastic Dec 24, 2024
1c59354
Cleaning package.json
danilo-silva-funttastic Dec 24, 2024
6b9c23d
Refactor TON transaction handling and update PollRequest structure
gregory-benneth-funttastic Dec 24, 2024
e3b2197
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 24, 2024
85cfaf7
adding ton_dust_trade.json and price_dedust.json on requests.
guilherme-barbosa-funttastic Dec 24, 2024
da3c625
Small linting changes.
danilo-silva-funttastic Dec 24, 2024
f3b2c80
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Dec 24, 2024
834760a
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
Dec 24, 2024
70b8998
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
Dec 24, 2024
e9bc004
I created a gateway.http for Dedust and Stonfi
guilherme-barbosa-funttastic Dec 24, 2024
59f027a
I created a gateway.http for Dedust and Stonfi
guilherme-barbosa-funttastic Dec 24, 2024
bc0293a
Updating ton.ts
danilo-silva-funttastic Dec 24, 2024
68e4712
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Dec 24, 2024
a254b34
trade
alvarojfjunior Dec 24, 2024
9a6b2f5
trade
alvarojfjunior Dec 24, 2024
a97cf7c
Updating ton configuration files (yml, schema, config, and other rela…
danilo-silva-funttastic Dec 24, 2024
42fbc64
Refactor TON transaction handling and update PollRequest structure
gregory-benneth-funttastic Dec 24, 2024
3d27885
Reverting changes and renaming ton tokens file.
danilo-silva-funttastic Dec 24, 2024
6408f0b
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 24, 2024
b9e479c
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 24, 2024
091443d
Adding a testnet file and updating template.
danilo-silva-funttastic Dec 24, 2024
1746371
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Dec 24, 2024
133ccac
Updating testnet ton tokens
danilo-silva-funttastic Dec 24, 2024
86a3c48
Refactor logging in test05.ts to simplify output
gregory-benneth-funttastic Dec 24, 2024
2b992e7
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 24, 2024
6f210aa
Fixing lint problems.
danilo-silva-funttastic Dec 24, 2024
72b0c03
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Dec 24, 2024
447e281
Updating config, yml and schema and removing hardcoded information.
danilo-silva-funttastic Dec 24, 2024
88697e8
Refactor TON balance retrieval in ton.ts and update test05.ts
gregory-benneth-funttastic Dec 24, 2024
01c8d56
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 24, 2024
50f66ab
Updating ton-schema.json
danilo-silva-funttastic Dec 24, 2024
8f70ef3
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Dec 24, 2024
f7619b4
Solving lint problems.
danilo-silva-funttastic Dec 24, 2024
3853d31
created the response_stonfi.text file
guilherme-barbosa-funttastic Dec 24, 2024
0cb7345
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
Dec 24, 2024
1462748
Updating ton classe and configuration files to be able to work with a…
danilo-silva-funttastic Dec 26, 2024
8be2740
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
Dec 26, 2024
15c9ad3
Adding new code to try to automatically decide the best wallet version.
danilo-silva-funttastic Dec 26, 2024
30262cc
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
Dec 26, 2024
747870d
Updating comments.
danilo-silva-funttastic Dec 26, 2024
d4ee928
Fixing schema validation.
danilo-silva-funttastic Dec 26, 2024
29f7e5a
Refactor contract state retrieval in test05.ts
gregory-benneth-funttastic Dec 26, 2024
395f538
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 26, 2024
63e0b9e
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
Dec 26, 2024
71dde04
Updating wallet object references.
danilo-silva-funttastic Dec 26, 2024
acafdd0
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Dec 26, 2024
95199a4
Updating wallet references.
danilo-silva-funttastic Dec 26, 2024
c1cde38
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
Dec 26, 2024
cfbaea8
feat: trade testnet
alvarojfjunior Dec 26, 2024
1fc7135
Merge remote-tracking branch 'rbt/fix/pr/feat/ton' into fix/pr/feat/ton
alvarojfjunior Dec 26, 2024
eaa0494
Fixing price method.
danilo-silva-funttastic Dec 26, 2024
e97a414
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
Dec 26, 2024
c4d2494
Merge remote-tracking branch 'rbt/fix/pr/feat/ton' into fix/pr/feat/ton
alvarojfjunior Dec 26, 2024
35e50f3
Added new variables to the environment file for easier configuration.
guilherme-barbosa-funttastic Dec 27, 2024
8c7b32f
Added new variables to the environment file for easier configuration.
guilherme-barbosa-funttastic Dec 27, 2024
6d68e6b
renaming http file.
guilherme-barbosa-funttastic Dec 27, 2024
8ce186e
Added new variables to the environment file for easier configuration.
guilherme-barbosa-funttastic Dec 27, 2024
218b875
Add TODO for getting confirmed transaction
MHHukiewitz Dec 27, 2024
dbff3c5
Refactor TON asset balance retrieval and enhance wallet asset respons…
gregory-benneth-funttastic Dec 27, 2024
b238f15
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Dec 27, 2024
ba14da7
Refactor getAssetBalance method in Ton class to improve balance calcu…
gregory-benneth-funttastic Dec 27, 2024
7baa931
feat: trade
alvarojfjunior Dec 30, 2024
90fb3f0
Merge remote-tracking branch 'refs/remotes/rbt/fix/pr/feat/ton' into …
alvarojfjunior Dec 30, 2024
7e470ba
feat: trade
alvarojfjunior Dec 30, 2024
8d5b0bb
Updating ton and ston.fi files, fixing lint problems. Adding new entr…
danilo-silva-funttastic Dec 30, 2024
8175598
Updating the code for Ton, changing wallet public key retrieval.
danilo-silva-funttastic Dec 30, 2024
83a3f6c
Updating code to save the wallet.
danilo-silva-funttastic Dec 30, 2024
5ce16f0
Fixing trade method.
danilo-silva-funttastic Dec 30, 2024
d0f3a3f
feat: trade
alvarojfjunior Dec 30, 2024
501edbb
feat: trade
alvarojfjunior Dec 30, 2024
1e0e567
feat: trade
alvarojfjunior Dec 30, 2024
cd0cdf0
fix: mock values trade
alvarojfjunior Dec 31, 2024
1efa206
Adding new test file
danilo-silva-funttastic Dec 31, 2024
eeaa7a3
Updating ton and ston.fi code.
danilo-silva-funttastic Dec 31, 2024
05f5131
Updating ton and ston.fi code.
danilo-silva-funttastic Dec 31, 2024
d284bd1
fix: poll
alvarojfjunior Dec 31, 2024
c930bed
fix: poll
alvarojfjunior Dec 31, 2024
0fb6d8b
Adding test10
danilo-silva-funttastic Jan 6, 2025
3bdb3d2
creating tests for ston_fi
hudson-oliveira-funttastic Jan 7, 2025
b8de891
Updating test10
danilo-silva-funttastic Jan 7, 2025
6a44f56
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
danilo-silva-funttastic Jan 7, 2025
3ebdb6c
refactor: update ston.fi connector with error handling and unique tra…
gregory-benneth-funttastic Jan 8, 2025
6a53324
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Jan 8, 2025
20db4e0
Updating transaction obtention.
danilo-silva-funttastic Jan 8, 2025
0e15e7d
refactor: update Stonfi connector to use string for queryId and impro…
gregory-benneth-funttastic Jan 8, 2025
22d162b
Solving lint problems
danilo-silva-funttastic Jan 8, 2025
fb64d3b
Updating stonfi trade method
danilo-silva-funttastic Jan 8, 2025
a375a7a
fix: poll
alvarojfjunior Jan 9, 2025
2296bee
creating ton.controller.test.ts file
hudson-oliveira-funttastic Jan 9, 2025
f003f6e
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
hudson-oliveira-funttastic Jan 9, 2025
b1a5fa5
fixing small error on ton.validators.ts
hudson-oliveira-funttastic Jan 9, 2025
659a07c
Updating poll and trade method from ton and stonfi
danilo-silva-funttastic Jan 9, 2025
f331d82
Merge branch 'hb-development' into fix/pr/feat/ton
danilo-silva-funttastic Jan 9, 2025
9f8a8ae
Updating ton controller tests
hudson-oliveira-funttastic Jan 9, 2025
6ea0868
refactor: enable validation for Ton requests
gregory-benneth-funttastic Jan 10, 2025
8bae363
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Jan 10, 2025
b98f340
refactor: remove unnecessary approve method from TonController
gregory-benneth-funttastic Jan 10, 2025
0ff75a1
refactor: streamline TonController by removing unused methods
gregory-benneth-funttastic Jan 10, 2025
8f7f4e1
refactor: remove redundant whitespace in TonController
gregory-benneth-funttastic Jan 10, 2025
c550de6
editing test file and throwing error on getTokens method
hudson-oliveira-funttastic Jan 10, 2025
2eef63c
refactor: update TonController methods and validation
gregory-benneth-funttastic Jan 10, 2025
f2c9c66
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Jan 10, 2025
3562e85
fixing some tests and adding new ones for ton.utils.ts
hudson-oliveira-funttastic Jan 13, 2025
3a2f0f4
fix: lint
alvarojfjunior Jan 14, 2025
e6b0480
fix: conflicts
alvarojfjunior Jan 14, 2025
49f34c9
refactor: remove ston_fi test file
gregory-benneth-funttastic Jan 14, 2025
4cc7403
refactor: update Stonfi connector for improved user wallet handling
gregory-benneth-funttastic Jan 14, 2025
3979f06
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Jan 14, 2025
2c5bc7a
adding more tests to ton.controller.test.ts
hudson-oliveira-funttastic Jan 14, 2025
ac9bb77
creating test for Ton.ts component
guilherme-barbosa-funttastic Jan 15, 2025
e984ab8
adding // @ts-ignore on const encrypted and decrypted
guilherme-barbosa-funttastic Jan 15, 2025
aaecc11
add tests for batch processing and utilities on
guilherme-barbosa-funttastic Jan 15, 2025
bf74b1f
refactor: enhance user wallet handling and clean up test suite
gregory-benneth-funttastic Jan 15, 2025
0b6261b
refactor: remove ton.test.ts and enhance ton.validators with new vali…
gregory-benneth-funttastic Jan 15, 2025
9a592f7
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Jan 15, 2025
ffa7aa6
refactor: clean up Stonfi connector and remove outdated test file
gregory-benneth-funttastic Jan 15, 2025
031255a
refactor: update Ton class with new wallet contract handling and remo…
gregory-benneth-funttastic Jan 15, 2025
1889bd4
refactor: standardize TODO comments in Ton class
gregory-benneth-funttastic Jan 15, 2025
b357972
refactor: simplify Ton test suite by removing unused wallet contracts…
gregory-benneth-funttastic Jan 15, 2025
4907613
adding more tests to ton.test.ts
hudson-oliveira-funttastic Jan 16, 2025
76e62d4
test: add unit test for getBestWallet method in Ton class
gregory-benneth-funttastic Jan 16, 2025
8123bac
Merge branch 'fix/pr/feat/ton' of robotter:robotter-ai/gateway into f…
gregory-benneth-funttastic Jan 16, 2025
79ab20f
fix: correct formatting in ton.test.ts and ensure precision in balanc…
gregory-benneth-funttastic Jan 16, 2025
fb4141f
refactor: update TODO comments and enhance Ton class tests
gregory-benneth-funttastic Jan 16, 2025
190e75c
refactor: improve Ton utility functions and enhance test coverage
gregory-benneth-funttastic Jan 16, 2025
92608d9
test: enhance Ton class tests with additional scenarios and error han…
gregory-benneth-funttastic Jan 16, 2025
bb6b17a
test: refine balance mock implementations in Ton class tests
gregory-benneth-funttastic Jan 16, 2025
be4a395
test: enhance Ton class tests with new scenarios and error handling
gregory-benneth-funttastic Jan 16, 2025
868541b
deleting empty lines on all files
hudson-oliveira-funttastic Jan 16, 2025
94a6478
feat stonfi
hudson-oliveira-funttastic Jan 17, 2025
24b91c4
feat stonfi
hudson-oliveira-funttastic Jan 17, 2025
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
21 changes: 16 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": "https://github.com/hummingbot/gateway",
"scripts": {
"prebuild": "rimraf dist && mkdir dist",
"build": "tsc --skipLibCheck --project ./ && yarn copy-files",
"build": "tsc --skipLibCheck --noEmitOnError false --project ./ && yarn copy-files",
"clean": "rm -rf ./node_modules && rm -rf ./coverage && rm -rf ./logs && yarn run clean:config",
"clean:config": "find ./conf -maxdepth 1 -regextype posix-extended -regex '.*.*' -delete",
"format": "prettier . --write",
Expand All @@ -26,12 +26,14 @@
"@_etcswap/smart-order-router": "^3.15.2",
"@balancer-labs/sdk": "^1.1.5",
"@bancor/carbon-sdk": "^0.0.93-DEV",
"@coral-xyz/anchor": "^0.29.0",
"@cosmjs/amino": "^0.32.2",
"@cosmjs/cosmwasm-stargate": "^0.31.1",
"@cosmjs/proto-signing": "^0.31.1",
"@cosmjs/stargate": "^0.31.1",
"@cosmjs/tendermint-rpc": "^0.32.2",
"@crocswap/sdk": "^2.4.5",
"@dedust/sdk": "^0.8.7",
"@ethersproject/abstract-provider": "5.7.0",
"@ethersproject/address": "5.7.0",
"@ethersproject/contracts": "5.7.0",
Expand All @@ -42,6 +44,8 @@
"@harmony-js/utils": "^0.1.56",
"@improbable-eng/grpc-web": "^0.13.0",
"@injectivelabs/sdk-ts": "^1.10.58",
"@jup-ag/api": "^6.0.29",
"@orbs-network/ton-access": "^2.3.3",
"@osmonauts/math": "^1.11.3",
"@pancakeswap/sdk": "^4.0.0",
"@pancakeswap/smart-router": "^4.2.1",
Expand All @@ -51,17 +55,22 @@
"@pancakeswap/v3-periphery": "^1.0.2",
"@pancakeswap/v3-sdk": "^3.7.0",
"@pangolindex/sdk": "^1.1.0",
"@coral-xyz/anchor": "^0.29.0",
"@solana/web3.js": "^1.95.8",
"@solana/spl-token": "0.4.8",
"@solana/spl-token-registry": "^0.2.4574",
"@solana/web3.js": "^1.95.8",
"@solflare-wallet/utl-sdk": "^1.4.0",
"@jup-ag/api": "^6.0.29",
"@ston-fi/api": "^0.14.0",
"@ston-fi/omniston-sdk": "^0.3.0",
"@ston-fi/sdk": "^2.1.0",
"@sushiswap/sdk": "^5.0.0-canary.116",
"@taquito/rpc": "^17.0.0",
"@taquito/signer": "^17.0.0",
"@taquito/taquito": "^17.0.0",
"@tinymanorg/tinyman-js-sdk": "^3.0.0",
"@ton-api/client": "^0.3.0",
"@ton/core": "^0.59.0",
"@ton/crypto": "^3.3.0",
"@ton/ton": "^15.1.0",
"@traderjoe-xyz/sdk-v2": "^2.0.5",
"@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.178",
Expand Down Expand Up @@ -107,6 +116,7 @@
"quickswap-sdk": "^3.0.8",
"swagger-ui-express": "^4.1.6",
"swap-router-sdk": "^1.21.1",
"tonweb": "^0.0.66",
"tslib": "^2.3.1",
"uuid": "^8.3.2",
"vvs-sdk": "^2.4.0",
Expand Down Expand Up @@ -170,6 +180,7 @@
"viem": "^0.3.x"
},
"resolutions": {
"web3-utils": "1.7.3"
"web3-utils": "1.7.3",
"@ston-fi/api/web3-utils": "1.8.2"
}
}
47 changes: 36 additions & 11 deletions src/amm/amm.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ import {
trade as tinymanTrade,
estimateGas as tinymanEstimateGas,
} from '../connectors/tinyman/tinyman.controllers';
import {
price as stonfiPrice,
trade as stonfiTrade,
estimateGas as stonfiEstimateGas,
} from '../connectors/ston_fi/ston_fi.controllers';
import {
price as dedustPrice,
trade as dedustTrade,
estimateGas as dedustEstimateGas,
} from '../connectors/dedust/dedust.controllers';
import {
price as plentyPrice,
trade as plentyTrade,
Expand All @@ -63,17 +73,21 @@ import { Osmosis } from '../chains/osmosis/osmosis';
import { Solana } from '../chains/solana/solana';
import { Jupiter } from '../connectors/jupiter/jupiter';
import { Carbonamm } from '../connectors/carbon/carbonAMM';
import { Ton } from '../chains/ton/ton';
import { Stonfi } from '../connectors/ston_fi/ston_fi';
import { Dedust } from '../connectors/dedust/dedust';

export async function price(req: PriceRequest): Promise<PriceResponse> {
const chain = await getInitializedChain<
Algorand | Ethereumish | Tezosish | Osmosis | Solana
Algorand | Ethereumish | Tezosish | Osmosis | Solana | Ton
>(req.chain, req.network);

if (chain instanceof Osmosis){
return chain.controller.price(chain as unknown as Osmosis, req);
}

const connector: Uniswapish | Tinyman | Plenty =
await getConnector<Uniswapish | Tinyman | Plenty>(
const connector: Uniswapish | Tinyman | Plenty | Stonfi | Dedust =
await getConnector<Uniswapish | Tinyman | Plenty | Stonfi | Dedust>(
req.chain,
req.network,
req.connector
Expand All @@ -88,20 +102,23 @@ export async function price(req: PriceRequest): Promise<PriceResponse> {
} else if ('routerAbi' in connector) {
// we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish
return uniswapPrice(<Ethereumish>chain, connector, req);
} else if (connector instanceof Stonfi) {
return stonfiPrice(chain as unknown as Ton, connector, req);
} else if (connector instanceof Dedust) {
return dedustPrice(chain as unknown as Ton, connector, req);
} else return tinymanPrice(chain as unknown as Algorand, connector, req);

}

export async function trade(req: TradeRequest): Promise<TradeResponse> {
const chain = await getInitializedChain<
Algorand | Ethereumish | Tezosish | Osmosis | Solana
Algorand | Ethereumish | Tezosish | Osmosis | Solana | Ton
>(req.chain, req.network);
if (chain instanceof Osmosis){
return chain.controller.trade(chain as unknown as Osmosis, req);
}

const connector: Uniswapish | Tinyman | Plenty =
await getConnector<Uniswapish | Tinyman | Plenty>(
const connector: Uniswapish | Tinyman | Plenty | Stonfi | Dedust =
await getConnector<Uniswapish | Tinyman | Plenty | Stonfi | Dedust>(
req.chain,
req.network,
req.connector
Expand All @@ -115,6 +132,10 @@ export async function trade(req: TradeRequest): Promise<TradeResponse> {
return carbonTrade(<Ethereumish>chain, connector, req);
} else if ('routerAbi' in connector) {
return uniswapTrade(<Ethereumish>chain, connector, req);
} else if (connector instanceof Stonfi) {
return stonfiTrade(<Ton>chain, connector, req);
} else if (connector instanceof Dedust) {
return dedustTrade(<Ton>chain, connector, req);
} else {
return tinymanTrade(chain as unknown as Algorand, connector, req);
}
Expand Down Expand Up @@ -201,14 +222,14 @@ export async function estimateGas(
req: NetworkSelectionRequest
): Promise<EstimateGasResponse> {
const chain = await getInitializedChain<
Algorand | Ethereumish | Tezosish | Osmosis | Solana
Algorand | Ethereumish | Tezosish | Osmosis | Solana | Ton
>(req.chain, req.network);
if (chain instanceof Osmosis){
return chain.controller.estimateGas(chain as unknown as Osmosis);
}
const connector: Uniswapish | Tinyman | Plenty | Jupiter =
await getConnector<Uniswapish | Tinyman | Plenty | Jupiter>(

const connector: Uniswapish | Tinyman | Plenty | Jupiter | Stonfi | Dedust =
await getConnector<Uniswapish | Tinyman | Plenty | Jupiter | Stonfi | Dedust>(
req.chain,
req.network,
req.connector
Expand All @@ -222,6 +243,10 @@ export async function estimateGas(
return carbonEstimateGas(<Ethereumish>chain, connector);
} else if ('routerAbi' in connector) {
return uniswapEstimateGas(<Ethereumish>chain, connector);
} else if (connector instanceof Stonfi) {
return stonfiEstimateGas(<Ton>chain, connector);
} else if (connector instanceof Dedust) {
return dedustEstimateGas(<Ton>chain, connector);
} else {
return tinymanEstimateGas(chain as unknown as Algorand, connector);
}
Expand Down
18 changes: 9 additions & 9 deletions src/chains/chain.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {

export async function poll(
chain: Chain,
req: PollRequest
req: PollRequest,
): Promise<PollResponse> {
const initTime = Date.now();
const poll = await chain.controller.poll(chain, req);
Expand All @@ -42,7 +42,7 @@ export async function poll(

export async function nonce(
chain: Chain,
req: NonceRequest
req: NonceRequest,
): Promise<NonceResponse> {
const initTime = Date.now();
const nonce = await chain.controller.nonce(chain, req);
Expand All @@ -56,7 +56,7 @@ export async function nonce(

export async function nextNonce(
chain: Chain,
req: NonceRequest
req: NonceRequest,
): Promise<NonceResponse> {
const initTime = Date.now();
const nextNonce = await chain.controller.nextNonce(chain, req);
Expand All @@ -70,7 +70,7 @@ export async function nextNonce(

export async function getTokens(
chain: Chain,
req: TokensRequest
req: TokensRequest,
): Promise<TokensResponse> {
const initTime = Date.now();
const tokens = await chain.controller.getTokens(chain, req);
Expand All @@ -84,7 +84,7 @@ export async function getTokens(

export async function allowances(
chain: Chain,
req: AllowancesRequest
req: AllowancesRequest,
): Promise<AllowancesResponse | string> {
const initTime = Date.now();
const allowances = await chain.controller.allowances(chain, req);
Expand All @@ -99,7 +99,7 @@ export async function allowances(

export async function balances(
chain: Chain,
req: BalanceRequest
req: BalanceRequest,
): Promise<BalanceResponse | string> {
const initTime = Date.now();
const balances = await chain.controller.balances(chain, req);
Expand All @@ -114,7 +114,7 @@ export async function balances(

export async function approve(
chain: Chain,
req: ApproveRequest
req: ApproveRequest,
): Promise<ApproveResponse | string> {
const initTime = Date.now();
const approveTx = await chain.controller.approve(chain, req);
Expand All @@ -129,7 +129,7 @@ export async function approve(

export async function cancel(
chain: Chain,
req: CancelRequest
req: CancelRequest,
): Promise<CancelResponse> {
const initTime = Date.now();
const cancelTx = await chain.controller.cancel(chain, req);
Expand All @@ -144,7 +144,7 @@ export async function cancel(

export async function transfer(
chain: Chain,
req: TransferRequest
req: TransferRequest,
): Promise<TransferResponse> {
const initTime = Date.now();
const transfer = await chain.controller.transfer(chain, req);
Expand Down
91 changes: 91 additions & 0 deletions src/chains/ton/ton.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import { ConfigManagerV2 } from '../../services/config-manager-v2';

export interface NetworkConfig {
name: string;
nodeURL: string;
assetListType: string;
assetListSource: string;
maxLRUCacheInstances: number;
scanUrl: string;
}

export interface Config {
network: NetworkConfig;
nativeCurrencySymbol: string;
defaultMaxNumberOfRetries: number;
defaultDelayBetweenRetries: number;
defaultTimeout: number;
defaultBatchSize: number;
defaultDelayBetweenBatches: number;
defaultPollInterval: number;
defaultMaxPollAttempts: number;
gasPrice: number;
gasLimit: number;
gasCost: number;
workchain: number;
apiKey: string;
rpcType: string;
availableWalletVersions: string[];
walletVersion: string;
}

export function getTonConfig(network: string): Config {
return {
network: {
name: network,
nodeURL: ConfigManagerV2.getInstance().get(
'ton.networks.' + network + '.nodeURL',
),
scanUrl:
network == 'mainnet'
? 'https://tonscan.org'
: 'https://testnet.tonscan.org',
assetListType: ConfigManagerV2.getInstance().get(
'ton.networks.' + network + '.assetListType',
),
assetListSource: ConfigManagerV2.getInstance().get(
'ton.networks.' + network + '.assetListSource',
),
maxLRUCacheInstances: 10,
},
nativeCurrencySymbol: ConfigManagerV2.getInstance().get(
'ton.nativeCurrencySymbol',
),
defaultMaxNumberOfRetries:
ConfigManagerV2.getInstance().get('ton.defaultMaxNumberOfRetries') || 3,
defaultDelayBetweenRetries:
ConfigManagerV2.getInstance().get(
'ton.defaultDelayDelayBetweenRetries',
) || 5,
defaultTimeout:
ConfigManagerV2.getInstance().get('ton.defaultTimeout') || 60,
defaultBatchSize:
ConfigManagerV2.getInstance().get('ton.defaultBatchSize') || 100,
defaultDelayBetweenBatches:
ConfigManagerV2.getInstance().get('ton.defaultDelayBetweenBatches') || 5,
defaultPollInterval:
ConfigManagerV2.getInstance().get('ton.defaultPollInterval') || 2000,
defaultMaxPollAttempts:
ConfigManagerV2.getInstance().get('ton.defaultMaxPollAttempts') || 30,
gasPrice: ConfigManagerV2.getInstance().get('ton.gasPrice') || 0,
gasLimit: ConfigManagerV2.getInstance().get('ton.gasLimit') || 0,
gasCost: ConfigManagerV2.getInstance().get('ton.gasCost') || 1,
workchain: ConfigManagerV2.getInstance().get('ton.workchain') || 0,
apiKey: ConfigManagerV2.getInstance().get('ton.apiKey') || 0,
rpcType: ConfigManagerV2.getInstance().get('ton.rpcType') || 0,
availableWalletVersions: [
'v1r1',
'v1r2',
'v1r3',
'v2r1',
'v2r2',
'v3r1',
'v3r2',
'v4',
'v5R1',
'v5Beta',
],
walletVersion:
ConfigManagerV2.getInstance().get('ton.walletVersion') || null,
};
}
Loading