sushi 4.2.3 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/_cjs/address/getCreate2Address.js +2 -2
- package/_cjs/address/getCreate2Address.js.map +1 -1
- package/_cjs/api/price.js.map +1 -1
- package/_cjs/chain/chain-key.js +14 -0
- package/_cjs/chain/chain-key.js.map +1 -0
- package/_cjs/chain/evm/generated-chain-data.js.map +1 -0
- package/_cjs/chain/evm/id.js +60 -0
- package/_cjs/chain/evm/id.js.map +1 -0
- package/_cjs/chain/evm/index.js +278 -0
- package/_cjs/chain/evm/index.js.map +1 -0
- package/_cjs/chain/id.js +6 -54
- package/_cjs/chain/id.js.map +1 -1
- package/_cjs/chain/index.js +3 -274
- package/_cjs/chain/index.js.map +1 -1
- package/_cjs/chain/non-evm/aptos/id.js +7 -0
- package/_cjs/chain/non-evm/aptos/id.js.map +1 -0
- package/_cjs/chain/non-evm/aptos/index.js +30 -0
- package/_cjs/chain/non-evm/aptos/index.js.map +1 -0
- package/_cjs/chain/non-evm/index.js +19 -0
- package/_cjs/chain/non-evm/index.js.map +1 -0
- package/_cjs/chain/non-evm/tron/id.js +7 -0
- package/_cjs/chain/non-evm/tron/id.js.map +1 -0
- package/_cjs/chain/non-evm/tron/index.js +30 -0
- package/_cjs/chain/non-evm/tron/index.js.map +1 -0
- package/_cjs/config/api.js +1 -3
- package/_cjs/config/api.js.map +1 -1
- package/_cjs/config/features/aggregator.js +9 -9
- package/_cjs/config/features/aggregator.js.map +1 -1
- package/_cjs/config/features/bentobox.js +43 -43
- package/_cjs/config/features/bentobox.js.map +1 -1
- package/_cjs/config/features/extractor.js +44 -44
- package/_cjs/config/features/extractor.js.map +1 -1
- package/_cjs/config/features/furo.js +16 -16
- package/_cjs/config/features/furo.js.map +1 -1
- package/_cjs/config/features/master-chef.js +3 -3
- package/_cjs/config/features/master-chef.js.map +1 -1
- package/_cjs/config/features/merkl.js +17 -17
- package/_cjs/config/features/merkl.js.map +1 -1
- package/_cjs/config/features/mini-chef.js +34 -34
- package/_cjs/config/features/mini-chef.js.map +1 -1
- package/_cjs/config/features/pancakeswap-v2.js +22 -22
- package/_cjs/config/features/pancakeswap-v2.js.map +1 -1
- package/_cjs/config/features/pancakeswap-v3.js +29 -29
- package/_cjs/config/features/pancakeswap-v3.js.map +1 -1
- package/_cjs/config/features/route-processor.js +323 -323
- package/_cjs/config/features/route-processor.js.map +1 -1
- package/_cjs/config/features/squid.js +32 -32
- package/_cjs/config/features/squid.js.map +1 -1
- package/_cjs/config/features/stargate.js +580 -577
- package/_cjs/config/features/stargate.js.map +1 -1
- package/_cjs/config/features/sushiswap-v2.js +138 -137
- package/_cjs/config/features/sushiswap-v2.js.map +1 -1
- package/_cjs/config/features/sushiswap-v3.js +146 -146
- package/_cjs/config/features/sushiswap-v3.js.map +1 -1
- package/_cjs/config/features/sushiswap.js.map +1 -1
- package/_cjs/config/features/sushixswap.js +89 -89
- package/_cjs/config/features/sushixswap.js.map +1 -1
- package/_cjs/config/features/trident.js +42 -42
- package/_cjs/config/features/trident.js.map +1 -1
- package/_cjs/config/features/uniswap-v2.js +19 -19
- package/_cjs/config/features/uniswap-v2.js.map +1 -1
- package/_cjs/config/features/uniswap-v3.js +67 -67
- package/_cjs/config/features/uniswap-v3.js.map +1 -1
- package/_cjs/config/governance.js +2 -2
- package/_cjs/config/governance.js.map +1 -1
- package/_cjs/config/index.js +0 -2
- package/_cjs/config/index.js.map +1 -1
- package/_cjs/config/native-ids.js +54 -54
- package/_cjs/config/native-ids.js.map +1 -1
- package/_cjs/config/subgraph/get-subgraph-url.js +43 -0
- package/_cjs/config/subgraph/get-subgraph-url.js.map +1 -0
- package/_cjs/config/subgraph/hosts.js +7 -10
- package/_cjs/config/subgraph/hosts.js.map +1 -1
- package/_cjs/config/subgraph/max-first.js +2 -2
- package/_cjs/config/subgraph/max-first.js.map +1 -1
- package/_cjs/config/subgraph/seconds-between-blocks.js +26 -26
- package/_cjs/config/subgraph/seconds-between-blocks.js.map +1 -1
- package/_cjs/config/subgraph/subgraphs/bentobox.js +23 -16
- package/_cjs/config/subgraph/subgraphs/bentobox.js.map +1 -1
- package/_cjs/config/subgraph/subgraphs/blocks.js +42 -35
- package/_cjs/config/subgraph/subgraphs/blocks.js.map +1 -1
- package/_cjs/config/subgraph/subgraphs/furo.js +25 -18
- package/_cjs/config/subgraph/subgraphs/furo.js.map +1 -1
- package/_cjs/config/subgraph/subgraphs/master-chef-v1.js +12 -3
- package/_cjs/config/subgraph/subgraphs/master-chef-v1.js.map +1 -1
- package/_cjs/config/subgraph/subgraphs/master-chef-v2.js +12 -3
- package/_cjs/config/subgraph/subgraphs/master-chef-v2.js.map +1 -1
- package/_cjs/config/subgraph/subgraphs/mini-chef.js +26 -19
- package/_cjs/config/subgraph/subgraphs/mini-chef.js.map +1 -1
- package/_cjs/config/subgraph/subgraphs/sushi-bar.js +12 -3
- package/_cjs/config/subgraph/subgraphs/sushi-bar.js.map +1 -1
- package/_cjs/config/subgraph/subgraphs/sushiswap-v2.js +49 -37
- package/_cjs/config/subgraph/subgraphs/sushiswap-v2.js.map +1 -1
- package/_cjs/config/subgraph/subgraphs/sushiswap-v3.js +44 -32
- package/_cjs/config/subgraph/subgraphs/sushiswap-v3.js.map +1 -1
- package/_cjs/config/token-chomper.js +85 -85
- package/_cjs/config/token-chomper.js.map +1 -1
- package/_cjs/config/token-maps/additional-bases.js +85 -81
- package/_cjs/config/token-maps/additional-bases.js.map +1 -1
- package/_cjs/config/token-maps/bases-to-check-trades-against.js +337 -337
- package/_cjs/config/token-maps/bases-to-check-trades-against.js.map +1 -1
- package/_cjs/config/token-maps/custom-bases.js +5 -5
- package/_cjs/config/token-maps/custom-bases.js.map +1 -1
- package/_cjs/config/token-maps/default-bases.js +358 -348
- package/_cjs/config/token-maps/default-bases.js.map +1 -1
- package/_cjs/config/token-maps/default-quote.js +54 -51
- package/_cjs/config/token-maps/default-quote.js.map +1 -1
- package/_cjs/config/token-maps/lsds.js +108 -108
- package/_cjs/config/token-maps/lsds.js.map +1 -1
- package/_cjs/config/token-maps/short-name-to-currency.js +230 -230
- package/_cjs/config/token-maps/short-name-to-currency.js.map +1 -1
- package/_cjs/config/token-maps/stables.js +202 -172
- package/_cjs/config/token-maps/stables.js.map +1 -1
- package/_cjs/config/token-security.js +16 -16
- package/_cjs/config/token-security.js.map +1 -1
- package/_cjs/config/wallet.js +77 -77
- package/_cjs/config/wallet.js.map +1 -1
- package/_cjs/config/wnative.js.map +1 -1
- package/_cjs/currency/currency.js +1 -3
- package/_cjs/currency/currency.js.map +1 -1
- package/_cjs/currency/native.js +2 -2
- package/_cjs/currency/native.js.map +1 -1
- package/_cjs/currency/token-addresses.js +454 -454
- package/_cjs/currency/token-addresses.js.map +1 -1
- package/_cjs/currency/token.js.map +1 -1
- package/_cjs/currency/tokens.js +179 -179
- package/_cjs/currency/tokens.js.map +1 -1
- package/_cjs/currency/zod.js +3 -2
- package/_cjs/currency/zod.js.map +1 -1
- package/_cjs/format/id.js +7 -3
- package/_cjs/format/id.js.map +1 -1
- package/_cjs/index.js +2 -2
- package/_cjs/index.js.map +1 -1
- package/_cjs/pool/sushiswap-v2/sushiswap-v2-pool.js +2 -2
- package/_cjs/pool/sushiswap-v2/sushiswap-v2-pool.js.map +1 -1
- package/_cjs/router/get-currency-combinations.js.map +1 -1
- package/_cjs/token-list/wrapped-token-info.js.map +1 -1
- package/_esm/address/getCreate2Address.js +2 -2
- package/_esm/address/getCreate2Address.js.map +1 -1
- package/_esm/api/price.js.map +1 -1
- package/_esm/chain/chain-key.js +11 -0
- package/_esm/chain/chain-key.js.map +1 -0
- package/_esm/chain/evm/generated-chain-data.js.map +1 -0
- package/_esm/chain/evm/id.js +67 -0
- package/_esm/chain/evm/id.js.map +1 -0
- package/_esm/chain/evm/index.js +280 -0
- package/_esm/chain/evm/index.js.map +1 -0
- package/_esm/chain/id.js +6 -64
- package/_esm/chain/id.js.map +1 -1
- package/_esm/chain/index.js +3 -293
- package/_esm/chain/index.js.map +1 -1
- package/_esm/chain/non-evm/aptos/id.js +4 -0
- package/_esm/chain/non-evm/aptos/id.js.map +1 -0
- package/_esm/chain/non-evm/aptos/index.js +11 -0
- package/_esm/chain/non-evm/aptos/index.js.map +1 -0
- package/_esm/chain/non-evm/index.js +3 -0
- package/_esm/chain/non-evm/index.js.map +1 -0
- package/_esm/chain/non-evm/tron/id.js +4 -0
- package/_esm/chain/non-evm/tron/id.js.map +1 -0
- package/_esm/chain/non-evm/tron/index.js +11 -0
- package/_esm/chain/non-evm/tron/index.js.map +1 -0
- package/_esm/config/api.js +1 -3
- package/_esm/config/api.js.map +1 -1
- package/_esm/config/features/aggregator.js +9 -9
- package/_esm/config/features/aggregator.js.map +1 -1
- package/_esm/config/features/bentobox.js +43 -43
- package/_esm/config/features/bentobox.js.map +1 -1
- package/_esm/config/features/extractor.js +44 -44
- package/_esm/config/features/extractor.js.map +1 -1
- package/_esm/config/features/furo.js +16 -16
- package/_esm/config/features/furo.js.map +1 -1
- package/_esm/config/features/master-chef.js +7 -7
- package/_esm/config/features/master-chef.js.map +1 -1
- package/_esm/config/features/merkl.js +18 -18
- package/_esm/config/features/merkl.js.map +1 -1
- package/_esm/config/features/mini-chef.js +35 -35
- package/_esm/config/features/mini-chef.js.map +1 -1
- package/_esm/config/features/pancakeswap-v2.js +24 -24
- package/_esm/config/features/pancakeswap-v2.js.map +1 -1
- package/_esm/config/features/pancakeswap-v3.js +29 -29
- package/_esm/config/features/pancakeswap-v3.js.map +1 -1
- package/_esm/config/features/route-processor.js +329 -329
- package/_esm/config/features/route-processor.js.map +1 -1
- package/_esm/config/features/squid.js +32 -32
- package/_esm/config/features/squid.js.map +1 -1
- package/_esm/config/features/stargate.js +598 -595
- package/_esm/config/features/stargate.js.map +1 -1
- package/_esm/config/features/sushiswap-v2.js +201 -200
- package/_esm/config/features/sushiswap-v2.js.map +1 -1
- package/_esm/config/features/sushiswap-v3.js +157 -157
- package/_esm/config/features/sushiswap-v3.js.map +1 -1
- package/_esm/config/features/sushiswap.js.map +1 -1
- package/_esm/config/features/sushixswap.js +91 -91
- package/_esm/config/features/sushixswap.js.map +1 -1
- package/_esm/config/features/trident.js +45 -45
- package/_esm/config/features/trident.js.map +1 -1
- package/_esm/config/features/uniswap-v2.js +19 -19
- package/_esm/config/features/uniswap-v2.js.map +1 -1
- package/_esm/config/features/uniswap-v3.js +67 -67
- package/_esm/config/features/uniswap-v3.js.map +1 -1
- package/_esm/config/governance.js +2 -2
- package/_esm/config/governance.js.map +1 -1
- package/_esm/config/index.js +0 -2
- package/_esm/config/index.js.map +1 -1
- package/_esm/config/native-ids.js +65 -65
- package/_esm/config/native-ids.js.map +1 -1
- package/_esm/config/subgraph/get-subgraph-url.js +46 -0
- package/_esm/config/subgraph/get-subgraph-url.js.map +1 -0
- package/_esm/config/subgraph/hosts.js +4 -9
- package/_esm/config/subgraph/hosts.js.map +1 -1
- package/_esm/config/subgraph/max-first.js +2 -2
- package/_esm/config/subgraph/max-first.js.map +1 -1
- package/_esm/config/subgraph/seconds-between-blocks.js +27 -27
- package/_esm/config/subgraph/seconds-between-blocks.js.map +1 -1
- package/_esm/config/subgraph/subgraphs/bentobox.js +23 -16
- package/_esm/config/subgraph/subgraphs/bentobox.js.map +1 -1
- package/_esm/config/subgraph/subgraphs/blocks.js +47 -40
- package/_esm/config/subgraph/subgraphs/blocks.js.map +1 -1
- package/_esm/config/subgraph/subgraphs/furo.js +25 -18
- package/_esm/config/subgraph/subgraphs/furo.js.map +1 -1
- package/_esm/config/subgraph/subgraphs/master-chef-v1.js +11 -2
- package/_esm/config/subgraph/subgraphs/master-chef-v1.js.map +1 -1
- package/_esm/config/subgraph/subgraphs/master-chef-v2.js +11 -2
- package/_esm/config/subgraph/subgraphs/master-chef-v2.js.map +1 -1
- package/_esm/config/subgraph/subgraphs/mini-chef.js +27 -20
- package/_esm/config/subgraph/subgraphs/mini-chef.js.map +1 -1
- package/_esm/config/subgraph/subgraphs/sushi-bar.js +11 -2
- package/_esm/config/subgraph/subgraphs/sushi-bar.js.map +1 -1
- package/_esm/config/subgraph/subgraphs/sushiswap-v2.js +49 -37
- package/_esm/config/subgraph/subgraphs/sushiswap-v2.js.map +1 -1
- package/_esm/config/subgraph/subgraphs/sushiswap-v3.js +44 -32
- package/_esm/config/subgraph/subgraphs/sushiswap-v3.js.map +1 -1
- package/_esm/config/token-chomper.js +85 -85
- package/_esm/config/token-chomper.js.map +1 -1
- package/_esm/config/token-maps/additional-bases.js +85 -81
- package/_esm/config/token-maps/additional-bases.js.map +1 -1
- package/_esm/config/token-maps/bases-to-check-trades-against.js +339 -339
- package/_esm/config/token-maps/bases-to-check-trades-against.js.map +1 -1
- package/_esm/config/token-maps/custom-bases.js +5 -5
- package/_esm/config/token-maps/custom-bases.js.map +1 -1
- package/_esm/config/token-maps/default-bases.js +369 -359
- package/_esm/config/token-maps/default-bases.js.map +1 -1
- package/_esm/config/token-maps/default-quote.js +71 -68
- package/_esm/config/token-maps/default-quote.js.map +1 -1
- package/_esm/config/token-maps/lsds.js +108 -108
- package/_esm/config/token-maps/lsds.js.map +1 -1
- package/_esm/config/token-maps/short-name-to-currency.js +256 -256
- package/_esm/config/token-maps/short-name-to-currency.js.map +1 -1
- package/_esm/config/token-maps/stables.js +212 -182
- package/_esm/config/token-maps/stables.js.map +1 -1
- package/_esm/config/token-security.js +16 -16
- package/_esm/config/token-security.js.map +1 -1
- package/_esm/config/wallet.js +77 -77
- package/_esm/config/wallet.js.map +1 -1
- package/_esm/config/wnative.js.map +1 -1
- package/_esm/currency/currency.js +1 -3
- package/_esm/currency/currency.js.map +1 -1
- package/_esm/currency/native.js +2 -2
- package/_esm/currency/native.js.map +1 -1
- package/_esm/currency/token-addresses.js +483 -483
- package/_esm/currency/token-addresses.js.map +1 -1
- package/_esm/currency/token.js.map +1 -1
- package/_esm/currency/tokens.js +195 -195
- package/_esm/currency/tokens.js.map +1 -1
- package/_esm/currency/zod.js +3 -2
- package/_esm/currency/zod.js.map +1 -1
- package/_esm/format/id.js +7 -3
- package/_esm/format/id.js.map +1 -1
- package/_esm/index.js +2 -2
- package/_esm/index.js.map +1 -1
- package/_esm/pool/sushiswap-v2/sushiswap-v2-pool.js +2 -2
- package/_esm/pool/sushiswap-v2/sushiswap-v2-pool.js.map +1 -1
- package/_esm/router/get-currency-combinations.js.map +1 -1
- package/_esm/token-list/wrapped-token-info.js.map +1 -1
- package/_types/address/getCreate2Address.d.ts +2 -2
- package/_types/address/getCreate2Address.d.ts.map +1 -1
- package/_types/api/price.d.ts +3 -3
- package/_types/api/price.d.ts.map +1 -1
- package/_types/chain/chain-key.d.ts +63 -0
- package/_types/chain/chain-key.d.ts.map +1 -0
- package/_types/chain/{generated-chain-data.d.ts.map → evm/generated-chain-data.d.ts.map} +1 -1
- package/_types/chain/evm/id.d.ts +58 -0
- package/_types/chain/evm/id.d.ts.map +1 -0
- package/_types/chain/evm/index.d.ts +1197 -0
- package/_types/chain/evm/index.d.ts.map +1 -0
- package/_types/chain/id.d.ts +2 -0
- package/_types/chain/id.d.ts.map +1 -1
- package/_types/chain/index.d.ts +3 -1190
- package/_types/chain/index.d.ts.map +1 -1
- package/_types/chain/non-evm/aptos/id.d.ts +5 -0
- package/_types/chain/non-evm/aptos/id.d.ts.map +1 -0
- package/_types/chain/non-evm/aptos/index.d.ts +13 -0
- package/_types/chain/non-evm/aptos/index.d.ts.map +1 -0
- package/_types/chain/non-evm/index.d.ts +3 -0
- package/_types/chain/non-evm/index.d.ts.map +1 -0
- package/_types/chain/non-evm/tron/id.d.ts +5 -0
- package/_types/chain/non-evm/tron/id.d.ts.map +1 -0
- package/_types/chain/non-evm/tron/index.d.ts +13 -0
- package/_types/chain/non-evm/tron/index.d.ts.map +1 -0
- package/_types/config/api.d.ts +1 -1
- package/_types/config/api.d.ts.map +1 -1
- package/_types/config/features/aggregator.d.ts +2 -2
- package/_types/config/features/aggregator.d.ts.map +1 -1
- package/_types/config/features/bentobox.d.ts +2 -2
- package/_types/config/features/bentobox.d.ts.map +1 -1
- package/_types/config/features/furo.d.ts +2 -2
- package/_types/config/features/furo.d.ts.map +1 -1
- package/_types/config/features/merkl.d.ts +2 -2
- package/_types/config/features/merkl.d.ts.map +1 -1
- package/_types/config/features/mini-chef.d.ts +2 -2
- package/_types/config/features/mini-chef.d.ts.map +1 -1
- package/_types/config/features/pancakeswap-v2.d.ts +2 -2
- package/_types/config/features/pancakeswap-v2.d.ts.map +1 -1
- package/_types/config/features/pancakeswap-v3.d.ts +2 -2
- package/_types/config/features/pancakeswap-v3.d.ts.map +1 -1
- package/_types/config/features/route-processor.d.ts +9 -9
- package/_types/config/features/route-processor.d.ts.map +1 -1
- package/_types/config/features/stargate.d.ts.map +1 -1
- package/_types/config/features/sushiswap-v2.d.ts +4 -4
- package/_types/config/features/sushiswap-v2.d.ts.map +1 -1
- package/_types/config/features/sushiswap-v3.d.ts +7 -6
- package/_types/config/features/sushiswap-v3.d.ts.map +1 -1
- package/_types/config/features/sushiswap.d.ts +2 -2
- package/_types/config/features/sushiswap.d.ts.map +1 -1
- package/_types/config/features/sushixswap.d.ts +5 -5
- package/_types/config/features/sushixswap.d.ts.map +1 -1
- package/_types/config/features/trident.d.ts +2 -2
- package/_types/config/features/trident.d.ts.map +1 -1
- package/_types/config/features/uniswap-v3.d.ts +2 -2
- package/_types/config/features/uniswap-v3.d.ts.map +1 -1
- package/_types/config/index.d.ts +0 -2
- package/_types/config/index.d.ts.map +1 -1
- package/_types/config/subgraph/get-subgraph-url.d.ts +20 -0
- package/_types/config/subgraph/get-subgraph-url.d.ts.map +1 -0
- package/_types/config/subgraph/hosts.d.ts +4 -3
- package/_types/config/subgraph/hosts.d.ts.map +1 -1
- package/_types/config/subgraph/max-first.d.ts +2 -2
- package/_types/config/subgraph/max-first.d.ts.map +1 -1
- package/_types/config/subgraph/seconds-between-blocks.d.ts +2 -2
- package/_types/config/subgraph/seconds-between-blocks.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/bentobox.d.ts +9 -2
- package/_types/config/subgraph/subgraphs/bentobox.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/blocks.d.ts +9 -2
- package/_types/config/subgraph/subgraphs/blocks.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/data-api.d.ts +1 -1
- package/_types/config/subgraph/subgraphs/data-api.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/furo.d.ts +9 -2
- package/_types/config/subgraph/subgraphs/furo.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/master-chef-v1.d.ts +9 -1
- package/_types/config/subgraph/subgraphs/master-chef-v1.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/master-chef-v2.d.ts +9 -1
- package/_types/config/subgraph/subgraphs/master-chef-v2.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/mini-chef.d.ts +9 -2
- package/_types/config/subgraph/subgraphs/mini-chef.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/sushi-bar.d.ts +9 -1
- package/_types/config/subgraph/subgraphs/sushi-bar.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/sushiswap-v2.d.ts +9 -2
- package/_types/config/subgraph/subgraphs/sushiswap-v2.d.ts.map +1 -1
- package/_types/config/subgraph/subgraphs/sushiswap-v3.d.ts +9 -2
- package/_types/config/subgraph/subgraphs/sushiswap-v3.d.ts.map +1 -1
- package/_types/config/token-chomper.d.ts +2 -2
- package/_types/config/token-chomper.d.ts.map +1 -1
- package/_types/config/token-maps/additional-bases.d.ts.map +1 -1
- package/_types/config/token-maps/default-bases.d.ts +1 -1
- package/_types/config/token-maps/default-bases.d.ts.map +1 -1
- package/_types/config/token-maps/default-quote.d.ts.map +1 -1
- package/_types/config/token-maps/lsds.d.ts.map +1 -1
- package/_types/config/token-maps/short-name-to-currency.d.ts +4 -4
- package/_types/config/token-maps/short-name-to-currency.d.ts.map +1 -1
- package/_types/config/token-maps/stables.d.ts.map +1 -1
- package/_types/config/token-security.d.ts +2 -2
- package/_types/config/token-security.d.ts.map +1 -1
- package/_types/config/wallet.d.ts +2 -2
- package/_types/config/wallet.d.ts.map +1 -1
- package/_types/config/wnative.d.ts +2 -2
- package/_types/config/wnative.d.ts.map +1 -1
- package/_types/currency/currency.d.ts +4 -4
- package/_types/currency/currency.d.ts.map +1 -1
- package/_types/currency/native.d.ts +3 -2
- package/_types/currency/native.d.ts.map +1 -1
- package/_types/currency/token.d.ts +2 -1
- package/_types/currency/token.d.ts.map +1 -1
- package/_types/currency/tokens.d.ts.map +1 -1
- package/_types/currency/zod.d.ts +10 -10
- package/_types/currency/zod.d.ts.map +1 -1
- package/_types/format/id.d.ts +1 -2
- package/_types/format/id.d.ts.map +1 -1
- package/_types/index.d.ts +2 -2
- package/_types/index.d.ts.map +1 -1
- package/_types/pool/sushiswap-v2/zod.d.ts +16 -16
- package/_types/pool/sushiswap-v3/utils/computePoolAddress.d.ts +2 -2
- package/_types/pool/sushiswap-v3/utils/computePoolAddress.d.ts.map +1 -1
- package/_types/pool/trident-constant-product/zod.d.ts +16 -16
- package/_types/pool/trident-stable/zod.d.ts +16 -16
- package/_types/router/get-currency-combinations.d.ts +3 -3
- package/_types/router/get-currency-combinations.d.ts.map +1 -1
- package/_types/token-list/wrapped-token-info.d.ts +3 -3
- package/_types/token-list/wrapped-token-info.d.ts.map +1 -1
- package/_types/types/sushi-pool/pool-id.d.ts +2 -2
- package/_types/types/sushi-pool/pool-id.d.ts.map +1 -1
- package/_types/types/sushi-pool/pool-with-incentives.d.ts +2 -2
- package/_types/types/sushi-pool/pool-with-incentives.d.ts.map +1 -1
- package/_types/types/token.d.ts +2 -2
- package/_types/types/token.d.ts.map +1 -1
- package/address/getCreate2Address.ts +7 -3
- package/api/price.ts +6 -3
- package/chain/chain-key.ts +17 -0
- package/chain/{generate.ts → evm/generate.ts} +10 -17
- package/chain/evm/id.ts +68 -0
- package/chain/evm/index.ts +371 -0
- package/chain/id.ts +8 -64
- package/chain/index.ts +3 -376
- package/chain/non-evm/aptos/id.ts +5 -0
- package/chain/non-evm/aptos/index.ts +23 -0
- package/chain/non-evm/index.ts +2 -0
- package/chain/non-evm/tron/id.ts +5 -0
- package/chain/non-evm/tron/index.ts +23 -0
- package/config/api.ts +1 -4
- package/config/features/aggregator.ts +10 -10
- package/config/features/bentobox.ts +44 -44
- package/config/features/extractor.ts +44 -44
- package/config/features/furo.ts +17 -17
- package/config/features/master-chef.ts +7 -7
- package/config/features/merkl.ts +19 -19
- package/config/features/mini-chef.ts +36 -36
- package/config/features/pancakeswap-v2.ts +25 -25
- package/config/features/pancakeswap-v3.ts +30 -30
- package/config/features/route-processor.ts +336 -337
- package/config/features/squid.ts +32 -32
- package/config/features/stargate.ts +598 -595
- package/config/features/sushiswap-v2.ts +202 -202
- package/config/features/sushiswap-v3.ts +169 -173
- package/config/features/sushiswap.ts +2 -2
- package/config/features/sushixswap.ts +95 -95
- package/config/features/trident.ts +48 -46
- package/config/features/uniswap-v2.ts +19 -19
- package/config/features/uniswap-v3.ts +68 -68
- package/config/governance.ts +2 -2
- package/config/index.ts +0 -2
- package/config/native-ids.ts +65 -65
- package/config/subgraph/get-subgraph-url.ts +107 -0
- package/config/subgraph/hosts.ts +8 -11
- package/config/subgraph/max-first.ts +5 -5
- package/config/subgraph/seconds-between-blocks.ts +28 -28
- package/config/subgraph/subgraphs/bentobox.ts +26 -20
- package/config/subgraph/subgraphs/blocks.ts +49 -41
- package/config/subgraph/subgraphs/furo.ts +27 -19
- package/config/subgraph/subgraphs/master-chef-v1.ts +11 -2
- package/config/subgraph/subgraphs/master-chef-v2.ts +11 -2
- package/config/subgraph/subgraphs/mini-chef.ts +30 -25
- package/config/subgraph/subgraphs/sushi-bar.ts +11 -2
- package/config/subgraph/subgraphs/sushiswap-v2.ts +52 -39
- package/config/subgraph/subgraphs/sushiswap-v3.ts +47 -34
- package/config/token-chomper.ts +86 -86
- package/config/token-maps/additional-bases.ts +85 -81
- package/config/token-maps/bases-to-check-trades-against.ts +339 -339
- package/config/token-maps/custom-bases.ts +5 -5
- package/config/token-maps/default-bases.ts +370 -360
- package/config/token-maps/default-quote.ts +72 -69
- package/config/token-maps/lsds.ts +109 -109
- package/config/token-maps/short-name-to-currency.ts +257 -257
- package/config/token-maps/stables.ts +213 -183
- package/config/token-security.ts +17 -17
- package/config/wallet.ts +78 -78
- package/config/wnative.ts +2 -2
- package/currency/currency.ts +4 -6
- package/currency/native.ts +4 -4
- package/currency/token-addresses.ts +483 -483
- package/currency/token.ts +2 -1
- package/currency/tokens.ts +204 -200
- package/currency/zod.ts +3 -2
- package/format/id.ts +8 -4
- package/index.ts +2 -2
- package/package.json +1 -1
- package/pool/sushiswap-v2/sushiswap-v2-pool.ts +2 -2
- package/pool/sushiswap-v3/utils/computePoolAddress.ts +2 -2
- package/router/get-currency-combinations.ts +3 -3
- package/token-list/wrapped-token-info.ts +3 -3
- package/types/sushi-pool/pool-id.ts +2 -2
- package/types/sushi-pool/pool-with-incentives.ts +2 -2
- package/types/token.ts +2 -2
- package/_cjs/chain/generated-chain-data.js.map +0 -1
- package/_cjs/config/viem.js +0 -849
- package/_cjs/config/viem.js.map +0 -1
- package/_cjs/lowercase-map.js +0 -19
- package/_cjs/lowercase-map.js.map +0 -1
- package/_esm/chain/generated-chain-data.js.map +0 -1
- package/_esm/config/viem.js +0 -906
- package/_esm/config/viem.js.map +0 -1
- package/_esm/lowercase-map.js +0 -15
- package/_esm/lowercase-map.js.map +0 -1
- package/_types/config/viem.d.ts +0 -5279
- package/_types/config/viem.d.ts.map +0 -1
- package/_types/lowercase-map.d.ts +0 -7
- package/_types/lowercase-map.d.ts.map +0 -1
- package/config/viem.ts +0 -1046
- package/lowercase-map.ts +0 -14
- /package/_cjs/chain/{generated-chain-data.js → evm/generated-chain-data.js} +0 -0
- /package/_esm/chain/{generated-chain-data.js → evm/generated-chain-data.js} +0 -0
- /package/_types/chain/{generated-chain-data.d.ts → evm/generated-chain-data.d.ts} +0 -0
- /package/chain/{generated-chain-data.ts → evm/generated-chain-data.ts} +0 -0
package/chain/index.ts
CHANGED
|
@@ -1,378 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export * from './evm/index.js'
|
|
2
|
+
export * from './non-evm/index.js'
|
|
3
3
|
|
|
4
4
|
export * from './id.js'
|
|
5
|
-
|
|
6
|
-
const additional = [] as const
|
|
7
|
-
|
|
8
|
-
const RAW = [...raw, ...additional] as const
|
|
9
|
-
|
|
10
|
-
const EIP3091_OVERRIDE = [
|
|
11
|
-
ChainId.OPTIMISM,
|
|
12
|
-
ChainId.BOBA,
|
|
13
|
-
ChainId.BASE,
|
|
14
|
-
ChainId.FILECOIN,
|
|
15
|
-
] as number[]
|
|
16
|
-
|
|
17
|
-
type Data = (typeof RAW)[number]
|
|
18
|
-
|
|
19
|
-
export interface Chain {
|
|
20
|
-
name: string
|
|
21
|
-
nativeCurrency: NativeCurrency
|
|
22
|
-
shortName: string
|
|
23
|
-
chainId: number
|
|
24
|
-
explorers?: Explorer[]
|
|
25
|
-
parent?: Parent
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface Explorer {
|
|
29
|
-
name: string
|
|
30
|
-
url: string
|
|
31
|
-
standard: Standard
|
|
32
|
-
icon?: string
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const Standard = {
|
|
36
|
-
Eip3091: 'EIP3091',
|
|
37
|
-
None: 'none',
|
|
38
|
-
} as const
|
|
39
|
-
|
|
40
|
-
type Standard = (typeof Standard)[keyof typeof Standard]
|
|
41
|
-
|
|
42
|
-
interface NativeCurrency {
|
|
43
|
-
name: string
|
|
44
|
-
symbol: string
|
|
45
|
-
decimals: number
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface Parent {
|
|
49
|
-
type: Type
|
|
50
|
-
chain: string
|
|
51
|
-
bridges?: Bridge[]
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
interface Bridge {
|
|
55
|
-
url: string
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const Type = {
|
|
59
|
-
L2: 'L2',
|
|
60
|
-
Shard: 'shard',
|
|
61
|
-
} as const
|
|
62
|
-
type Type = (typeof Type)[keyof typeof Type]
|
|
63
|
-
|
|
64
|
-
// biome-ignore lint/suspicious/noUnsafeDeclarationMerging: explaination
|
|
65
|
-
export class Chain implements Chain {
|
|
66
|
-
public static fromRaw(data: Data) {
|
|
67
|
-
return new Chain(data)
|
|
68
|
-
}
|
|
69
|
-
public static from(chainId: number) {
|
|
70
|
-
return chains[chainId]
|
|
71
|
-
}
|
|
72
|
-
public static fromShortName(shortName: string) {
|
|
73
|
-
const chainId = chainShortNameToChainId[shortName]
|
|
74
|
-
if (!chainId) throw new Error(`Unknown chain short name: ${shortName}`)
|
|
75
|
-
return Chain.from(chainId)
|
|
76
|
-
}
|
|
77
|
-
public static fromChainId(chainId: number) {
|
|
78
|
-
return Chain.from(chainId)
|
|
79
|
-
}
|
|
80
|
-
public static txUrl(chainId: number, txHash: string): string {
|
|
81
|
-
return Chain.fromChainId(chainId)?.getTxUrl(txHash) ?? ''
|
|
82
|
-
}
|
|
83
|
-
public static blockUrl(chainId: number, blockHashOrHeight: string): string {
|
|
84
|
-
return Chain.fromChainId(chainId)?.getBlockUrl(blockHashOrHeight) ?? ''
|
|
85
|
-
}
|
|
86
|
-
public static tokenUrl(chainId: number, tokenAddress: string): string {
|
|
87
|
-
return Chain.fromChainId(chainId)?.getTokenUrl(tokenAddress) ?? ''
|
|
88
|
-
}
|
|
89
|
-
public static accountUrl(chainId: number, accountAddress: string): string {
|
|
90
|
-
return Chain.fromChainId(chainId)?.getAccountUrl(accountAddress) ?? ''
|
|
91
|
-
}
|
|
92
|
-
constructor(data: Data) {
|
|
93
|
-
Object.assign(this, data)
|
|
94
|
-
|
|
95
|
-
// process name overrides
|
|
96
|
-
const targets = ['Mainnet', 'Opera', 'Mainnet Shard 0']
|
|
97
|
-
for (const target of targets) {
|
|
98
|
-
if (data.name.includes(target)) {
|
|
99
|
-
this.name = data.name.replace(target, '').trim()
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (data.name === 'Boba Network') {
|
|
104
|
-
this.name = 'Boba Eth'
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// process explorer overrides etc...
|
|
108
|
-
if (data.chainId === ChainId.SCROLL) {
|
|
109
|
-
this.explorers?.sort((explorer) =>
|
|
110
|
-
explorer.name === 'Scrollscan' ? -1 : 1,
|
|
111
|
-
)
|
|
112
|
-
} else if (data.chainId === ChainId.ARBITRUM_NOVA) {
|
|
113
|
-
this.explorers = [
|
|
114
|
-
{
|
|
115
|
-
name: 'Arbitrum Nova Explorer',
|
|
116
|
-
url: 'https://nova.arbiscan.io',
|
|
117
|
-
standard: 'EIP3091',
|
|
118
|
-
},
|
|
119
|
-
...(this.explorers ?? []),
|
|
120
|
-
]
|
|
121
|
-
} else if (data.chainId === ChainId.FILECOIN) {
|
|
122
|
-
this.name = 'Filecoin'
|
|
123
|
-
this.explorers?.sort((explorer) => (explorer.name === 'Filfox' ? -1 : 1))
|
|
124
|
-
} else if (data.chainId === ChainId.ZETACHAIN) {
|
|
125
|
-
this.name = 'ZetaChain'
|
|
126
|
-
this.explorers = [
|
|
127
|
-
{
|
|
128
|
-
name: 'ZetaChain Mainnet Explorer',
|
|
129
|
-
url: 'https://zetachain.blockscout.com',
|
|
130
|
-
standard: 'EIP3091',
|
|
131
|
-
},
|
|
132
|
-
]
|
|
133
|
-
} else if (data.chainId === ChainId.BLAST) {
|
|
134
|
-
this.explorers = [
|
|
135
|
-
{
|
|
136
|
-
name: 'Blast Explorer',
|
|
137
|
-
url: 'https://blastscan.io',
|
|
138
|
-
standard: 'EIP3091',
|
|
139
|
-
},
|
|
140
|
-
]
|
|
141
|
-
} else if (data.chainId === ChainId.SKALE_EUROPA) {
|
|
142
|
-
this.name = 'SKALE Europa'
|
|
143
|
-
} else if (data.chainId === ChainId.ROOTSTOCK) {
|
|
144
|
-
this.explorers?.sort((explorer) =>
|
|
145
|
-
explorer.name === 'blockscout' ? -1 : 1,
|
|
146
|
-
)
|
|
147
|
-
} else if (data.chainId === ChainId.MOONBEAM) {
|
|
148
|
-
this.explorers = [
|
|
149
|
-
{
|
|
150
|
-
name: 'Moonscan',
|
|
151
|
-
url: 'https://moonscan.io',
|
|
152
|
-
standard: 'EIP3091',
|
|
153
|
-
},
|
|
154
|
-
]
|
|
155
|
-
} else if (data.chainId === ChainId.SONIC) {
|
|
156
|
-
this.explorers = [
|
|
157
|
-
{
|
|
158
|
-
name: 'Sonic Scan',
|
|
159
|
-
url: 'https://sonicscan.org',
|
|
160
|
-
standard: 'EIP3091',
|
|
161
|
-
},
|
|
162
|
-
]
|
|
163
|
-
} else if (data.chainId === ChainId.HEMI) {
|
|
164
|
-
this.explorers = [
|
|
165
|
-
{
|
|
166
|
-
name: 'Hemi Explorer',
|
|
167
|
-
url: 'https://explorer.hemi.xyz',
|
|
168
|
-
standard: 'EIP3091',
|
|
169
|
-
},
|
|
170
|
-
]
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
getTxUrl(txHash: string): string {
|
|
174
|
-
if (!this.explorers) return ''
|
|
175
|
-
for (const explorer of this.explorers) {
|
|
176
|
-
if (
|
|
177
|
-
explorer.standard === Standard.Eip3091 ||
|
|
178
|
-
EIP3091_OVERRIDE.includes(this.chainId)
|
|
179
|
-
) {
|
|
180
|
-
return `${explorer.url}/tx/${txHash}`
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return ''
|
|
184
|
-
}
|
|
185
|
-
getBlockUrl(blockHashOrHeight: string): string {
|
|
186
|
-
if (!this.explorers) return ''
|
|
187
|
-
for (const explorer of this.explorers) {
|
|
188
|
-
if (explorer.standard === Standard.Eip3091) {
|
|
189
|
-
return `${explorer.url}/block/${blockHashOrHeight}`
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return ''
|
|
193
|
-
}
|
|
194
|
-
getTokenUrl(tokenAddress: string): string {
|
|
195
|
-
if (!this.explorers) return ''
|
|
196
|
-
for (const explorer of this.explorers) {
|
|
197
|
-
if (
|
|
198
|
-
explorer.standard === Standard.Eip3091 ||
|
|
199
|
-
EIP3091_OVERRIDE.includes(this.chainId)
|
|
200
|
-
) {
|
|
201
|
-
return `${explorer.url}/token/${tokenAddress}`
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return ''
|
|
205
|
-
}
|
|
206
|
-
getAccountUrl(accountAddress: string): string {
|
|
207
|
-
if (!this.explorers) return ''
|
|
208
|
-
for (const explorer of this.explorers) {
|
|
209
|
-
if (
|
|
210
|
-
explorer.standard === Standard.Eip3091 ||
|
|
211
|
-
EIP3091_OVERRIDE.includes(this.chainId)
|
|
212
|
-
) {
|
|
213
|
-
return `${explorer.url}/address/${accountAddress}`
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
return ''
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export const natives = Object.fromEntries(
|
|
221
|
-
RAW.map((data): [ChainId, NativeCurrency] => [
|
|
222
|
-
data.chainId,
|
|
223
|
-
data.nativeCurrency,
|
|
224
|
-
]),
|
|
225
|
-
)
|
|
226
|
-
|
|
227
|
-
// Chain Id => Chain mapping
|
|
228
|
-
export const chains = Object.fromEntries(
|
|
229
|
-
RAW.map((data): [ChainId, Chain] => [data.chainId, new Chain(data)]),
|
|
230
|
-
)
|
|
231
|
-
|
|
232
|
-
// Chain Id => Chain mapping
|
|
233
|
-
export const chainsL2 = Object.fromEntries(
|
|
234
|
-
RAW.filter((data) => 'parent' in data && data.parent.type === Type.L2).map(
|
|
235
|
-
(data): [ChainId, Chain] => [data.chainId, new Chain(data)],
|
|
236
|
-
),
|
|
237
|
-
)
|
|
238
|
-
|
|
239
|
-
// ChainId array
|
|
240
|
-
export const chainIds = RAW.map((chain) => chain.chainId)
|
|
241
|
-
|
|
242
|
-
// Chain Short Name => Chain Id mapping
|
|
243
|
-
export const chainShortNameToChainId = Object.fromEntries(
|
|
244
|
-
RAW.map((data): [string, number] => [data.shortName, data.chainId]),
|
|
245
|
-
)
|
|
246
|
-
|
|
247
|
-
// Chain Id => Short Name mapping
|
|
248
|
-
export const chainShortName = Object.fromEntries(
|
|
249
|
-
RAW.map((data): [number, string] => [
|
|
250
|
-
data.chainId,
|
|
251
|
-
Chain.fromRaw(data).shortName,
|
|
252
|
-
]),
|
|
253
|
-
)
|
|
254
|
-
|
|
255
|
-
// Chain Id => Chain Name mapping
|
|
256
|
-
export const chainName = Object.fromEntries(
|
|
257
|
-
RAW.map((data): [number, string] => [data.chainId, Chain.fromRaw(data).name]),
|
|
258
|
-
)
|
|
259
|
-
|
|
260
|
-
export const getChainInfo = (
|
|
261
|
-
input: string,
|
|
262
|
-
):
|
|
263
|
-
| { chainId: ChainId; networkName: ChainKey }
|
|
264
|
-
| { chainId: undefined; networkName: undefined } => {
|
|
265
|
-
const _networkName = input.toLowerCase()
|
|
266
|
-
const _chainId = Number.parseInt(input)
|
|
267
|
-
|
|
268
|
-
if (isChainId(_chainId)) {
|
|
269
|
-
const networkName = ChainKey[_chainId]
|
|
270
|
-
return { chainId: _chainId, networkName }
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
if (isNetworkNameKey(_networkName)) {
|
|
274
|
-
const chainId = NetworkNameKey[_networkName]
|
|
275
|
-
return { chainId, networkName: _networkName }
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
return { chainId: undefined, networkName: undefined }
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export const TESTNET_CHAIN_IDS = [
|
|
282
|
-
ChainId.ARBITRUM_TESTNET,
|
|
283
|
-
ChainId.AVALANCHE_TESTNET,
|
|
284
|
-
ChainId.BSC_TESTNET,
|
|
285
|
-
ChainId.FANTOM_TESTNET,
|
|
286
|
-
// ChainId.HECO_TESTNET,
|
|
287
|
-
// ChainId.HARMONY_TESTNET,
|
|
288
|
-
// ChainId.OKEX_TESTNET,
|
|
289
|
-
ChainId.POLYGON_TESTNET,
|
|
290
|
-
ChainId.SEPOLIA,
|
|
291
|
-
// ChainId.ROPSTEN,
|
|
292
|
-
// ChainId.RINKEBY,
|
|
293
|
-
// ChainId.GÖRLI,
|
|
294
|
-
// ChainId.KOVAN,
|
|
295
|
-
ChainId.CURTIS,
|
|
296
|
-
] as const
|
|
297
|
-
export type TestnetChainId = (typeof TESTNET_CHAIN_IDS)[number]
|
|
298
|
-
|
|
299
|
-
export const isChainId = (chainId: number): chainId is ChainId =>
|
|
300
|
-
Object.values(ChainId).includes(chainId as ChainId)
|
|
301
|
-
|
|
302
|
-
export const ChainKey = {
|
|
303
|
-
[ChainId.ARBITRUM]: 'arbitrum',
|
|
304
|
-
[ChainId.ARBITRUM_NOVA]: 'arbitrum-nova',
|
|
305
|
-
[ChainId.ARBITRUM_TESTNET]: 'arbitrum-testnet',
|
|
306
|
-
[ChainId.AVALANCHE]: 'avalanche',
|
|
307
|
-
[ChainId.AVALANCHE_TESTNET]: 'avalance-testnet',
|
|
308
|
-
[ChainId.BSC]: 'bsc',
|
|
309
|
-
[ChainId.BSC_TESTNET]: 'bsc-testnet',
|
|
310
|
-
[ChainId.CELO]: 'celo',
|
|
311
|
-
[ChainId.ETHEREUM]: 'ethereum',
|
|
312
|
-
[ChainId.FANTOM]: 'fantom',
|
|
313
|
-
[ChainId.FANTOM_TESTNET]: 'fantom-testnet',
|
|
314
|
-
[ChainId.FUSE]: 'fuse',
|
|
315
|
-
[ChainId.GÖRLI]: 'goerli',
|
|
316
|
-
[ChainId.HARMONY]: 'harmony',
|
|
317
|
-
// [ChainId.HARMONY_TESTNET]: 'harmony-testnet',
|
|
318
|
-
[ChainId.HECO]: 'heco',
|
|
319
|
-
// [ChainId.HECO_TESTNET]: 'heco-testnet',
|
|
320
|
-
// [ChainId.KOVAN]: 'kovan',
|
|
321
|
-
// [ChainId.ROPSTEN]: 'ropsten',
|
|
322
|
-
[ChainId.POLYGON]: 'polygon',
|
|
323
|
-
[ChainId.POLYGON_TESTNET]: 'matic-testnet',
|
|
324
|
-
[ChainId.MOONBEAM]: 'moonbeam',
|
|
325
|
-
// [ChainId.MOONBEAM_TESTNET]: 'moonbeam-testnet',
|
|
326
|
-
[ChainId.MOONRIVER]: 'moonriver',
|
|
327
|
-
[ChainId.OKEX]: 'okex',
|
|
328
|
-
// [ChainId.OKEX_TESTNET]: 'okex-testnet',
|
|
329
|
-
[ChainId.PALM]: 'palm',
|
|
330
|
-
// [ChainId.PALM_TESTNET]: 'palm-testnet',
|
|
331
|
-
// [ChainId.RINKEBY]: 'rinkeby',
|
|
332
|
-
[ChainId.TELOS]: 'telos',
|
|
333
|
-
[ChainId.GNOSIS]: 'gnosis',
|
|
334
|
-
[ChainId.OPTIMISM]: 'optimism',
|
|
335
|
-
[ChainId.KAVA]: 'kava',
|
|
336
|
-
[ChainId.METIS]: 'metis',
|
|
337
|
-
[ChainId.BOBA]: 'boba',
|
|
338
|
-
[ChainId.BOBA_AVAX]: 'boba-avax',
|
|
339
|
-
[ChainId.BOBA_BNB]: 'boba-bnb',
|
|
340
|
-
[ChainId.BTTC]: 'bttc',
|
|
341
|
-
// [ChainId.CONSENSUS_ZKEVM_TESTNET]: 'consensus-zkevm-testnet',
|
|
342
|
-
// [ChainId.SCROLL_ALPHA_TESTNET]: 'scroll-alpha-testnet',
|
|
343
|
-
// [ChainId.BASE_TESTNET]:'base-testnet',
|
|
344
|
-
[ChainId.POLYGON_ZKEVM]: 'polygon-zkevm',
|
|
345
|
-
[ChainId.THUNDERCORE]: 'thundercore',
|
|
346
|
-
[ChainId.HAQQ]: 'haqq',
|
|
347
|
-
[ChainId.CORE]: 'core',
|
|
348
|
-
[ChainId.ZKSYNC_ERA]: 'zksync-era',
|
|
349
|
-
[ChainId.LINEA]: 'linea',
|
|
350
|
-
[ChainId.BASE]: 'base',
|
|
351
|
-
[ChainId.FILECOIN]: 'filecoin',
|
|
352
|
-
[ChainId.SEPOLIA]: 'sepolia',
|
|
353
|
-
[ChainId.SCROLL]: 'scroll',
|
|
354
|
-
[ChainId.ZETACHAIN]: 'zetachain',
|
|
355
|
-
[ChainId.CRONOS]: 'cronos',
|
|
356
|
-
[ChainId.BLAST]: 'blast',
|
|
357
|
-
[ChainId.SKALE_EUROPA]: 'skale-europa',
|
|
358
|
-
[ChainId.ROOTSTOCK]: 'rootstock',
|
|
359
|
-
[ChainId.MANTLE]: 'mantle',
|
|
360
|
-
[ChainId.CURTIS]: 'curtis',
|
|
361
|
-
[ChainId.MANTA]: 'manta',
|
|
362
|
-
[ChainId.MODE]: 'mode',
|
|
363
|
-
[ChainId.TAIKO]: 'taiko',
|
|
364
|
-
[ChainId.ZKLINK]: 'zklink',
|
|
365
|
-
[ChainId.APE]: 'ape',
|
|
366
|
-
[ChainId.SONIC]: 'sonic',
|
|
367
|
-
[ChainId.HEMI]: 'hemi',
|
|
368
|
-
} as const
|
|
369
|
-
export type ChainKey = (typeof ChainKey)[keyof typeof ChainKey]
|
|
370
|
-
|
|
371
|
-
export const NetworkNameKey = Object.fromEntries(
|
|
372
|
-
Object.entries(ChainKey).map(([key, value]) => [value, Number(key)]),
|
|
373
|
-
) as { [key in ChainKey]: ChainId }
|
|
374
|
-
|
|
375
|
-
export const isNetworkNameKey = (key: string): key is ChainKey =>
|
|
376
|
-
Object.keys(NetworkNameKey).includes(key)
|
|
377
|
-
|
|
378
|
-
export default chains
|
|
5
|
+
export * from './chain-key.js'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AptosChainId } from './id.js'
|
|
2
|
+
|
|
3
|
+
export * from './id.js'
|
|
4
|
+
|
|
5
|
+
export const aptosChainIds = Object.values(AptosChainId)
|
|
6
|
+
|
|
7
|
+
export const APTOS_TESTNET_CHAIN_IDS = [] as const
|
|
8
|
+
export type AptosTestnetChainId = (typeof APTOS_TESTNET_CHAIN_IDS)[number]
|
|
9
|
+
|
|
10
|
+
export const isAptosChainId = (chainId: number): chainId is AptosChainId =>
|
|
11
|
+
Object.values(AptosChainId).includes(chainId as AptosChainId)
|
|
12
|
+
|
|
13
|
+
export const AptosChainKey = {
|
|
14
|
+
[AptosChainId.APTOS]: 'aptos',
|
|
15
|
+
} as const satisfies Record<AptosChainId, string>
|
|
16
|
+
export type AptosChainKey = (typeof AptosChainKey)[keyof typeof AptosChainKey]
|
|
17
|
+
|
|
18
|
+
export const AptosNetworkNameKey = Object.fromEntries(
|
|
19
|
+
Object.entries(AptosChainKey).map(([key, value]) => [value, Number(key)]),
|
|
20
|
+
) as { [key in AptosChainKey]: AptosChainId }
|
|
21
|
+
|
|
22
|
+
export const isAptosNetworkNameKey = (key: string): key is AptosChainKey =>
|
|
23
|
+
Object.keys(AptosNetworkNameKey).includes(key)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TronChainId } from './id.js'
|
|
2
|
+
|
|
3
|
+
export * from './id.js'
|
|
4
|
+
|
|
5
|
+
export const tronChainIds = Object.values(TronChainId)
|
|
6
|
+
|
|
7
|
+
export const TRON_TESTNET_CHAIN_IDS = [] as const
|
|
8
|
+
export type TronTestnetChainId = (typeof TRON_TESTNET_CHAIN_IDS)[number]
|
|
9
|
+
|
|
10
|
+
export const isTronChainId = (chainId: number): chainId is TronChainId =>
|
|
11
|
+
Object.values(TronChainId).includes(chainId as TronChainId)
|
|
12
|
+
|
|
13
|
+
export const TronChainKey = {
|
|
14
|
+
[TronChainId.TRON]: 'tron',
|
|
15
|
+
} as const satisfies Record<TronChainId, string>
|
|
16
|
+
export type TronChainKey = (typeof TronChainKey)[keyof typeof TronChainKey]
|
|
17
|
+
|
|
18
|
+
export const TronNetworkNameKey = Object.fromEntries(
|
|
19
|
+
Object.entries(TronChainKey).map(([key, value]) => [value, Number(key)]),
|
|
20
|
+
) as { [key in TronChainKey]: TronChainId }
|
|
21
|
+
|
|
22
|
+
export const isTronNetworkNameKey = (key: string): key is TronChainKey =>
|
|
23
|
+
Object.keys(TronNetworkNameKey).includes(key)
|
package/config/api.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvmChainId } from '../../chain/evm/index.js'
|
|
2
2
|
|
|
3
3
|
export const AGGREGATOR_ONLY_CHAIN_IDS = [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
EvmChainId.CRONOS,
|
|
5
|
+
EvmChainId.MANTLE,
|
|
6
|
+
EvmChainId.ZKSYNC_ERA,
|
|
7
|
+
EvmChainId.MANTA,
|
|
8
|
+
EvmChainId.MODE,
|
|
9
|
+
EvmChainId.TAIKO,
|
|
10
|
+
EvmChainId.ZKLINK,
|
|
11
|
+
EvmChainId.APE,
|
|
12
12
|
] as const
|
|
13
13
|
|
|
14
14
|
export type AggregatorOnlyChainId = (typeof AGGREGATOR_ONLY_CHAIN_IDS)[number]
|
|
15
15
|
|
|
16
16
|
export const isAggregatorOnlyChainId = (
|
|
17
|
-
chainId:
|
|
17
|
+
chainId: EvmChainId,
|
|
18
18
|
): chainId is AggregatorOnlyChainId =>
|
|
19
19
|
AGGREGATOR_ONLY_CHAIN_IDS.includes(chainId as AggregatorOnlyChainId)
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvmChainId } from '../../chain/evm/index.js'
|
|
2
2
|
|
|
3
3
|
export const BENTOBOX_SUPPORTED_CHAIN_IDS = [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
4
|
+
EvmChainId.ARBITRUM,
|
|
5
|
+
EvmChainId.ARBITRUM_NOVA,
|
|
6
|
+
EvmChainId.AVALANCHE,
|
|
7
|
+
EvmChainId.BOBA,
|
|
8
|
+
EvmChainId.BOBA_AVAX,
|
|
9
|
+
EvmChainId.BOBA_BNB,
|
|
10
|
+
EvmChainId.BSC,
|
|
11
|
+
EvmChainId.BTTC,
|
|
12
|
+
EvmChainId.CELO,
|
|
13
|
+
EvmChainId.ETHEREUM,
|
|
14
|
+
EvmChainId.FANTOM,
|
|
15
|
+
EvmChainId.FUSE,
|
|
16
|
+
EvmChainId.GNOSIS,
|
|
17
|
+
EvmChainId.HARMONY,
|
|
18
|
+
EvmChainId.HECO,
|
|
19
|
+
EvmChainId.KAVA,
|
|
20
|
+
EvmChainId.METIS,
|
|
21
|
+
EvmChainId.MOONBEAM,
|
|
22
|
+
EvmChainId.MOONRIVER,
|
|
23
|
+
EvmChainId.OPTIMISM,
|
|
24
|
+
EvmChainId.POLYGON,
|
|
25
25
|
] as const
|
|
26
26
|
|
|
27
27
|
export type BentoBoxChainId = (typeof BENTOBOX_SUPPORTED_CHAIN_IDS)[number]
|
|
28
28
|
|
|
29
29
|
export const BENTOBOX_ADDRESS: Record<BentoBoxChainId, `0x${string}`> = {
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
30
|
+
[EvmChainId.ARBITRUM]: '0x74c764D41B77DBbb4fe771daB1939B00b146894A',
|
|
31
|
+
[EvmChainId.ARBITRUM_NOVA]: '0xbE811A0D44E2553d25d11CB8DC0d3F0D0E6430E6',
|
|
32
|
+
[EvmChainId.AVALANCHE]: '0x0711B6026068f736bae6B213031fCE978D48E026',
|
|
33
|
+
[EvmChainId.BOBA]: '0x0769fd68dFb93167989C6f7254cd0D766Fb2841F',
|
|
34
|
+
[EvmChainId.BOBA_AVAX]: '0x0769fd68dFb93167989C6f7254cd0D766Fb2841F',
|
|
35
|
+
[EvmChainId.BOBA_BNB]: '0x0769fd68dFb93167989C6f7254cd0D766Fb2841F',
|
|
36
|
+
[EvmChainId.BSC]: '0xF5BCE5077908a1b7370B9ae04AdC565EBd643966',
|
|
37
|
+
[EvmChainId.BTTC]: '0x8dacffa7F69Ce572992132697252E16254225D38',
|
|
38
|
+
[EvmChainId.CELO]: '0x0711B6026068f736bae6B213031fCE978D48E026',
|
|
39
|
+
[EvmChainId.ETHEREUM]: '0xF5BCE5077908a1b7370B9ae04AdC565EBd643966',
|
|
40
|
+
[EvmChainId.FANTOM]: '0xF5BCE5077908a1b7370B9ae04AdC565EBd643966',
|
|
41
|
+
[EvmChainId.FUSE]: '0x0BE808376Ecb75a5CF9bB6D237d16cd37893d904',
|
|
42
|
+
[EvmChainId.GNOSIS]: '0xE2d7F5dd869Fc7c126D21b13a9080e75a4bDb324',
|
|
43
|
+
[EvmChainId.HARMONY]: '0x6b2A3FF504798886862Ca5ce501e080947A506A2',
|
|
44
|
+
[EvmChainId.HECO]: '0xF5BCE5077908a1b7370B9ae04AdC565EBd643966',
|
|
45
|
+
[EvmChainId.KAVA]: '0xc35DADB65012eC5796536bD9864eD8773aBc74C4',
|
|
46
|
+
[EvmChainId.METIS]: '0xc35DADB65012eC5796536bD9864eD8773aBc74C4',
|
|
47
|
+
[EvmChainId.MOONBEAM]: '0x80C7DD17B01855a6D2347444a0FCC36136a314de',
|
|
48
|
+
[EvmChainId.MOONRIVER]: '0x145d82bCa93cCa2AE057D1c6f26245d1b9522E6F',
|
|
49
|
+
[EvmChainId.OPTIMISM]: '0xc35DADB65012eC5796536bD9864eD8773aBc74C4',
|
|
50
|
+
[EvmChainId.POLYGON]: '0x0319000133d3AdA02600f0875d2cf03D442C3367',
|
|
51
51
|
} as const
|
|
52
52
|
|
|
53
53
|
export const isBentoBoxChainId = (
|
|
54
|
-
chainId:
|
|
54
|
+
chainId: EvmChainId,
|
|
55
55
|
): chainId is BentoBoxChainId =>
|
|
56
56
|
BENTOBOX_SUPPORTED_CHAIN_IDS.includes(chainId as BentoBoxChainId)
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EvmChainId } from '../../chain/evm/index.js'
|
|
2
2
|
|
|
3
3
|
export const EXTRACTOR_SUPPORTED_CHAIN_IDS = [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
4
|
+
EvmChainId.ARBITRUM,
|
|
5
|
+
EvmChainId.ARBITRUM_NOVA,
|
|
6
|
+
EvmChainId.AVALANCHE,
|
|
7
|
+
EvmChainId.BASE,
|
|
8
|
+
EvmChainId.BOBA,
|
|
9
|
+
EvmChainId.BOBA_BNB,
|
|
10
|
+
EvmChainId.BSC,
|
|
11
|
+
EvmChainId.BTTC,
|
|
12
|
+
EvmChainId.CELO,
|
|
13
|
+
EvmChainId.CORE,
|
|
14
|
+
EvmChainId.ETHEREUM,
|
|
15
|
+
EvmChainId.FANTOM,
|
|
16
|
+
EvmChainId.FILECOIN,
|
|
17
|
+
EvmChainId.FUSE,
|
|
18
|
+
EvmChainId.GNOSIS,
|
|
19
|
+
EvmChainId.HAQQ,
|
|
20
|
+
EvmChainId.HARMONY,
|
|
21
|
+
EvmChainId.KAVA,
|
|
22
|
+
EvmChainId.LINEA,
|
|
23
|
+
EvmChainId.METIS,
|
|
24
|
+
EvmChainId.MOONBEAM,
|
|
25
|
+
EvmChainId.MOONRIVER,
|
|
26
|
+
EvmChainId.OPTIMISM,
|
|
27
|
+
EvmChainId.POLYGON,
|
|
28
|
+
EvmChainId.POLYGON_ZKEVM,
|
|
29
|
+
EvmChainId.SCROLL,
|
|
30
|
+
EvmChainId.TELOS,
|
|
31
|
+
EvmChainId.THUNDERCORE,
|
|
32
|
+
EvmChainId.ZETACHAIN,
|
|
33
|
+
EvmChainId.CRONOS,
|
|
34
|
+
EvmChainId.BLAST,
|
|
35
|
+
EvmChainId.SKALE_EUROPA,
|
|
36
|
+
EvmChainId.ROOTSTOCK,
|
|
37
|
+
EvmChainId.MANTLE,
|
|
38
|
+
EvmChainId.ZKSYNC_ERA,
|
|
39
|
+
EvmChainId.CURTIS,
|
|
40
|
+
EvmChainId.MANTA,
|
|
41
|
+
EvmChainId.MODE,
|
|
42
|
+
EvmChainId.TAIKO,
|
|
43
|
+
EvmChainId.ZKLINK,
|
|
44
|
+
EvmChainId.APE,
|
|
45
|
+
EvmChainId.SONIC,
|
|
46
|
+
EvmChainId.HEMI,
|
|
47
47
|
] as const
|
|
48
48
|
|
|
49
49
|
export type ExtractorSupportedChainId =
|