sushi 6.1.3 → 6.1.4
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/_cjs/evm/abi/bentoBoxV1Abi/index.js +2 -2
- package/_cjs/evm/abi/bentoBoxV1Abi/index.js.map +1 -1
- package/_cjs/evm/abi/cloneRewarderTimeAbi/index.js +1 -1
- package/_cjs/evm/abi/cloneRewarderTimeAbi/index.js.map +1 -1
- package/_cjs/evm/abi/eip2612Abi/index.js +1 -1
- package/_cjs/evm/abi/eip2612Abi/index.js.map +1 -1
- package/_cjs/evm/abi/erc20Abi/index.js +5 -5
- package/_cjs/evm/abi/erc20Abi/index.js.map +1 -1
- package/_cjs/evm/abi/furoVestingAbi/index.js +1 -1
- package/_cjs/evm/abi/furoVestingAbi/index.js.map +1 -1
- package/_cjs/evm/abi/masterChefV1Abi/index.js +1 -1
- package/_cjs/evm/abi/masterChefV1Abi/index.js.map +1 -1
- package/_cjs/evm/abi/masterChefV2Abi/index.js +3 -3
- package/_cjs/evm/abi/masterChefV2Abi/index.js.map +1 -1
- package/_cjs/evm/abi/miniChefAbi/index.js +1 -1
- package/_cjs/evm/abi/miniChefAbi/index.js.map +1 -1
- package/_cjs/evm/abi/miniChefV2Abi/index.js +1 -1
- package/_cjs/evm/abi/miniChefV2Abi/index.js.map +1 -1
- package/_cjs/evm/abi/nonfungiblePositionManagerAbi/index.js +3 -3
- package/_cjs/evm/abi/nonfungiblePositionManagerAbi/index.js.map +1 -1
- package/_cjs/evm/abi/permit2Abi/index.js +1 -1
- package/_cjs/evm/abi/permit2Abi/index.js.map +1 -1
- package/_cjs/evm/abi/squidRouterAbi/index.js +1 -1
- package/_cjs/evm/abi/squidRouterAbi/index.js.map +1 -1
- package/_cjs/evm/abi/stargateAdapterAbi/index.js +1 -1
- package/_cjs/evm/abi/stargateAdapterAbi/index.js.map +1 -1
- package/_cjs/evm/abi/stargateFeeLibraryV03Abi/index.js +5 -5
- package/_cjs/evm/abi/stargateFeeLibraryV03Abi/index.js.map +1 -1
- package/_cjs/evm/abi/stargatePoolAbi/index.js +4 -4
- package/_cjs/evm/abi/stargatePoolAbi/index.js.map +1 -1
- package/_cjs/evm/abi/tridentConstantPoolAbi/index.js +3 -3
- package/_cjs/evm/abi/tridentConstantPoolAbi/index.js.map +1 -1
- package/_cjs/evm/abi/uniswapV2PairAbi/index.js +3 -3
- package/_cjs/evm/abi/uniswapV2PairAbi/index.js.map +1 -1
- package/_cjs/evm/abi/uniswapV2RouterAbi/index.js +2 -2
- package/_cjs/evm/abi/uniswapV2RouterAbi/index.js.map +1 -1
- package/_cjs/evm/abi/v3baseAbi/index.js +1 -1
- package/_cjs/evm/abi/v3baseAbi/index.js.map +1 -1
- package/_cjs/evm/abi/weth9Abi/index.js +7 -7
- package/_cjs/evm/abi/weth9Abi/index.js.map +1 -1
- package/_cjs/evm/api/index.js +1 -1
- package/_cjs/evm/api/index.js.map +1 -1
- package/_cjs/evm/api/types.js +2 -2
- package/_cjs/evm/api/types.js.map +1 -1
- package/_cjs/evm/chain/chains.js.map +1 -1
- package/_cjs/evm/config/drpc.js.map +1 -1
- package/_cjs/evm/config/features/index.js +5 -5
- package/_cjs/evm/config/features/index.js.map +1 -1
- package/_cjs/evm/config/features/sushiswap.js +4 -3
- package/_cjs/evm/config/features/sushiswap.js.map +1 -1
- package/_cjs/evm/config/index.js +2 -2
- package/_cjs/evm/config/index.js.map +1 -1
- package/_cjs/evm/config/subgraphs/subgraphs/blade.js +1 -13
- package/_cjs/evm/config/subgraphs/subgraphs/blade.js.map +1 -1
- package/_cjs/evm/config/subgraphs/subgraphs/blocks.js +1 -12
- package/_cjs/evm/config/subgraphs/subgraphs/blocks.js.map +1 -1
- package/_cjs/evm/config/subgraphs/subgraphs/index.js +2 -2
- package/_cjs/evm/config/subgraphs/subgraphs/index.js.map +1 -1
- package/_cjs/evm/config/subgraphs/subgraphs/sushiswap-v2.js +1 -11
- package/_cjs/evm/config/subgraphs/subgraphs/sushiswap-v2.js.map +1 -1
- package/_cjs/evm/config/subgraphs/subgraphs/sushiswap-v3.js +1 -11
- package/_cjs/evm/config/subgraphs/subgraphs/sushiswap-v3.js.map +1 -1
- package/_cjs/evm/config/tokens/token-maps/default-bases.js.map +1 -1
- package/_cjs/evm/config/tokens/token-maps/stables.js +1 -1
- package/_cjs/evm/config/tokens/token-maps/stables.js.map +1 -1
- package/_cjs/evm/config/tokens/tokens/index.js +13 -13
- package/_cjs/evm/config/tokens/tokens/index.js.map +1 -1
- package/_cjs/evm/config/tokens/wrapped-native.js.map +1 -1
- package/_cjs/evm/currency/native.js.map +1 -1
- package/_cjs/evm/currency/token.js +2 -2
- package/_cjs/evm/currency/token.js.map +1 -1
- package/_cjs/evm/token-list/index.js +1 -1
- package/_cjs/evm/token-list/index.js.map +1 -1
- package/_cjs/evm/types/index.js.map +1 -1
- package/_cjs/evm/types/sushi-pool/index.js +1 -1
- package/_cjs/evm/types/sushi-pool/index.js.map +1 -1
- package/_cjs/evm/types/sushi-position/index.js +1 -1
- package/_cjs/evm/types/sushi-position/index.js.map +1 -1
- package/_cjs/generic/chain/index.js.map +1 -1
- package/_cjs/generic/currency/token.js +1 -1
- package/_cjs/generic/currency/token.js.map +1 -1
- package/_cjs/generic/format/number.js +1 -1
- package/_cjs/generic/format/number.js.map +1 -1
- package/_cjs/generic/math/index.js +6 -6
- package/_cjs/generic/math/index.js.map +1 -1
- package/_cjs/generic/utils/id.js +4 -1
- package/_cjs/generic/utils/id.js.map +1 -1
- package/_cjs/kvm/currency/token.js.map +1 -1
- package/_cjs/mvm/currency/token.js +3 -0
- package/_cjs/mvm/currency/token.js.map +1 -1
- package/_cjs/tvm/abi/factoryAbi/index.js +1 -1
- package/_cjs/tvm/abi/factoryAbi/index.js.map +1 -1
- package/_cjs/tvm/abi/pairAbi/index.js +8 -8
- package/_cjs/tvm/abi/pairAbi/index.js.map +1 -1
- package/_cjs/tvm/abi/routerAbi/index.js +1 -1
- package/_cjs/tvm/abi/routerAbi/index.js.map +1 -1
- package/_cjs/tvm/abi/trc20Abi/index.js +7 -7
- package/_cjs/tvm/abi/trc20Abi/index.js.map +1 -1
- package/_cjs/tvm/abi/wtrxAbi/index.js +11 -11
- package/_cjs/tvm/abi/wtrxAbi/index.js.map +1 -1
- package/_cjs/tvm/config/tokens/index.js +1 -1
- package/_cjs/tvm/config/tokens/index.js.map +1 -1
- package/_cjs/tvm/config/tokens/tokens/index.js +43 -43
- package/_cjs/tvm/config/tokens/tokens/index.js.map +1 -1
- package/_cjs/tvm/currency/native.js.map +1 -1
- package/_cjs/tvm/currency/token.js +2 -2
- package/_cjs/tvm/currency/token.js.map +1 -1
- package/_esm/evm/abi/bentoBoxV1Abi/index.js +2 -2
- package/_esm/evm/abi/bentoBoxV1Abi/index.js.map +1 -1
- package/_esm/evm/abi/cloneRewarderTimeAbi/index.js +1 -1
- package/_esm/evm/abi/cloneRewarderTimeAbi/index.js.map +1 -1
- package/_esm/evm/abi/eip2612Abi/index.js +1 -1
- package/_esm/evm/abi/eip2612Abi/index.js.map +1 -1
- package/_esm/evm/abi/erc20Abi/index.js +5 -5
- package/_esm/evm/abi/erc20Abi/index.js.map +1 -1
- package/_esm/evm/abi/furoVestingAbi/index.js +1 -1
- package/_esm/evm/abi/furoVestingAbi/index.js.map +1 -1
- package/_esm/evm/abi/masterChefV1Abi/index.js +1 -1
- package/_esm/evm/abi/masterChefV1Abi/index.js.map +1 -1
- package/_esm/evm/abi/masterChefV2Abi/index.js +3 -3
- package/_esm/evm/abi/masterChefV2Abi/index.js.map +1 -1
- package/_esm/evm/abi/miniChefAbi/index.js +1 -1
- package/_esm/evm/abi/miniChefAbi/index.js.map +1 -1
- package/_esm/evm/abi/miniChefV2Abi/index.js +1 -1
- package/_esm/evm/abi/miniChefV2Abi/index.js.map +1 -1
- package/_esm/evm/abi/nonfungiblePositionManagerAbi/index.js +3 -3
- package/_esm/evm/abi/nonfungiblePositionManagerAbi/index.js.map +1 -1
- package/_esm/evm/abi/permit2Abi/index.js +1 -1
- package/_esm/evm/abi/permit2Abi/index.js.map +1 -1
- package/_esm/evm/abi/squidRouterAbi/index.js +1 -1
- package/_esm/evm/abi/squidRouterAbi/index.js.map +1 -1
- package/_esm/evm/abi/stargateAdapterAbi/index.js +1 -1
- package/_esm/evm/abi/stargateAdapterAbi/index.js.map +1 -1
- package/_esm/evm/abi/stargateFeeLibraryV03Abi/index.js +5 -5
- package/_esm/evm/abi/stargateFeeLibraryV03Abi/index.js.map +1 -1
- package/_esm/evm/abi/stargatePoolAbi/index.js +4 -4
- package/_esm/evm/abi/stargatePoolAbi/index.js.map +1 -1
- package/_esm/evm/abi/tridentConstantPoolAbi/index.js +3 -3
- package/_esm/evm/abi/tridentConstantPoolAbi/index.js.map +1 -1
- package/_esm/evm/abi/uniswapV2PairAbi/index.js +3 -3
- package/_esm/evm/abi/uniswapV2PairAbi/index.js.map +1 -1
- package/_esm/evm/abi/uniswapV2RouterAbi/index.js +2 -2
- package/_esm/evm/abi/uniswapV2RouterAbi/index.js.map +1 -1
- package/_esm/evm/abi/v3baseAbi/index.js +1 -1
- package/_esm/evm/abi/v3baseAbi/index.js.map +1 -1
- package/_esm/evm/abi/weth9Abi/index.js +7 -7
- package/_esm/evm/abi/weth9Abi/index.js.map +1 -1
- package/_esm/evm/api/index.js +1 -1
- package/_esm/evm/api/index.js.map +1 -1
- package/_esm/evm/api/swap.js.map +1 -1
- package/_esm/evm/api/types.js +2 -2
- package/_esm/evm/api/types.js.map +1 -1
- package/_esm/evm/chain/chains.js.map +1 -1
- package/_esm/evm/config/drpc.js.map +1 -1
- package/_esm/evm/config/features/index.js +5 -5
- package/_esm/evm/config/features/index.js.map +1 -1
- package/_esm/evm/config/features/sushiswap.js +2 -1
- package/_esm/evm/config/features/sushiswap.js.map +1 -1
- package/_esm/evm/config/index.js +2 -2
- package/_esm/evm/config/index.js.map +1 -1
- package/_esm/evm/config/subgraphs/subgraphs/blade.js +0 -12
- package/_esm/evm/config/subgraphs/subgraphs/blade.js.map +1 -1
- package/_esm/evm/config/subgraphs/subgraphs/blocks.js +0 -11
- package/_esm/evm/config/subgraphs/subgraphs/blocks.js.map +1 -1
- package/_esm/evm/config/subgraphs/subgraphs/index.js +2 -2
- package/_esm/evm/config/subgraphs/subgraphs/index.js.map +1 -1
- package/_esm/evm/config/subgraphs/subgraphs/sushiswap-v2.js +0 -10
- package/_esm/evm/config/subgraphs/subgraphs/sushiswap-v2.js.map +1 -1
- package/_esm/evm/config/subgraphs/subgraphs/sushiswap-v3.js +0 -10
- package/_esm/evm/config/subgraphs/subgraphs/sushiswap-v3.js.map +1 -1
- package/_esm/evm/config/tokens/token-maps/default-bases.js +1 -2
- package/_esm/evm/config/tokens/token-maps/default-bases.js.map +1 -1
- package/_esm/evm/config/tokens/token-maps/default-quote.js +1 -1
- package/_esm/evm/config/tokens/token-maps/default-quote.js.map +1 -1
- package/_esm/evm/config/tokens/token-maps/lsds.js +1 -1
- package/_esm/evm/config/tokens/token-maps/lsds.js.map +1 -1
- package/_esm/evm/config/tokens/token-maps/stables.js +2 -2
- package/_esm/evm/config/tokens/token-maps/stables.js.map +1 -1
- package/_esm/evm/config/tokens/tokens/index.js +13 -13
- package/_esm/evm/config/tokens/tokens/index.js.map +1 -1
- package/_esm/evm/config/tokens/wrapped-native.js.map +1 -1
- package/_esm/evm/currency/native.js.map +1 -1
- package/_esm/evm/currency/token.js +2 -2
- package/_esm/evm/currency/token.js.map +1 -1
- package/_esm/evm/pool/sushiswap-v2/sushiswap-v2-pool.js +2 -2
- package/_esm/evm/pool/sushiswap-v2/sushiswap-v2-pool.js.map +1 -1
- package/_esm/evm/pool/sushiswap-v3/entities/Multicall.js.map +1 -1
- package/_esm/evm/pool/sushiswap-v3/entities/NonfungiblePositionManager.js.map +1 -1
- package/_esm/evm/pool/sushiswap-v3/entities/SelfPermit.js.map +1 -1
- package/_esm/evm/token-list/index.js +1 -1
- package/_esm/evm/token-list/index.js.map +1 -1
- package/_esm/evm/types/index.js.map +1 -1
- package/_esm/evm/types/sushi-pool/index.js +1 -1
- package/_esm/evm/types/sushi-pool/index.js.map +1 -1
- package/_esm/evm/types/sushi-position/index.js +1 -1
- package/_esm/evm/types/sushi-position/index.js.map +1 -1
- package/_esm/generic/chain/index.js.map +1 -1
- package/_esm/generic/currency/token.js +1 -1
- package/_esm/generic/currency/token.js.map +1 -1
- package/_esm/generic/format/number.js +1 -1
- package/_esm/generic/format/number.js.map +1 -1
- package/_esm/generic/math/index.js +4 -4
- package/_esm/generic/math/index.js.map +1 -1
- package/_esm/generic/utils/id.js +5 -1
- package/_esm/generic/utils/id.js.map +1 -1
- package/_esm/kvm/currency/token.js.map +1 -1
- package/_esm/mvm/currency/token.js +3 -0
- package/_esm/mvm/currency/token.js.map +1 -1
- package/_esm/tvm/abi/factoryAbi/index.js +1 -1
- package/_esm/tvm/abi/factoryAbi/index.js.map +1 -1
- package/_esm/tvm/abi/pairAbi/index.js +8 -8
- package/_esm/tvm/abi/pairAbi/index.js.map +1 -1
- package/_esm/tvm/abi/routerAbi/index.js +1 -1
- package/_esm/tvm/abi/routerAbi/index.js.map +1 -1
- package/_esm/tvm/abi/trc20Abi/index.js +7 -7
- package/_esm/tvm/abi/trc20Abi/index.js.map +1 -1
- package/_esm/tvm/abi/wtrxAbi/index.js +11 -11
- package/_esm/tvm/abi/wtrxAbi/index.js.map +1 -1
- package/_esm/tvm/config/tokens/index.js +1 -1
- package/_esm/tvm/config/tokens/index.js.map +1 -1
- package/_esm/tvm/config/tokens/tokens/index.js +43 -43
- package/_esm/tvm/config/tokens/tokens/index.js.map +1 -1
- package/_esm/tvm/currency/currency.js.map +1 -1
- package/_esm/tvm/currency/native.js.map +1 -1
- package/_esm/tvm/currency/token.js +2 -2
- package/_esm/tvm/currency/token.js.map +1 -1
- package/_types/evm/abi/bentoBoxV1Abi/index.d.ts +2 -2
- package/_types/evm/abi/bentoBoxV1Abi/index.d.ts.map +1 -1
- package/_types/evm/abi/cloneRewarderTimeAbi/index.d.ts +1 -1
- package/_types/evm/abi/cloneRewarderTimeAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/eip2612Abi/index.d.ts +1 -1
- package/_types/evm/abi/eip2612Abi/index.d.ts.map +1 -1
- package/_types/evm/abi/erc20Abi/index.d.ts +5 -5
- package/_types/evm/abi/erc20Abi/index.d.ts.map +1 -1
- package/_types/evm/abi/furoVestingAbi/index.d.ts +1 -1
- package/_types/evm/abi/furoVestingAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/masterChefV1Abi/index.d.ts +1 -1
- package/_types/evm/abi/masterChefV1Abi/index.d.ts.map +1 -1
- package/_types/evm/abi/masterChefV2Abi/index.d.ts +3 -3
- package/_types/evm/abi/masterChefV2Abi/index.d.ts.map +1 -1
- package/_types/evm/abi/miniChefAbi/index.d.ts +1 -1
- package/_types/evm/abi/miniChefAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/miniChefV2Abi/index.d.ts +1 -1
- package/_types/evm/abi/miniChefV2Abi/index.d.ts.map +1 -1
- package/_types/evm/abi/nonfungiblePositionManagerAbi/index.d.ts +3 -3
- package/_types/evm/abi/nonfungiblePositionManagerAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/permit2Abi/index.d.ts +1 -1
- package/_types/evm/abi/permit2Abi/index.d.ts.map +1 -1
- package/_types/evm/abi/squidRouterAbi/index.d.ts +1 -1
- package/_types/evm/abi/squidRouterAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/stargateAdapterAbi/index.d.ts +1 -1
- package/_types/evm/abi/stargateAdapterAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/stargateFeeLibraryV03Abi/index.d.ts +5 -5
- package/_types/evm/abi/stargateFeeLibraryV03Abi/index.d.ts.map +1 -1
- package/_types/evm/abi/stargatePoolAbi/index.d.ts +4 -4
- package/_types/evm/abi/stargatePoolAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/tridentConstantPoolAbi/index.d.ts +3 -3
- package/_types/evm/abi/tridentConstantPoolAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/uniswapV2PairAbi/index.d.ts +3 -3
- package/_types/evm/abi/uniswapV2PairAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/uniswapV2RouterAbi/index.d.ts +2 -2
- package/_types/evm/abi/uniswapV2RouterAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/v3baseAbi/index.d.ts +1 -1
- package/_types/evm/abi/v3baseAbi/index.d.ts.map +1 -1
- package/_types/evm/abi/weth9Abi/index.d.ts +7 -7
- package/_types/evm/abi/weth9Abi/index.d.ts.map +1 -1
- package/_types/evm/api/index.d.ts +1 -1
- package/_types/evm/api/index.d.ts.map +1 -1
- package/_types/evm/api/quote.d.ts +22 -22
- package/_types/evm/api/swap.d.ts +17 -17
- package/_types/evm/api/swap.d.ts.map +1 -1
- package/_types/evm/api/types.d.ts +2 -2
- package/_types/evm/api/types.d.ts.map +1 -1
- package/_types/evm/chain/chains.d.ts.map +1 -1
- package/_types/evm/config/drpc.d.ts.map +1 -1
- package/_types/evm/config/features/index.d.ts +5 -5
- package/_types/evm/config/features/index.d.ts.map +1 -1
- package/_types/evm/config/features/sushiswap.d.ts +2 -2
- package/_types/evm/config/features/sushiswap.d.ts.map +1 -1
- package/_types/evm/config/index.d.ts +2 -2
- package/_types/evm/config/index.d.ts.map +1 -1
- package/_types/evm/config/subgraphs/subgraphs/blade.d.ts +0 -2
- package/_types/evm/config/subgraphs/subgraphs/blade.d.ts.map +1 -1
- package/_types/evm/config/subgraphs/subgraphs/blocks.d.ts +0 -2
- package/_types/evm/config/subgraphs/subgraphs/blocks.d.ts.map +1 -1
- package/_types/evm/config/subgraphs/subgraphs/index.d.ts +2 -2
- package/_types/evm/config/subgraphs/subgraphs/index.d.ts.map +1 -1
- package/_types/evm/config/subgraphs/subgraphs/sushiswap-v2.d.ts +0 -3
- package/_types/evm/config/subgraphs/subgraphs/sushiswap-v2.d.ts.map +1 -1
- package/_types/evm/config/subgraphs/subgraphs/sushiswap-v3.d.ts +0 -3
- package/_types/evm/config/subgraphs/subgraphs/sushiswap-v3.d.ts.map +1 -1
- package/_types/evm/config/tokens/token-maps/default-bases.d.ts.map +1 -1
- package/_types/evm/config/tokens/tokens/index.d.ts +13 -13
- package/_types/evm/config/tokens/tokens/index.d.ts.map +1 -1
- package/_types/evm/config/tokens/wrapped-native.d.ts.map +1 -1
- package/_types/evm/currency/native.d.ts.map +1 -1
- package/_types/evm/currency/token.d.ts +1 -1
- package/_types/evm/currency/token.d.ts.map +1 -1
- package/_types/evm/pool/sushiswap-v2/zod.d.ts +24 -24
- package/_types/evm/pool/sushiswap-v3/entities/Multicall.d.ts.map +1 -1
- package/_types/evm/pool/sushiswap-v3/entities/NonfungiblePositionManager.d.ts.map +1 -1
- package/_types/evm/pool/sushiswap-v3/entities/SelfPermit.d.ts.map +1 -1
- package/_types/evm/token-list/index.d.ts +1 -1
- package/_types/evm/token-list/index.d.ts.map +1 -1
- package/_types/evm/types/index.d.ts +2 -2
- package/_types/evm/types/index.d.ts.map +1 -1
- package/_types/evm/types/sushi-pool/index.d.ts +1 -1
- package/_types/evm/types/sushi-pool/index.d.ts.map +1 -1
- package/_types/evm/types/sushi-position/index.d.ts +1 -1
- package/_types/evm/types/sushi-position/index.d.ts.map +1 -1
- package/_types/generic/chain/chains.d.ts +2 -2
- package/_types/generic/chain/index.d.ts +1 -1
- package/_types/generic/chain/index.d.ts.map +1 -1
- package/_types/generic/currency/token.d.ts.map +1 -1
- package/_types/generic/math/index.d.ts +4 -4
- package/_types/generic/math/index.d.ts.map +1 -1
- package/_types/generic/utils/id.d.ts.map +1 -1
- package/_types/kvm/currency/token.d.ts.map +1 -1
- package/_types/mvm/currency/token.d.ts +1 -0
- package/_types/mvm/currency/token.d.ts.map +1 -1
- package/_types/tvm/abi/factoryAbi/index.d.ts +1 -1
- package/_types/tvm/abi/factoryAbi/index.d.ts.map +1 -1
- package/_types/tvm/abi/pairAbi/index.d.ts +8 -8
- package/_types/tvm/abi/pairAbi/index.d.ts.map +1 -1
- package/_types/tvm/abi/routerAbi/index.d.ts +1 -1
- package/_types/tvm/abi/routerAbi/index.d.ts.map +1 -1
- package/_types/tvm/abi/trc20Abi/index.d.ts +7 -7
- package/_types/tvm/abi/trc20Abi/index.d.ts.map +1 -1
- package/_types/tvm/abi/wtrxAbi/index.d.ts +11 -11
- package/_types/tvm/abi/wtrxAbi/index.d.ts.map +1 -1
- package/_types/tvm/config/tokens/index.d.ts +1 -1
- package/_types/tvm/config/tokens/index.d.ts.map +1 -1
- package/_types/tvm/config/tokens/tokens/index.d.ts +43 -43
- package/_types/tvm/config/tokens/tokens/index.d.ts.map +1 -1
- package/_types/tvm/currency/currency.d.ts.map +1 -1
- package/_types/tvm/currency/native.d.ts.map +1 -1
- package/_types/tvm/currency/token.d.ts +1 -1
- package/_types/tvm/currency/token.d.ts.map +1 -1
- package/evm/abi/bentoBoxV1Abi/index.ts +2 -2
- package/evm/abi/cloneRewarderTimeAbi/index.ts +1 -1
- package/evm/abi/eip2612Abi/index.ts +1 -1
- package/evm/abi/erc20Abi/index.ts +5 -5
- package/evm/abi/furoVestingAbi/index.ts +1 -1
- package/evm/abi/masterChefV1Abi/index.ts +1 -1
- package/evm/abi/masterChefV2Abi/index.ts +3 -3
- package/evm/abi/miniChefAbi/index.ts +1 -1
- package/evm/abi/miniChefV2Abi/index.ts +1 -1
- package/evm/abi/nonfungiblePositionManagerAbi/index.ts +3 -3
- package/evm/abi/permit2Abi/index.ts +1 -1
- package/evm/abi/squidRouterAbi/index.ts +1 -1
- package/evm/abi/stargateAdapterAbi/index.ts +1 -1
- package/evm/abi/stargateFeeLibraryV03Abi/index.ts +5 -5
- package/evm/abi/stargatePoolAbi/index.ts +4 -4
- package/evm/abi/tridentConstantPoolAbi/index.ts +3 -3
- package/evm/abi/uniswapV2PairAbi/index.ts +3 -3
- package/evm/abi/uniswapV2RouterAbi/index.ts +2 -2
- package/evm/abi/v3baseAbi/index.ts +1 -1
- package/evm/abi/weth9Abi/index.ts +7 -7
- package/evm/api/index.ts +1 -1
- package/evm/api/quote.test.ts +1 -1
- package/evm/api/swap.test.ts +1 -1
- package/evm/api/swap.ts +1 -1
- package/evm/api/types.ts +2 -2
- package/evm/chain/chains.ts +1 -2
- package/evm/chain/define-chain.ts +1 -1
- package/evm/config/drpc.ts +5 -1
- package/evm/config/features/index.ts +5 -5
- package/evm/config/features/sushiswap.ts +5 -3
- package/evm/config/index.ts +2 -2
- package/evm/config/subgraphs/subgraph-url.test.ts +1 -2
- package/evm/config/subgraphs/subgraphs/blade.ts +0 -16
- package/evm/config/subgraphs/subgraphs/blocks.ts +0 -15
- package/evm/config/subgraphs/subgraphs/index.ts +2 -2
- package/evm/config/subgraphs/subgraphs/sushiswap-v2.ts +0 -20
- package/evm/config/subgraphs/subgraphs/sushiswap-v3.ts +0 -20
- package/evm/config/tokens/token-maps/default-bases.ts +6 -7
- package/evm/config/tokens/token-maps/default-quote.ts +1 -1
- package/evm/config/tokens/token-maps/lsds.ts +1 -1
- package/evm/config/tokens/token-maps/stables.ts +4 -4
- package/evm/config/tokens/tokens/index.ts +13 -14
- package/evm/config/tokens/wrapped-native.ts +5 -2
- package/evm/currency/native.ts +3 -1
- package/evm/currency/token.ts +5 -2
- package/evm/pool/sushiswap-v2/sushiswap-v2-pool.test.ts +1 -0
- package/evm/pool/sushiswap-v2/sushiswap-v2-pool.ts +3 -3
- package/evm/pool/sushiswap-v3/entities/Multicall.ts +1 -1
- package/evm/pool/sushiswap-v3/entities/NonfungiblePositionManager.test.ts +1 -1
- package/evm/pool/sushiswap-v3/entities/NonfungiblePositionManager.ts +1 -1
- package/evm/pool/sushiswap-v3/entities/SelfPermit.ts +1 -1
- package/evm/token-list/index.ts +1 -1
- package/evm/types/index.ts +2 -2
- package/evm/types/sushi-pool/index.ts +1 -1
- package/evm/types/sushi-position/index.ts +1 -1
- package/generic/chain/index.ts +1 -1
- package/generic/currency/currency.test-d.ts +50 -2
- package/generic/currency/token.ts +1 -2
- package/generic/format/number.ts +1 -1
- package/generic/math/index.ts +4 -4
- package/generic/utils/id.ts +5 -1
- package/kvm/chain/define-chain.ts +1 -1
- package/kvm/currency/token.ts +4 -2
- package/mvm/currency/token.ts +13 -2
- package/package.json +1 -1
- package/tvm/abi/factoryAbi/index.ts +1 -1
- package/tvm/abi/pairAbi/index.ts +8 -8
- package/tvm/abi/routerAbi/index.ts +1 -1
- package/tvm/abi/trc20Abi/index.ts +7 -7
- package/tvm/abi/wtrxAbi/index.ts +11 -11
- package/tvm/config/tokens/index.ts +1 -1
- package/tvm/config/tokens/tokens/index.ts +43 -43
- package/tvm/currency/currency.ts +2 -2
- package/tvm/currency/native.ts +4 -2
- package/tvm/currency/token.ts +6 -3
package/evm/config/index.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { describe, expect, expectTypeOf, it } from 'vitest'
|
|
2
|
-
import { getSushiSwapV3SubgraphUrl } from './subgraphs/sushiswap-v3.js'
|
|
3
|
-
|
|
4
2
|
import { EvmChainId } from '../../chain/index.js'
|
|
5
3
|
import { getBlocksSubgraphUrl } from './subgraphs/blocks.js'
|
|
4
|
+
import { getSushiSwapV3SubgraphUrl } from './subgraphs/sushiswap-v3.js'
|
|
6
5
|
|
|
7
6
|
describe('subgraph urls', () => {
|
|
8
7
|
it('with subgraph id matches', () => {
|
|
@@ -27,19 +27,3 @@ export const getBladeSubgraphUrl = getSubgraphUrlWrapper({
|
|
|
27
27
|
},
|
|
28
28
|
otherUrls: BLADE_OTHER_URLS,
|
|
29
29
|
})<BladeChainId, 'COMPLETE'>()
|
|
30
|
-
|
|
31
|
-
export const BladeSubgraphTemplateMap: Record<BladeChainId, string> =
|
|
32
|
-
Object.fromEntries(
|
|
33
|
-
Object.entries({
|
|
34
|
-
...BLADE_DECENTRALIZED_DEPLOYMENT_IDS,
|
|
35
|
-
...BLADE_DECENTRALIZED_SUBGRAPH_IDS,
|
|
36
|
-
...BLADE_OTHER_URLS,
|
|
37
|
-
})
|
|
38
|
-
.map(([chainId]) => {
|
|
39
|
-
const url = getBladeSubgraphUrl(Number(chainId) as BladeChainId, {
|
|
40
|
-
decentralizedKey: '${GRAPH_KEY}',
|
|
41
|
-
})
|
|
42
|
-
return [Number(chainId), url ? `https://${url}` : undefined]
|
|
43
|
-
})
|
|
44
|
-
.filter(([, url]) => !!url),
|
|
45
|
-
) as Record<BladeChainId, string>
|
|
@@ -54,18 +54,3 @@ export const getBlocksSubgraphUrl = getSubgraphUrlWrapper({
|
|
|
54
54
|
decentralizedIds: wrapAsIdType(BLOCKS_DECENTRALIZED_IDS, 'deploymentId'),
|
|
55
55
|
otherUrls: BLOCKS_OTHER_URLS,
|
|
56
56
|
})<EvmChainId, 'PARTIAL'>()
|
|
57
|
-
|
|
58
|
-
export const BlocksSubgraphTemplateMap: Record<EvmChainId, string> =
|
|
59
|
-
Object.fromEntries(
|
|
60
|
-
Object.entries({
|
|
61
|
-
...BLOCKS_DECENTRALIZED_IDS,
|
|
62
|
-
...BLOCKS_OTHER_URLS,
|
|
63
|
-
})
|
|
64
|
-
.map(([chainId]) => {
|
|
65
|
-
const url = getBlocksSubgraphUrl(Number(chainId) as EvmChainId, {
|
|
66
|
-
decentralizedKey: '${GRAPH_KEY}',
|
|
67
|
-
})
|
|
68
|
-
return [Number(chainId), url ? `https://${url}` : undefined]
|
|
69
|
-
})
|
|
70
|
-
.filter(([, url]) => !!url),
|
|
71
|
-
) as Record<EvmChainId, string>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
export * from './blade.js'
|
|
1
2
|
export * from './blocks.js'
|
|
3
|
+
export * from './data-api.js'
|
|
2
4
|
export * from './master-chef-v1.js'
|
|
3
5
|
export * from './master-chef-v2.js'
|
|
4
6
|
export * from './mini-chef.js'
|
|
5
7
|
export * from './sushi-bar.js'
|
|
6
8
|
export * from './sushiswap-v2.js'
|
|
7
9
|
export * from './sushiswap-v3.js'
|
|
8
|
-
export * from './blade.js'
|
|
9
|
-
export * from './data-api.js'
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { TestnetChainId } from '../../../../generic/chain/chains.js'
|
|
2
1
|
import { EvmChainId } from '../../../chain/index.js'
|
|
3
2
|
import type { SushiSwapV2ChainId } from '../../features/sushiswap-v2.js'
|
|
4
3
|
import { getSubgraphUrlWrapper, wrapAsIdType } from '../get-subgraph-url.js'
|
|
@@ -57,22 +56,3 @@ export const getSushiSwapV2SubgraphUrl = getSubgraphUrlWrapper({
|
|
|
57
56
|
},
|
|
58
57
|
otherUrls: SUSHISWAP_V2_OTHER_URLS,
|
|
59
58
|
})<SushiSwapV2ChainId, 'PARTIAL'>()
|
|
60
|
-
|
|
61
|
-
export const V2SubgraphTemplateMap: Record<
|
|
62
|
-
Exclude<SushiSwapV2ChainId, TestnetChainId>,
|
|
63
|
-
string
|
|
64
|
-
> = Object.fromEntries(
|
|
65
|
-
Object.entries({
|
|
66
|
-
...SUSHISWAP_V2_DECENTRALIZED_DEPLOYMENT_IDS,
|
|
67
|
-
...SUSHISWAP_V2_DECENTRALIZED_SUBGRAPH_IDS,
|
|
68
|
-
...SUSHISWAP_V2_OTHER_URLS,
|
|
69
|
-
})
|
|
70
|
-
.map(([chainId]) => {
|
|
71
|
-
const url = getSushiSwapV2SubgraphUrl(
|
|
72
|
-
Number(chainId) as SushiSwapV2ChainId,
|
|
73
|
-
{ decentralizedKey: '${GRAPH_KEY}' },
|
|
74
|
-
)
|
|
75
|
-
return [Number(chainId), url ? `https://${url}` : undefined]
|
|
76
|
-
})
|
|
77
|
-
.filter(([, url]) => !!url),
|
|
78
|
-
)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { TestnetChainId } from '../../../../generic/chain/chains.js'
|
|
2
1
|
import { EvmChainId } from '../../../chain/index.js'
|
|
3
2
|
import type { SushiSwapV3ChainId } from '../../features/sushiswap-v3.js'
|
|
4
3
|
import { getSubgraphUrlWrapper, wrapAsIdType } from '../get-subgraph-url.js'
|
|
@@ -54,22 +53,3 @@ export const getSushiSwapV3SubgraphUrl = getSubgraphUrlWrapper({
|
|
|
54
53
|
},
|
|
55
54
|
otherUrls: SUSHISWAP_V3_OTHER_URLS,
|
|
56
55
|
})<SushiSwapV3ChainId, 'PARTIAL'>()
|
|
57
|
-
|
|
58
|
-
export const V3SubgraphTemplateMap: Record<
|
|
59
|
-
Exclude<SushiSwapV3ChainId, TestnetChainId>,
|
|
60
|
-
string
|
|
61
|
-
> = Object.fromEntries(
|
|
62
|
-
Object.entries({
|
|
63
|
-
...SUSHISWAP_V3_DECENTRALIZED_DEPLOYMENT_IDS,
|
|
64
|
-
...SUSHISWAP_V3_DECENTRALIZED_SUBGRAPH_IDS,
|
|
65
|
-
...SUSHISWAP_V3_OTHER_URLS,
|
|
66
|
-
})
|
|
67
|
-
.map(([chainId]) => {
|
|
68
|
-
const url = getSushiSwapV3SubgraphUrl(
|
|
69
|
-
Number(chainId) as SushiSwapV3ChainId,
|
|
70
|
-
{ decentralizedKey: '${GRAPH_KEY}' },
|
|
71
|
-
)
|
|
72
|
-
return [Number(chainId), url ? `https://${url}` : undefined]
|
|
73
|
-
})
|
|
74
|
-
.filter(([, url]) => !!url),
|
|
75
|
-
) as Record<SushiSwapV3ChainId, string>
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { getAddress as _getAddress } from 'viem/utils'
|
|
2
1
|
import type { EvmCurrency } from '../../../../evm/currency/currency.js'
|
|
3
2
|
import { EvmChainId } from '../../../chain/index.js'
|
|
4
3
|
import {
|
|
5
4
|
APE_USD,
|
|
6
5
|
ARB,
|
|
7
6
|
AUSD,
|
|
7
|
+
axlDAI,
|
|
8
|
+
axlETH,
|
|
9
|
+
axlUSDC,
|
|
10
|
+
axlUSDT,
|
|
11
|
+
axlWBTC,
|
|
8
12
|
DAI,
|
|
9
13
|
FRAX,
|
|
10
14
|
GNO,
|
|
@@ -12,8 +16,8 @@ import {
|
|
|
12
16
|
MIM,
|
|
13
17
|
RBTC,
|
|
14
18
|
SKL,
|
|
15
|
-
SUSHI,
|
|
16
19
|
SolvBTC,
|
|
20
|
+
SUSHI,
|
|
17
21
|
USDB,
|
|
18
22
|
USDC,
|
|
19
23
|
USDT,
|
|
@@ -22,11 +26,6 @@ import {
|
|
|
22
26
|
WETH9,
|
|
23
27
|
ZETA_USDC_ETH,
|
|
24
28
|
ZETA_USDT_ETH,
|
|
25
|
-
axlDAI,
|
|
26
|
-
axlETH,
|
|
27
|
-
axlUSDC,
|
|
28
|
-
axlUSDT,
|
|
29
|
-
axlWBTC,
|
|
30
29
|
} from '../../../config/tokens/tokens/index.js'
|
|
31
30
|
import { EvmNative } from '../../../currency/native.js'
|
|
32
31
|
import { EvmToken } from '../../../currency/token.js'
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
APE_USD,
|
|
4
4
|
ARB,
|
|
5
5
|
AUSD,
|
|
6
|
+
axlUSDC,
|
|
6
7
|
BUSD,
|
|
7
8
|
GNO,
|
|
8
9
|
OP,
|
|
@@ -12,7 +13,6 @@ import {
|
|
|
12
13
|
USDT,
|
|
13
14
|
USDT0,
|
|
14
15
|
WETH9,
|
|
15
|
-
axlUSDC,
|
|
16
16
|
} from '../../../config/tokens/tokens/index.js'
|
|
17
17
|
import type { EvmCurrency } from '../../../currency/currency.js'
|
|
18
18
|
import { EvmNative } from '../../../currency/native.js'
|
|
@@ -2,9 +2,9 @@ import type { EvmCurrency } from '../../../../evm/currency/currency.js'
|
|
|
2
2
|
import { EvmChainId } from '../../../chain/chains.js'
|
|
3
3
|
import {
|
|
4
4
|
METH,
|
|
5
|
+
rETH,
|
|
5
6
|
STONE,
|
|
6
7
|
WstETH,
|
|
7
|
-
rETH,
|
|
8
8
|
} from '../../../config/tokens/tokens/index.js'
|
|
9
9
|
import { EvmToken } from '../../../currency/token.js'
|
|
10
10
|
|
|
@@ -2,6 +2,7 @@ import type { EvmCurrency } from '../../../../evm/currency/currency.js'
|
|
|
2
2
|
import { EvmChainId } from '../../../chain/chains.js'
|
|
3
3
|
import {
|
|
4
4
|
APE_USD,
|
|
5
|
+
axlUSDC,
|
|
5
6
|
BASE_USDbC,
|
|
6
7
|
BTTC_USDC_BSC,
|
|
7
8
|
BTTC_USDC_ETHEREUM,
|
|
@@ -23,23 +24,22 @@ import {
|
|
|
23
24
|
THUNDERCORE_ANY_BUSD,
|
|
24
25
|
THUNDERCORE_ANY_USDC,
|
|
25
26
|
THUNDERCORE_ANY_USDT,
|
|
27
|
+
USD_PLUS,
|
|
26
28
|
USDB,
|
|
27
29
|
USDC,
|
|
30
|
+
USDe,
|
|
28
31
|
USDP,
|
|
29
32
|
USDPLUS,
|
|
30
33
|
USDT,
|
|
31
|
-
USD_PLUS,
|
|
32
|
-
USDe,
|
|
33
34
|
ZETA_USDC_BSC,
|
|
34
35
|
ZETA_USDC_ETH,
|
|
35
36
|
ZETA_USDT_BSC,
|
|
36
37
|
ZETA_USDT_ETH,
|
|
37
|
-
axlUSDC,
|
|
38
38
|
} from '../../../config/tokens/tokens/index.js'
|
|
39
39
|
import { EvmToken } from '../../../currency/token.js'
|
|
40
40
|
import { AUSD } from '../tokens/AUSD.js'
|
|
41
|
-
import { USDT0 } from '../tokens/USDT0.js'
|
|
42
41
|
import { HONEY } from '../tokens/berachain/HONEY.js'
|
|
42
|
+
import { USDT0 } from '../tokens/USDT0.js'
|
|
43
43
|
|
|
44
44
|
export const STABLES = {
|
|
45
45
|
[EvmChainId.ARBITRUM]: [
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
export * from './ape/index.js'
|
|
2
|
-
export * from './base/index.js'
|
|
3
|
-
export * from './berachain/index.js'
|
|
4
|
-
export * from './bttc/index.js'
|
|
5
|
-
export * from './ethereum/index.js'
|
|
6
|
-
export * from './filecoin/index.js'
|
|
7
|
-
export * from './thundercore/index.js'
|
|
8
|
-
export * from './zeta/index.js'
|
|
9
|
-
|
|
10
1
|
export * from './AAVE.js'
|
|
11
2
|
export * from './AERO.js'
|
|
12
3
|
export * from './AGEUR.js'
|
|
@@ -15,6 +6,7 @@ export * from './ANKR.js'
|
|
|
15
6
|
export * from './APE.js'
|
|
16
7
|
export * from './ARB.js'
|
|
17
8
|
export * from './AUSD.js'
|
|
9
|
+
export * from './ape/index.js'
|
|
18
10
|
export * from './axlDAI.js'
|
|
19
11
|
export * from './axlETH.js'
|
|
20
12
|
export * from './axlUSDC.js'
|
|
@@ -23,14 +15,19 @@ export * from './axlWBTC.js'
|
|
|
23
15
|
export * from './BAL.js'
|
|
24
16
|
export * from './BCT.js'
|
|
25
17
|
export * from './BUSD.js'
|
|
18
|
+
export * from './base/index.js'
|
|
19
|
+
export * from './berachain/index.js'
|
|
20
|
+
export * from './bttc/index.js'
|
|
26
21
|
export * from './COMP.js'
|
|
27
22
|
export * from './CRV.js'
|
|
28
23
|
export * from './DAI.js'
|
|
29
24
|
export * from './DOC.js'
|
|
30
25
|
export * from './ENJ.js'
|
|
26
|
+
export * from './ethereum/index.js'
|
|
31
27
|
export * from './FEI.js'
|
|
32
28
|
export * from './FRAX.js'
|
|
33
29
|
export * from './FXS.js'
|
|
30
|
+
export * from './filecoin/index.js'
|
|
34
31
|
export * from './GALA.js'
|
|
35
32
|
export * from './GNO.js'
|
|
36
33
|
export * from './GNS.js'
|
|
@@ -57,13 +54,12 @@ export * from './OP.js'
|
|
|
57
54
|
export * from './OPTICS_USDC.js'
|
|
58
55
|
export * from './PRIMATE.js'
|
|
59
56
|
export * from './QUICK.js'
|
|
60
|
-
export * from './renBTC.js'
|
|
61
|
-
export * from './rETH.js'
|
|
62
|
-
export * from './rETH2.js'
|
|
63
57
|
export * from './RBTC.js'
|
|
64
58
|
export * from './RNDR.js'
|
|
59
|
+
export * from './rETH.js'
|
|
60
|
+
export * from './rETH2.js'
|
|
61
|
+
export * from './renBTC.js'
|
|
65
62
|
export * from './SAND.js'
|
|
66
|
-
export * from './sETH2.js'
|
|
67
63
|
export * from './SGETH.js'
|
|
68
64
|
export * from './SKL.js'
|
|
69
65
|
export * from './SNX.js'
|
|
@@ -72,9 +68,11 @@ export * from './STG.js'
|
|
|
72
68
|
export * from './STONE.js'
|
|
73
69
|
export * from './SUSHI.js'
|
|
74
70
|
export * from './SWISE.js'
|
|
71
|
+
export * from './sETH2.js'
|
|
75
72
|
export * from './TEL.js'
|
|
76
73
|
export * from './TRIBE.js'
|
|
77
74
|
export * from './TUSD.js'
|
|
75
|
+
export * from './thundercore/index.js'
|
|
78
76
|
export * from './UNI.js'
|
|
79
77
|
export * from './USD_PLUS.js'
|
|
80
78
|
export * from './USDB.js'
|
|
@@ -89,6 +87,7 @@ export * from './WBTC.js'
|
|
|
89
87
|
export * from './WETH9.js'
|
|
90
88
|
export * from './WRBTC.js'
|
|
91
89
|
export * from './WstETH.js'
|
|
92
|
-
export * from './xSolvBTC.js'
|
|
93
90
|
export * from './XSUSHI.js'
|
|
91
|
+
export * from './xSolvBTC.js'
|
|
94
92
|
export * from './YFI.js'
|
|
93
|
+
export * from './zeta/index.js'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { zeroAddress } from 'viem'
|
|
2
1
|
import type { Address } from 'viem'
|
|
2
|
+
import { zeroAddress } from 'viem'
|
|
3
3
|
import type { EvmCurrency } from '../../../evm/currency/currency.js'
|
|
4
4
|
import { EvmChainId } from '../../chain/index.js'
|
|
5
5
|
import { EvmToken } from '../../currency/token.js'
|
|
@@ -249,7 +249,10 @@ export const isWNativeSupported = (chainId: EvmChainId) =>
|
|
|
249
249
|
export function isWrapOrUnwrap({
|
|
250
250
|
from,
|
|
251
251
|
to,
|
|
252
|
-
}: {
|
|
252
|
+
}: {
|
|
253
|
+
from: EvmCurrency
|
|
254
|
+
to: EvmCurrency
|
|
255
|
+
}): boolean {
|
|
253
256
|
if (from.type === 'native' && from.wrap().isSame(to)) {
|
|
254
257
|
return true
|
|
255
258
|
}
|
package/evm/currency/native.ts
CHANGED
|
@@ -55,7 +55,9 @@ export const serializedEvmNativeSchema = <
|
|
|
55
55
|
TMetadata extends {} = CurrencyMetadata,
|
|
56
56
|
>({
|
|
57
57
|
metadata,
|
|
58
|
-
}: {
|
|
58
|
+
}: {
|
|
59
|
+
metadata?: z.ZodType<TMetadata>
|
|
60
|
+
} = {}) =>
|
|
59
61
|
z.object({
|
|
60
62
|
chainId: z.number().int().refine(isEvmChainId),
|
|
61
63
|
symbol: z.string(),
|
package/evm/currency/token.ts
CHANGED
|
@@ -25,13 +25,14 @@ export class EvmToken<
|
|
|
25
25
|
|
|
26
26
|
constructor({
|
|
27
27
|
origin,
|
|
28
|
+
address,
|
|
28
29
|
...rest
|
|
29
30
|
}: {
|
|
30
31
|
origin?: EvmTokenOrigin | undefined
|
|
31
32
|
} & ConstructorParameters<
|
|
32
33
|
typeof Token<EvmChainId, EvmAddress, TMetadata>
|
|
33
34
|
>[0]) {
|
|
34
|
-
super(rest)
|
|
35
|
+
super({ address: address.toLowerCase() as EvmAddress, ...rest })
|
|
35
36
|
this.origin = origin
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -77,7 +78,9 @@ export const serializedEvmTokenSchema = <
|
|
|
77
78
|
TMetadata extends {} = CurrencyMetadata,
|
|
78
79
|
>({
|
|
79
80
|
metadata,
|
|
80
|
-
}: {
|
|
81
|
+
}: {
|
|
82
|
+
metadata?: z.ZodType<TMetadata>
|
|
83
|
+
} = {}) =>
|
|
81
84
|
z.object({
|
|
82
85
|
chainId: z.number().int().refine(isEvmChainId),
|
|
83
86
|
address: z.string().refine(isEvmAddress),
|
|
@@ -7,6 +7,7 @@ import { EvmToken } from '../../currency/token.js'
|
|
|
7
7
|
import { InsufficientInputAmountError } from '../../dex/errors.js'
|
|
8
8
|
import { computeSushiSwapV2PoolAddress } from './compute-sushiswap-v2-pool-address.js'
|
|
9
9
|
import { SushiSwapV2Pool } from './sushiswap-v2-pool.js'
|
|
10
|
+
|
|
10
11
|
// import { EvmChainId, CurrencyAmount, Price, Token, V2_FACTORY_ADDRESSES, WETH9 } from '@uniswap/sdk-core'
|
|
11
12
|
|
|
12
13
|
describe('computePairAddress', () => {
|
|
@@ -3,18 +3,18 @@ import type { Address } from 'viem'
|
|
|
3
3
|
import { Amount } from '../../../generic/currency/amount.js'
|
|
4
4
|
import { Price } from '../../../generic/currency/price.js'
|
|
5
5
|
import {
|
|
6
|
+
_997,
|
|
7
|
+
_1000,
|
|
6
8
|
FIVE,
|
|
7
9
|
ONE,
|
|
8
10
|
ZERO,
|
|
9
|
-
_997,
|
|
10
|
-
_1000,
|
|
11
11
|
} from '../../../generic/math/constants.js'
|
|
12
12
|
import { sqrt } from '../../../generic/math/sqrt.js'
|
|
13
13
|
import type { BigintIsh } from '../../../generic/types/bigintish.js'
|
|
14
14
|
import { getEvmChainById } from '../../chain/index.js'
|
|
15
15
|
import {
|
|
16
|
-
SUSHISWAP_V2_FACTORY_ADDRESS,
|
|
17
16
|
isSushiSwapV2ChainId,
|
|
17
|
+
SUSHISWAP_V2_FACTORY_ADDRESS,
|
|
18
18
|
} from '../../config/features/sushiswap-v2.js'
|
|
19
19
|
import { EvmToken } from '../../currency/index.js'
|
|
20
20
|
import {
|
package/evm/token-list/index.ts
CHANGED
package/evm/types/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './protocol.js'
|
|
2
1
|
export * from './maybe-nested-pool.js'
|
|
3
2
|
export * from './pool-base.js'
|
|
4
3
|
export * from './pool-history.js'
|
|
@@ -10,3 +9,4 @@ export * from './pool-v3.js'
|
|
|
10
9
|
export * from './pool-with-aprs.js'
|
|
11
10
|
export * from './pool-with-buckets.js'
|
|
12
11
|
export * from './pool-with-incentives.js'
|
|
12
|
+
export * from './protocol.js'
|
package/generic/chain/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { it } from 'node:test'
|
|
2
|
-
import { describe, expectTypeOf } from 'vitest'
|
|
2
|
+
import { describe, expect, expectTypeOf } from 'vitest'
|
|
3
3
|
import * as z from 'zod'
|
|
4
4
|
import type { EvmChainId } from '~/evm/chain/chains.js'
|
|
5
5
|
import type { EvmCurrency } from '~/evm/currency/currency.js'
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../../evm/currency/token.js'
|
|
15
15
|
import { MvmToken } from '../../mvm/currency/token.js'
|
|
16
16
|
import { TvmNative } from '../../tvm/currency/native.js'
|
|
17
|
-
import
|
|
17
|
+
import { TvmToken } from '../../tvm/currency/token.js'
|
|
18
18
|
import { getChainIdAddressFromId } from '../utils/id.js'
|
|
19
19
|
import {
|
|
20
20
|
BaseCurrency,
|
|
@@ -64,6 +64,54 @@ describe('generic/currency/currency.ts types', () => {
|
|
|
64
64
|
expectTypeOf(evmMockNative.wrap()).toEqualTypeOf<EvmToken>()
|
|
65
65
|
})
|
|
66
66
|
|
|
67
|
+
it('should lowercase the address - Evm / Mvm / Tvm', () => {
|
|
68
|
+
const evmMockToken = new EvmToken({
|
|
69
|
+
chainId: 1,
|
|
70
|
+
address: '0x1234567890ABCDEF1234567890ABCDEF12345678',
|
|
71
|
+
symbol: 'USDT',
|
|
72
|
+
name: 'Tether USD',
|
|
73
|
+
decimals: 6,
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
expect(evmMockToken.address).toBe(
|
|
77
|
+
'0x1234567890abcdef1234567890abcdef12345678',
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
const mvmMockToken = new MvmToken({
|
|
81
|
+
chainId: -1,
|
|
82
|
+
address: '0x1234567890ABCDEF1234567890ABCDEF12345678::mvm::token',
|
|
83
|
+
symbol: 'MVM',
|
|
84
|
+
name: 'MVM Token',
|
|
85
|
+
decimals: 18,
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
expect(mvmMockToken.address).toBe(
|
|
89
|
+
'0x1234567890abcdef1234567890abcdef12345678::mvm::token',
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
const tvmMockToken = new TvmToken({
|
|
93
|
+
chainId: -2,
|
|
94
|
+
address: 'T1234567890ABCDEF1234567890ABCDEF1',
|
|
95
|
+
symbol: 'TVM',
|
|
96
|
+
name: 'Tvm Token',
|
|
97
|
+
decimals: 18,
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
expect(tvmMockToken.address).toBe('t1234567890abcdef1234567890abcdef1')
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
it('should not lowercase the address - Kvm', () => {
|
|
104
|
+
const kvmMockToken = new KvmToken({
|
|
105
|
+
chainId: -3,
|
|
106
|
+
symbol: 'KVM',
|
|
107
|
+
name: 'Kvm Token',
|
|
108
|
+
decimals: 12,
|
|
109
|
+
address: 'My-Namespace.My-Token',
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
expect(kvmMockToken.address).toBe('My-Namespace.My-Token')
|
|
113
|
+
})
|
|
114
|
+
|
|
67
115
|
it('should return the same chaintype - Mvm', () => {
|
|
68
116
|
const mvmMockToken = new MvmToken({
|
|
69
117
|
chainId: -1,
|
|
@@ -20,8 +20,7 @@ export abstract class Token<
|
|
|
20
20
|
address: TAddress
|
|
21
21
|
} & ConstructorParameters<typeof BaseCurrency<TChainId, TMetadata>>[0]) {
|
|
22
22
|
super(rest)
|
|
23
|
-
|
|
24
|
-
this.address = address.toLowerCase() as TAddress
|
|
23
|
+
this.address = address
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
override get id(): ID<TChainId, TAddress> {
|
package/generic/format/number.ts
CHANGED
|
@@ -78,7 +78,7 @@ export function withoutScientificNotation(value: string): string | undefined {
|
|
|
78
78
|
const [integer, fraction] = m.split('.')
|
|
79
79
|
|
|
80
80
|
const mantissa = (integer + (fraction ?? '')).replace(/^0+/, '')
|
|
81
|
-
const exponent = Number.parseInt(n ?? 0) - (fraction ?? '').length
|
|
81
|
+
const exponent = Number.parseInt(n ?? 0, 10) - (fraction ?? '').length
|
|
82
82
|
|
|
83
83
|
if (exponent >= 0) {
|
|
84
84
|
return sign + mantissa + '0'.repeat(exponent)
|
package/generic/math/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './constants.js'
|
|
2
|
-
export * from './percent.js'
|
|
3
|
-
export * from './fraction.js'
|
|
4
1
|
export { abs } from './abs.js'
|
|
2
|
+
export * from './constants.js'
|
|
5
3
|
export { difference } from './difference.js'
|
|
4
|
+
export * from './fraction.js'
|
|
6
5
|
export { maximum } from './maximum.js'
|
|
7
6
|
export { minimum } from './minimum.js'
|
|
8
|
-
export { sqrt } from './sqrt.js'
|
|
9
7
|
export { numberToBigInt } from './number-to-bigint.js'
|
|
8
|
+
export * from './percent.js'
|
|
9
|
+
export { sqrt } from './sqrt.js'
|
package/generic/utils/id.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { nativeAddress } from '../../evm/config/simple-constants.js'
|
|
2
|
+
import { isKvmTokenAddress } from '../../kvm/currency/token.js'
|
|
2
3
|
import type { ChainId } from '../chain/chains.js'
|
|
3
4
|
import type { ID } from '../types/id.js'
|
|
4
5
|
|
|
@@ -43,7 +44,10 @@ export function getIdFromChainIdAddress<
|
|
|
43
44
|
)
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
// Kvm addresses are case-sensitive
|
|
48
|
+
if (!isKvmTokenAddress(address)) {
|
|
49
|
+
address = address.toLowerCase() as TAddress
|
|
50
|
+
}
|
|
47
51
|
|
|
48
52
|
if (address === nativeAddress && options.translateNative) {
|
|
49
53
|
address = 'NATIVE' as TAddress
|
package/kvm/currency/token.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as z from 'zod'
|
|
|
2
2
|
import type { CurrencyMetadata } from '../../generic/currency/currency.js'
|
|
3
3
|
import { Token } from '../../generic/currency/token.js'
|
|
4
4
|
|
|
5
|
-
import { type KvmChainId
|
|
5
|
+
import { isKvmChainId, type KvmChainId } from '../chain/chains.js'
|
|
6
6
|
|
|
7
7
|
export type KvmTokenAddress = `${string}.${string}` | 'coin'
|
|
8
8
|
|
|
@@ -61,7 +61,9 @@ export const serializedKvmTokenSchema = <
|
|
|
61
61
|
TMetadata extends {} = CurrencyMetadata,
|
|
62
62
|
>({
|
|
63
63
|
metadata,
|
|
64
|
-
}: {
|
|
64
|
+
}: {
|
|
65
|
+
metadata?: z.ZodType<TMetadata>
|
|
66
|
+
} = {}) =>
|
|
65
67
|
z.object({
|
|
66
68
|
chainId: z.number().int().refine(isKvmChainId),
|
|
67
69
|
address: z.string().refine(isKvmTokenAddress),
|
package/mvm/currency/token.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from 'zod'
|
|
2
2
|
import type { CurrencyMetadata } from '../../generic/currency/currency.js'
|
|
3
3
|
import { Token } from '../../generic/currency/token.js'
|
|
4
|
-
import { type MvmChainId
|
|
4
|
+
import { isMvmChainId, type MvmChainId } from '../chain/chains.js'
|
|
5
5
|
|
|
6
6
|
export type MvmAddress = `0x${string}::${string}::${string}`
|
|
7
7
|
|
|
@@ -13,6 +13,15 @@ export function isMvmAddress(address: string): address is MvmAddress {
|
|
|
13
13
|
export class MvmToken<
|
|
14
14
|
TMetadata extends CurrencyMetadata = Record<string, unknown>,
|
|
15
15
|
> extends Token<MvmChainId, MvmAddress, TMetadata> {
|
|
16
|
+
constructor({
|
|
17
|
+
address,
|
|
18
|
+
...rest
|
|
19
|
+
}: ConstructorParameters<
|
|
20
|
+
typeof Token<MvmChainId, MvmAddress, TMetadata>
|
|
21
|
+
>[0]) {
|
|
22
|
+
super({ address: address.toLowerCase() as MvmAddress, ...rest })
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
public override wrap(): MvmToken<TMetadata> {
|
|
17
26
|
return this
|
|
18
27
|
}
|
|
@@ -43,7 +52,9 @@ export const serializedMvmTokenSchema = <
|
|
|
43
52
|
TMetadata extends {} = CurrencyMetadata,
|
|
44
53
|
>({
|
|
45
54
|
metadata,
|
|
46
|
-
}: {
|
|
55
|
+
}: {
|
|
56
|
+
metadata?: z.ZodType<TMetadata>
|
|
57
|
+
} = {}) =>
|
|
47
58
|
z.object({
|
|
48
59
|
chainId: z.number().int().refine(isMvmChainId),
|
|
49
60
|
address: z.string().refine(isMvmAddress),
|