2.0.2 • Published 2 months ago

@storyhunt/smart-order-router v2.0.2

Weekly downloads
-
License
GPL
Repository
github
Last release
2 months ago

StoryHunt Smart Order Router

This repository contains routing logic for the StoryHunt V3 protocol.

It searches for the most efficient way to swap token A for token B, considering splitting swaps across multiple routes and gas costs.

Testing

Unit Tests

npm run test

CLI

The package can be run as a CLI for testing purposes.

First create a .env file in the root of the project and configure:

JSON_RPC_PROVIDER = '<JSON_RPC_PROVIDER>'

Then from the root directory you can execute the CLI.

./bin/cli --tokenIn 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 --tokenOut 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 --amount 1000 --exactIn --recipient 0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B

Best Route:
100.00% = USDC -- 0.3% --> UNI
	Raw Quote Out:
		35.72
	Gas Adjusted Quote Out:
		34.03

Gas Used Quote Token: 1.691772
Gas Used USD: 47.592951
Calldata: 0x414bf389000000000000...
Value: 0x00

  blockNumber: "13088815"
  estimatedGasUsed: "113000"
  gasPriceWei: "130000000000"
2.0.1-beta.8

3 months ago

2.0.1-beta.9

3 months ago

1.0.9

4 months ago

2.0.2

2 months ago

2.0.1-beta.2

4 months ago

2.0.1-beta.3

4 months ago

2.0.1-beta.1

4 months ago

2.0.1-beta.6

4 months ago

2.0.1-beta.7

4 months ago

2.0.1-beta.4

4 months ago

2.0.1

4 months ago

2.0.1-beta.5

4 months ago

1.0.8

4 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago

0.3.1

5 months ago

0.3.0

5 months ago

0.2.9

5 months ago

0.2.8

5 months ago

0.2.7

6 months ago

0.2.6

6 months ago

0.2.5

6 months ago

0.2.4

6 months ago

0.2.3

6 months ago

0.2.2

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.1.0

6 months ago