rubic-sdk 6.0.0-alpha.ton.41 → 6.0.0-alpha.ton.43
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/LICENSE +674 -674
- package/README.md +361 -361
- package/lib/common/errors/swap/not-supported-region.d.ts +7 -0
- package/lib/common/errors/swap/not-supported-region.js +15 -0
- package/lib/common/errors/swap/not-supported-region.js.map +1 -0
- package/lib/common/tokens/constants/native-tokens.js +21 -0
- package/lib/common/tokens/constants/native-tokens.js.map +1 -1
- package/lib/common/tokens/constants/wrapped-addresses.js +3 -1
- package/lib/common/tokens/constants/wrapped-addresses.js.map +1 -1
- package/lib/common/tokens/constants/wrapped-native-tokens.js +14 -0
- package/lib/common/tokens/constants/wrapped-native-tokens.js.map +1 -1
- package/lib/common/tokens/price-token-amount.js +1 -1
- package/lib/common/tokens/price-token-amount.js.map +1 -1
- package/lib/core/blockchain/models/backend-blockchains.d.ts +2 -0
- package/lib/core/blockchain/models/backend-blockchains.js +3 -1
- package/lib/core/blockchain/models/backend-blockchains.js.map +1 -1
- package/lib/core/blockchain/models/blockchain-name.d.ts +4 -0
- package/lib/core/blockchain/models/blockchain-name.js +3 -1
- package/lib/core/blockchain/models/blockchain-name.js.map +1 -1
- package/lib/core/blockchain/utils/blockchains-info/constants/blockchain-id.js +4 -1
- package/lib/core/blockchain/utils/blockchains-info/constants/blockchain-id.js.map +1 -1
- package/lib/core/blockchain/web3-private-service/models/web-private-supported-blockchain.d.ts +1 -1
- package/lib/core/blockchain/web3-private-service/web3-private/evm-web3-private/evm-web3-private.js +9 -3
- package/lib/core/blockchain/web3-private-service/web3-private/evm-web3-private/evm-web3-private.js.map +1 -1
- package/lib/core/blockchain/web3-public-service/constants/rpc-errors.js +2 -1
- package/lib/core/blockchain/web3-public-service/constants/rpc-errors.js.map +1 -1
- package/lib/core/blockchain/web3-public-service/models/web3-public-storage.d.ts +1 -1
- package/lib/core/blockchain/web3-public-service/web3-public/constants/multicall-addresses.js +3 -1
- package/lib/core/blockchain/web3-public-service/web3-public/constants/multicall-addresses.js.map +1 -1
- package/lib/core/blockchain/web3-public-service/web3-public/solana-web3-public/solana-web3-public.d.ts +1 -0
- package/lib/core/blockchain/web3-public-service/web3-public/solana-web3-public/solana-web3-public.js +8 -0
- package/lib/core/blockchain/web3-public-service/web3-public/solana-web3-public/solana-web3-public.js.map +1 -1
- package/lib/core/gas-price-api/constants/eip1559-compatible-blockchains.js +3 -2
- package/lib/core/gas-price-api/constants/eip1559-compatible-blockchains.js.map +1 -1
- package/lib/features/common/constants/proxy-supported-blockchain.d.ts +1 -1
- package/lib/features/common/constants/proxy-supported-blockchain.js +2 -1
- package/lib/features/common/constants/proxy-supported-blockchain.js.map +1 -1
- package/lib/features/common/providers/bridgers/models/bridgers-contract-addresses.js +5 -5
- package/lib/features/common/providers/bridgers/models/bridgers-swap-api.d.ts +1 -0
- package/lib/features/common/providers/rango/constants/rango-contract-address.js +11 -6
- package/lib/features/common/providers/rango/constants/rango-contract-address.js.map +1 -1
- package/lib/features/common/providers/rango/models/rango-api-blockchain-names.js +4 -3
- package/lib/features/common/providers/rango/models/rango-api-blockchain-names.js.map +1 -1
- package/lib/features/common/providers/rango/models/rango-api-symbol-names.js +4 -3
- package/lib/features/common/providers/rango/models/rango-api-symbol-names.js.map +1 -1
- package/lib/features/common/providers/rango/models/rango-api-trade-types.d.ts +2 -2
- package/lib/features/common/providers/rango/models/rango-supported-blockchains.d.ts +1 -1
- package/lib/features/common/providers/rango/models/rango-supported-blockchains.js +3 -3
- package/lib/features/common/providers/rango/models/rango-supported-blockchains.js.map +1 -1
- package/lib/features/common/providers/rango/utils/rango-utils.d.ts +1 -1
- package/lib/features/common/providers/rango/utils/rango-utils.js +6 -2
- package/lib/features/common/providers/rango/utils/rango-utils.js.map +1 -1
- package/lib/features/common/providers/router/models/router-quote-response-config.d.ts +39 -0
- package/lib/features/common/providers/router/models/router-quote-response-config.js +3 -0
- package/lib/features/common/providers/router/models/router-quote-response-config.js.map +1 -0
- package/lib/features/common/providers/router/models/router-quote-send-params.d.ts +8 -0
- package/lib/features/common/providers/router/models/router-quote-send-params.js +3 -0
- package/lib/features/common/providers/router/models/router-quote-send-params.js.map +1 -0
- package/lib/features/common/providers/router/models/router-send-transaction-params.d.ts +20 -0
- package/lib/features/common/providers/router/models/router-send-transaction-params.js +3 -0
- package/lib/features/common/providers/router/models/router-send-transaction-params.js.map +1 -0
- package/lib/features/common/providers/router/services/router-api-service.d.ts +12 -0
- package/lib/features/common/providers/router/services/router-api-service.js +36 -0
- package/lib/features/common/providers/router/services/router-api-service.js.map +1 -0
- package/lib/features/common/providers/symbiosis/constants/symbiosis-api-common.d.ts +1 -1
- package/lib/features/common/providers/symbiosis/constants/symbiosis-api-common.js +1 -1
- package/lib/features/common/providers/symbiosis/constants/symbiosis-api-common.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/constants/cross-chain-providers.d.ts +4 -1
- package/lib/features/cross-chain/calculation-manager/constants/cross-chain-providers.js +8 -4
- package/lib/features/cross-chain/calculation-manager/constants/cross-chain-providers.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/models/cross-chain-trade-type.d.ts +2 -0
- package/lib/features/cross-chain/calculation-manager/models/cross-chain-trade-type.js +3 -1
- package/lib/features/cross-chain/calculation-manager/models/cross-chain-trade-type.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/archon-bridge/archon-bridge-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/archon-bridge/archon-bridge-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/bridgers-provider/bridgers-cross-chain-provider.d.ts +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/bridgers-provider/bridgers-cross-chain-provider.js +35 -19
- package/lib/features/cross-chain/calculation-manager/providers/bridgers-provider/bridgers-cross-chain-provider.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/bridgers-provider/evm-bridgers-trade/evm-bridgers-cross-chain-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/bridgers-provider/evm-bridgers-trade/evm-bridgers-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/bridgers-provider/utils/get-proxy-method-arguments-and-transaction-data.js +8 -0
- package/lib/features/cross-chain/calculation-manager/providers/bridgers-provider/utils/get-proxy-method-arguments-and-transaction-data.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/cbridge/cbridge-cross-chain-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/cbridge/cbridge-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/changenow-provider/changenow-cross-chain-provider.js +30 -10
- package/lib/features/cross-chain/calculation-manager/providers/changenow-provider/changenow-cross-chain-provider.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/changenow-provider/changenow-cross-chain-trade.d.ts +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/changenow-provider/changenow-cross-chain-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/changenow-provider/changenow-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/common/constants/rubic-proxy-contract-address.js +2 -1
- package/lib/features/cross-chain/calculation-manager/providers/common/constants/rubic-proxy-contract-address.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/evm-cross-chain-trade.js +4 -7
- package/lib/features/cross-chain/calculation-manager/providers/common/emv-cross-chain-trade/evm-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/common/models/bridge-type.d.ts +3 -1
- package/lib/features/cross-chain/calculation-manager/providers/common/models/default-bridge-type.d.ts +2 -0
- package/lib/features/cross-chain/calculation-manager/providers/debridge-provider/chains/debridge-evm-cross-chain-trade.js +3 -2
- package/lib/features/cross-chain/calculation-manager/providers/debridge-provider/chains/debridge-evm-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/debridge-provider/debridge-cross-chain-provider.js +2 -1
- package/lib/features/cross-chain/calculation-manager/providers/debridge-provider/debridge-cross-chain-provider.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/constants/eddy-bridge-contract-addresses.d.ts +11 -2
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/constants/eddy-bridge-contract-addresses.js +38 -5
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/constants/eddy-bridge-contract-addresses.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/constants/eddy-bridge-supported-chains.d.ts +0 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/constants/edyy-bridge-abi.d.ts +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/constants/edyy-bridge-abi.js +15 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/constants/edyy-bridge-abi.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/constants/swap-limits.js +61 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/constants/swap-limits.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/eddy-bridge-provider.d.ts +0 -2
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/eddy-bridge-provider.js +14 -78
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/eddy-bridge-provider.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/eddy-bridge-trade.d.ts +2 -3
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/eddy-bridge-trade.js +23 -51
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/eddy-bridge-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/models/eddy-bridge-api-types.d.ts +12 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/models/eddy-quote-controller.d.ts +4 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/models/eddy-quote-controller.js +3 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/models/eddy-quote-controller.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/models/eddy-swap-controller.d.ts +4 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/models/eddy-swap-controller.js +3 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/models/eddy-swap-controller.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/models/eddy-trade-types.d.ts +3 -2
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/services/eddy-bridge-api-service.d.ts +5 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/services/eddy-bridge-api-service.js +7 -3
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/services/eddy-bridge-api-service.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/services/eddy-bridge-contract-service.d.ts +7 -4
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/services/eddy-bridge-contract-service.js +48 -15
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/services/eddy-bridge-contract-service.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/calculate-rates.d.ts +3 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/calculate-rates.js +37 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/calculate-rates.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-bridge-routing-directions.d.ts +18 -2
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-bridge-routing-directions.js +61 -11
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-bridge-routing-directions.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-quoter-controller-factory.d.ts +14 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-quoter-controller-factory.js +79 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-quoter-controller-factory.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-swap-controller-factory.d.ts +17 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-swap-controller-factory.js +93 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/eddy-swap-controller-factory.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/find-api-token-address.d.ts +3 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/find-api-token-address.js +16 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/find-api-token-address.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/find-transit-token-address.d.ts +3 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/find-transit-token-address.js +15 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/find-transit-token-address.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/eddy-bridge/utils/get-eddy-bridge-dst-status.js +2 -2
- package/lib/features/cross-chain/calculation-manager/providers/layerzero-bridge/layerzero-bridge-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/layerzero-bridge/layerzero-bridge-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/lifi-provider/constants/lifi-cross-chain-supported-blockchain.d.ts +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/lifi-provider/constants/lifi-cross-chain-supported-blockchain.js +5 -1
- package/lib/features/cross-chain/calculation-manager/providers/lifi-provider/constants/lifi-cross-chain-supported-blockchain.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/lifi-provider/lifi-cross-chain-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/lifi-provider/lifi-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/meson-provider/constants/meson-contract-addresses.js +4 -2
- package/lib/features/cross-chain/calculation-manager/providers/meson-provider/constants/meson-contract-addresses.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/meson-provider/constants/meson-cross-chain-supported-chains.d.ts +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/meson-provider/constants/meson-cross-chain-supported-chains.js +4 -2
- package/lib/features/cross-chain/calculation-manager/providers/meson-provider/constants/meson-cross-chain-supported-chains.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/meson-provider/meson-cross-chain-provider.js +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/meson-provider/meson-cross-chain-provider.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/orbiter-bridge/models/orbiter-contract-addresses.js +5 -3
- package/lib/features/cross-chain/calculation-manager/providers/orbiter-bridge/models/orbiter-contract-addresses.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/orbiter-bridge/models/orbiter-supported-blockchains.d.ts +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/orbiter-bridge/models/orbiter-supported-blockchains.js +5 -3
- package/lib/features/cross-chain/calculation-manager/providers/orbiter-bridge/models/orbiter-supported-blockchains.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/orbiter-bridge/orbiter-bridge-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/orbiter-bridge/orbiter-bridge-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/owl-to-bridge/constants/owl-to-supported-chains.d.ts +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/owl-to-bridge/constants/owl-to-supported-chains.js +3 -2
- package/lib/features/cross-chain/calculation-manager/providers/owl-to-bridge/constants/owl-to-supported-chains.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/owl-to-bridge/owl-to-bridge-trade.js +0 -1
- package/lib/features/cross-chain/calculation-manager/providers/owl-to-bridge/owl-to-bridge-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-provider.js +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-provider.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/constants/router-cross-chain-supported-chains.d.ts +2 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/constants/router-cross-chain-supported-chains.js +31 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/constants/router-cross-chain-supported-chains.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/router-cross-chain-provider.d.ts +15 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/router-cross-chain-provider.js +155 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/router-cross-chain-provider.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/router-cross-chain-trade.d.ts +48 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/router-cross-chain-trade.js +141 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/router-cross-chain-trade.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/utils/router-cross-chain-util-service.ts.d.ts +9 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/utils/router-cross-chain-util-service.ts.js +43 -0
- package/lib/features/cross-chain/calculation-manager/providers/router-provider/utils/router-cross-chain-util-service.ts.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/squidrouter-provider/squidrouter-cross-chain-trade.js +0 -1
- package/lib/features/cross-chain/calculation-manager/providers/squidrouter-provider/squidrouter-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/stargate-provider/stargate-cross-chain-trade.js +1 -2
- package/lib/features/cross-chain/calculation-manager/providers/stargate-provider/stargate-cross-chain-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-blockchain-supported-pools.d.ts +2 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-blockchain-supported-pools.js +82 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-blockchain-supported-pools.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-bridge-token.d.ts +11 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-bridge-token.js +14 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-bridge-token.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-chain-id.d.ts +2 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-chain-id.js +26 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-chain-id.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-contract-address.d.ts +6 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-contract-address.js +100 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-contract-address.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-cross-chain-supported-blockchains.d.ts +2 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-cross-chain-supported-blockchains.js +26 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-cross-chain-supported-blockchains.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-pool-abi.d.ts +5 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-pool-abi.js +181 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-pool-abi.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-pool-id.d.ts +16 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-pool-id.js +26 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-pool-id.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-token-address.d.ts +5 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-token-address.js +96 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/constants/stargate-v2-token-address.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/modal/stargate-v2-quote-params-struct.d.ts +17 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/modal/stargate-v2-quote-params-struct.js +3 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/modal/stargate-v2-quote-params-struct.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/stargate-v2-cross-chain-provider.d.ts +18 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/stargate-v2-cross-chain-provider.js +199 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/stargate-v2-cross-chain-provider.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/stargate-v2-cross-chain-trade.d.ts +56 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/stargate-v2-cross-chain-trade.js +170 -0
- package/lib/features/cross-chain/calculation-manager/providers/stargate-v2-provider/stargate-v2-cross-chain-trade.js.map +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/symbiosis-provider/models/symbiosis-cross-chain-supported-blockchains.d.ts +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/symbiosis-provider/models/symbiosis-cross-chain-supported-blockchains.js +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/symbiosis-provider/models/symbiosis-cross-chain-supported-blockchains.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/symbiosis-provider/symbiosis-ccr-evm-trade.js +5 -7
- package/lib/features/cross-chain/calculation-manager/providers/symbiosis-provider/symbiosis-ccr-evm-trade.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/symbiosis-provider/symbiosis-cross-chain-provider.js +1 -0
- package/lib/features/cross-chain/calculation-manager/providers/symbiosis-provider/symbiosis-cross-chain-provider.js.map +1 -1
- package/lib/features/cross-chain/calculation-manager/providers/xy-provider/xy-cross-chain-provider.js +2 -4
- package/lib/features/cross-chain/calculation-manager/providers/xy-provider/xy-cross-chain-provider.js.map +1 -1
- package/lib/features/cross-chain/status-manager/cross-chain-status-manager.d.ts +1 -0
- package/lib/features/cross-chain/status-manager/cross-chain-status-manager.js +9 -2
- package/lib/features/cross-chain/status-manager/cross-chain-status-manager.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/constants/trade-providers/algebra-trade-providers.d.ts +2 -1
- package/lib/features/on-chain/calculation-manager/constants/trade-providers/algebra-trade-providers.js +3 -1
- package/lib/features/on-chain/calculation-manager/constants/trade-providers/algebra-trade-providers.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/constants/trade-providers/uniswap-v2-trade-providers.d.ts +4 -2
- package/lib/features/on-chain/calculation-manager/constants/trade-providers/uniswap-v2-trade-providers.js +7 -2
- package/lib/features/on-chain/calculation-manager/constants/trade-providers/uniswap-v2-trade-providers.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/models/on-chain-manager-aggregators-types.d.ts +2 -0
- package/lib/features/on-chain/calculation-manager/models/on-chain-manager-aggregators-types.js +2 -2
- package/lib/features/on-chain/calculation-manager/models/on-chain-manager-aggregators-types.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/on-chain-manager.js +15 -23
- package/lib/features/on-chain/calculation-manager/on-chain-manager.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/common/native-router-abstract/models/native-router-quote.d.ts +6 -4
- package/lib/features/on-chain/calculation-manager/providers/aggregators/common/native-router-abstract/native-router-abstract-provider.js +8 -6
- package/lib/features/on-chain/calculation-manager/providers/aggregators/common/native-router-abstract/native-router-abstract-provider.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/common/native-router-abstract/native-router-abstract-trade.js +1 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/common/native-router-abstract/native-router-abstract-trade.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/common/native-router-abstract/services/native-router-api-service.d.ts +2 -2
- package/lib/features/on-chain/calculation-manager/providers/aggregators/common/native-router-abstract/services/native-router-api-service.js +5 -14
- package/lib/features/on-chain/calculation-manager/providers/aggregators/common/native-router-abstract/services/native-router-api-service.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/odos/models/odos-supported-blockchains.d.ts +1 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/odos/models/odos-supported-blockchains.js +2 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/odos/models/odos-supported-blockchains.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/xy-dex/constants/xy-dex-supported-blockchains.d.ts +1 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/xy-dex/constants/xy-dex-supported-blockchains.js +2 -1
- package/lib/features/on-chain/calculation-manager/providers/aggregators/xy-dex/constants/xy-dex-supported-blockchains.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/common/models/on-chain-trade-type.d.ts +4 -1
- package/lib/features/on-chain/calculation-manager/providers/common/models/on-chain-trade-type.js +4 -1
- package/lib/features/on-chain/calculation-manager/providers/common/models/on-chain-trade-type.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/common/on-chain-trade/evm-on-chain-trade/evm-on-chain-trade.js +0 -1
- package/lib/features/on-chain/calculation-manager/providers/common/on-chain-trade/evm-on-chain-trade/evm-on-chain-trade.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/kujata-bahamut/constants.d.ts +4 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/kujata-bahamut/constants.js +18 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/kujata-bahamut/constants.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/kujata-bahamut/kujata-bahamut-provider.d.ts +7 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/kujata-bahamut/kujata-bahamut-provider.js +17 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/kujata-bahamut/kujata-bahamut-provider.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/kujata-bahamut/kujata-bahamut-trade.d.ts +6 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/kujata-bahamut/kujata-bahamut-trade.js +17 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/kujata-bahamut/kujata-bahamut-trade.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/silk-swap-bahamut/constants.d.ts +2 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/silk-swap-bahamut/constants.js +7 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/silk-swap-bahamut/constants.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/{uniswap-v2-bahamut/uniswap-v2-bahamut-provider.d.ts → silk-swap-bahamut/silk-swap-bahamut-provider.d.ts} +3 -3
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/{uniswap-v2-bahamut/uniswap-v2-bahamut-provider.js → silk-swap-bahamut/silk-swap-bahamut-provider.js} +7 -7
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/silk-swap-bahamut/silk-swap-bahamut-provider.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/{uniswap-v2-bahamut/uniswap-v2-bahamut-trade.d.ts → silk-swap-bahamut/silk-swap-bahamut-trade.d.ts} +1 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/{uniswap-v2-bahamut/uniswap-v2-bahamut-trade.js → silk-swap-bahamut/silk-swap-bahamut-trade.js} +6 -6
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/silk-swap-bahamut/silk-swap-bahamut-trade.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/default-constants.d.ts +2 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/default-constants.js +20 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/default-constants.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/macaron/constants.d.ts +2 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/macaron/constants.js +7 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/macaron/constants.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/macaron/macaron-provider.d.ts +7 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/macaron/macaron-provider.js +17 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/macaron/macaron-provider.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/macaron/macaron-trade.d.ts +6 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/macaron/macaron-trade.js +17 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/bitlayer/macaron/macaron-trade.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v2-abstract/path-factory.js +10 -7
- package/lib/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v2-abstract/path-factory.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v3-algebra-abstract/uniswap-v3-algebra-abstract-provider.d.ts +2 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/common/uniswap-v3-algebra-abstract/uniswap-v3-algebra-abstract-provider.js.map +1 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/camelot-gravity-provider.d.ts +16 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/camelot-gravity-provider.js +39 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/camelot-gravity-provider.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/camelot-gravity-trade.d.ts +18 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/camelot-gravity-trade.js +57 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/camelot-gravity-trade.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/constants/gravity-swap-router-contract-address.d.ts +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/constants/gravity-swap-router-contract-address.js +5 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/constants/gravity-swap-router-contract-address.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/constants/provider-configuration.d.ts +2 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/constants/provider-configuration.js +10 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/constants/provider-configuration.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/constants/quote-contract-data.d.ts +3 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/constants/quote-contract-data.js +104 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/camelot-gravity/constants/quote-contract-data.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/default-constants.d.ts +2 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/default-constants.js +19 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/gravity/default-constants.js.map +1 -0
- package/lib/features/on-chain/calculation-manager/providers/dexes/tron/bridgers/bridgers-trade.js.map +1 -1
- package/lib/index.d.ts +43 -3
- package/lib/index.js +43 -3
- package/lib/index.js.map +1 -1
- package/package.json +160 -158
- package/dist/rubic-sdk.min.js +0 -6
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/uniswap-v2-bahamut/constants.d.ts +0 -2
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/uniswap-v2-bahamut/constants.js +0 -7
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/uniswap-v2-bahamut/constants.js.map +0 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/uniswap-v2-bahamut/uniswap-v2-bahamut-provider.js.map +0 -1
- package/lib/features/on-chain/calculation-manager/providers/dexes/bahamut/uniswap-v2-bahamut/uniswap-v2-bahamut-trade.js.map +0 -1
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const owlToSupportedBlockchains: readonly ["ETH", "BSC", "ZK_FAIR", "SCROLL", "BASE", "ZK_SYNC", "LINEA", "ARBITRUM", "OPTIMISM", "POLYGON_ZKEVM", "POLYGON", "KROMA", "MANTA_PACIFIC", "XLAYER", "MANTLE", "BLAST", "ZETACHAIN", "MERLIN", "MODE", "TAIKO", "CORE"];
|
1
|
+
export declare const owlToSupportedBlockchains: readonly ["ETH", "BSC", "ZK_FAIR", "SCROLL", "BASE", "ZK_SYNC", "LINEA", "ARBITRUM", "OPTIMISM", "POLYGON_ZKEVM", "POLYGON", "KROMA", "MANTA_PACIFIC", "METIS", "XLAYER", "MANTLE", "BLAST", "ZETACHAIN", "MERLIN", "MODE", "TAIKO", "CORE", "BITLAYER"];
|
2
2
|
export type OwlToSupportedBlockchain = (typeof owlToSupportedBlockchains)[number];
|
@@ -17,7 +17,7 @@ exports.owlToSupportedBlockchains = [
|
|
17
17
|
blockchain_name_1.BLOCKCHAIN_NAME.POLYGON,
|
18
18
|
blockchain_name_1.BLOCKCHAIN_NAME.KROMA,
|
19
19
|
blockchain_name_1.BLOCKCHAIN_NAME.MANTA_PACIFIC,
|
20
|
-
|
20
|
+
blockchain_name_1.BLOCKCHAIN_NAME.METIS,
|
21
21
|
blockchain_name_1.BLOCKCHAIN_NAME.XLAYER,
|
22
22
|
blockchain_name_1.BLOCKCHAIN_NAME.MANTLE,
|
23
23
|
blockchain_name_1.BLOCKCHAIN_NAME.BLAST,
|
@@ -25,6 +25,7 @@ exports.owlToSupportedBlockchains = [
|
|
25
25
|
blockchain_name_1.BLOCKCHAIN_NAME.MERLIN,
|
26
26
|
blockchain_name_1.BLOCKCHAIN_NAME.MODE,
|
27
27
|
blockchain_name_1.BLOCKCHAIN_NAME.TAIKO,
|
28
|
-
blockchain_name_1.BLOCKCHAIN_NAME.CORE
|
28
|
+
blockchain_name_1.BLOCKCHAIN_NAME.CORE,
|
29
|
+
blockchain_name_1.BLOCKCHAIN_NAME.BITLAYER
|
29
30
|
];
|
30
31
|
//# sourceMappingURL=owl-to-supported-chains.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"owl-to-supported-chains.js","sourceRoot":"","sources":["../../../../../../../src/features/cross-chain/calculation-manager/providers/owl-to-bridge/constants/owl-to-supported-chains.ts"],"names":[],"mappings":";;;AAAA,gFAA6E;AAEhE,QAAA,yBAAyB,GAAG;IACrC,iCAAe,CAAC,QAAQ;IACxB,iCAAe,CAAC,mBAAmB;IACnC,iCAAe,CAAC,OAAO;IACvB,iCAAe,CAAC,MAAM;IACtB,4BAA4B;IAC5B,iCAAe,CAAC,IAAI;IACpB,iCAAe,CAAC,OAAO;IACvB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,QAAQ;IACxB,iCAAe,CAAC,QAAQ;IACxB,iCAAe,CAAC,aAAa;IAC7B,iCAAe,CAAC,OAAO;IACvB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,aAAa;IAC7B,
|
1
|
+
{"version":3,"file":"owl-to-supported-chains.js","sourceRoot":"","sources":["../../../../../../../src/features/cross-chain/calculation-manager/providers/owl-to-bridge/constants/owl-to-supported-chains.ts"],"names":[],"mappings":";;;AAAA,gFAA6E;AAEhE,QAAA,yBAAyB,GAAG;IACrC,iCAAe,CAAC,QAAQ;IACxB,iCAAe,CAAC,mBAAmB;IACnC,iCAAe,CAAC,OAAO;IACvB,iCAAe,CAAC,MAAM;IACtB,4BAA4B;IAC5B,iCAAe,CAAC,IAAI;IACpB,iCAAe,CAAC,OAAO;IACvB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,QAAQ;IACxB,iCAAe,CAAC,QAAQ;IACxB,iCAAe,CAAC,aAAa;IAC7B,iCAAe,CAAC,OAAO;IACvB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,aAAa;IAC7B,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,MAAM;IACtB,iCAAe,CAAC,MAAM;IACtB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,SAAS;IACzB,iCAAe,CAAC,MAAM;IACtB,iCAAe,CAAC,IAAI;IACpB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,IAAI;IACpB,iCAAe,CAAC,QAAQ;CAClB,CAAC"}
|
package/lib/features/cross-chain/calculation-manager/providers/owl-to-bridge/owl-to-bridge-trade.js
CHANGED
@@ -34,7 +34,6 @@ class OwlToBridgeTrade extends evm_cross_chain_trade_1.EvmCrossChainTrade {
|
|
34
34
|
return this.from.blockchain;
|
35
35
|
}
|
36
36
|
get fromContractAddress() {
|
37
|
-
// @TODO Add owl-to contract addresses
|
38
37
|
return this.isProxyTrade
|
39
38
|
? rubic_proxy_contract_address_1.rubicProxyContractAddress[this.fromBlockchain].gateway
|
40
39
|
: this.providerGateway;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"owl-to-bridge-trade.js","sourceRoot":"","sources":["../../../../../../src/features/cross-chain/calculation-manager/providers/owl-to-bridge/owl-to-bridge-trade.ts"],"names":[],"mappings":";;;AAGA,6GAAwG;AAExG,2FAAwF;AAGxF,gFAAkG;AAClG,mFAA4E;AAC5E,mGAA6F;AAC7F,qHAA8G;AAC9G,2HAAoH;AACpH,iGAA2F;AAE3F,8DAAuE;AAKvE,oHAA6G;AAI7G,sEAAgE;AAEhE,MAAa,gBAAiB,SAAQ,0CAAkB;IACpD,gBAAgB;IACT,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAC3B,OAAO,EACP,SAAS,EACT,OAAO,EACP,eAAe,EACf,UAAU,EACV,cAAc,EACM;QACpB,MAAM,KAAK,GAAG,IAAI,gBAAgB,CAAC;YAC/B,eAAe,EAAE;gBACb,OAAO;gBACP,IAAI,EAAE,SAAS;gBACf,EAAE,EAAE,OAAO;gBACX,WAAW,EAAE,SAAS,CAAC,2BAA2B,CAAC,OAAO,CAAC,IAAI,CAAC;gBAChE,OAAO,EAAE,IAAI;gBACb,UAAU;gBACV,cAAc;aACjB;YACD,eAAe;YACf,SAAS,EAAE,EAAE;SAChB,CAAC,CAAC;QACH,OAAO,IAAA,+CAAoB,EAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IA4BD,IAAY,cAAc;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAsC,CAAC;IAC5D,CAAC;IAED,IAAc,mBAAmB;QAC7B,
|
1
|
+
{"version":3,"file":"owl-to-bridge-trade.js","sourceRoot":"","sources":["../../../../../../src/features/cross-chain/calculation-manager/providers/owl-to-bridge/owl-to-bridge-trade.ts"],"names":[],"mappings":";;;AAGA,6GAAwG;AAExG,2FAAwF;AAGxF,gFA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E,GAAG,CAAC,aAAa,CAAC,EAAE;gBACxB,KAAK,EAAE,GAAG,CAAC,aAAa,CAAC,KAAK;aACjC;YACD,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,eAAe;SAClC,CAAC;IACN,CAAC;IAEM,YAAY;QACf,OAAO;YACH,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,IAAI,CAAC,SAAS;SAC5B,CAAC;IACN,CAAC;CACJ;AA7JD,4CA6JC"}
|
@@ -89,7 +89,7 @@ class PulseChainCrossChainTrade extends evm_cross_chain_trade_1.EvmCrossChainTra
|
|
89
89
|
if (!this.isProxyTrade || this.isTokenRegistered) {
|
90
90
|
await this.checkAllowanceAndApprove(options);
|
91
91
|
}
|
92
|
-
const { onConfirm,
|
92
|
+
const { onConfirm, gasPriceOptions } = options;
|
93
93
|
let transactionHash;
|
94
94
|
const onTransactionHash = (hash) => {
|
95
95
|
if (onConfirm) {
|
@@ -104,7 +104,6 @@ class PulseChainCrossChainTrade extends evm_cross_chain_trade_1.EvmCrossChainTra
|
|
104
104
|
data,
|
105
105
|
value,
|
106
106
|
onTransactionHash,
|
107
|
-
gas: gasLimit,
|
108
107
|
gasPriceOptions
|
109
108
|
});
|
110
109
|
return transactionHash;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pulse-chain-cross-chain-trade.js","sourceRoot":"","sources":["../../../../../../src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.ts"],"names":[],"mappings":";;;AAEA,gFAAgG;AAChG,6GAAwG;AAExG,uEAAmE;AAGnE,uHAAoH;AACpH,uJAAiJ;AACjJ,yKAAkK;AAClK,+KAAwK;AACxK,qJAA+I;AAE/I,kHAA+G;AAM/G,wKAAiK;AAEjK,kJAA8I;AAC9I,4IAAwI;AACxI,0HAAm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,CAAC,WAAW;QACpB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAE5B,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;YAC7D,OAAO,KAAK,CAAC;SAChB;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,CACpD,IAAI,CAAC,IAAI,CAAC,OAAO,EACjB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,mBAAmB,CAC3B,CAAC;QACF,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAES,KAAK,CAAC,UAAU,CAAC,UAAkC,EAAE;QAC3D,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAE9B,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAC9C,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;SAChD;QAED,MAAM,EAAE,SAAS,EAAE,
|
1
|
+
{"version":3,"file":"pulse-chain-cross-chain-trade.js","sourceRoot":"","sources":["../../../../../../src/features/cross-chain/calculation-manager/providers/pulse-chain-bridge/pulse-chain-cross-chain-trade.ts"],"names":[],"mappings":";;;AAEA,gFAAgG;AAChG,6GAAwG;AAExG,uEAAmE;AAGnE,uHAAoH;AACpH,uJAAiJ;AACjJ,yKAAkK;AAClK,+KAAwK;AACxK,qJAA+I;AAE/I,kHAA+G;AAM/G,wKAAiK;AAEjK,kJAA8I;AAC9I,4IAAwI;AACxI,0HAAmH;AAGnH,MAAa,yBAA0B,SAAQ,0CAAkB;IAC7D,gBAAgB;IACT,MAAM,CAAC,KAAK,CAAC,UAAU,CAC1B,IAAyC,EACzC,OAA4C,EAC5C,YAAoC,EACpC,OAAgB,EAChB,gBAA2B,EAC3B,eAAuB,EACvB,eAAuB,EACvB,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,WAAW,IAAI,IAAI;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,GAAG;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;SAC5B,CAAC;IACN,CAAC;IAES,KAAK,CAAC,6BAA6B,CAAC,eAAuB;QAIjE,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;QACxB,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACvE,MAAM,mBAAmB,GAAG,8BAAa,CAAC,YAAY,CAClD,SAA2D,EAC3D,OAAyD,CAC5D,CAAC;QACF,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC;QAEvC,IAAI,SAAS,CAAC,QAAQ,EAAE;YACpB,OAAO;gBACH,MAAM,EAAE,mBAAmB,CAAC,oBAAoB,CAC5C,eAAe,EACf,SAAS,CAAC,eAAe,CAC5B;gBACD,MAAM;aACT,CAAC;SACL;QAED,OAAO;YACH,MAAM,EAAE,mBAAmB,CAAC,mBAAmB,CAC3C,eAAe,EACf,SAAS,CAAC,eAAe,EACzB,IAAI,CAAC,QAAQ,EACb,SAAS,CAAC,OAAO,CACpB;YACD,MAAM;SACT,CAAC;IACN,CAAC;IAEO,wBAAwB,CAC5B,SAAgB,EAChB,OAAc,EACd,eAAuB;QAEvB,MAAM,mBAAmB,GAAG,8BAAa,CAAC,YAAY,CAClD,SAA2D,EAC3D,OAAyD,CAC5D,CAAC;QAEF,OAAO,CAAC,mBAAmB,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;IACtE,CAAC;CACJ;AA3SD,8DA2SC"}
|
@@ -84,7 +84,7 @@ class RangoCrossChainProvider extends cross_chain_provider_1.CrossChainProvider
|
|
84
84
|
}
|
85
85
|
async getStep(rangoPath) {
|
86
86
|
const type = rangoPath.swapperType === 'DEX' ? 'on-chain' : 'cross-chain';
|
87
|
-
const provider = rango_utils_1.RangoUtils.getTradeTypeForRubic(rangoPath.swapper.swapperGroup);
|
87
|
+
const provider = rango_utils_1.RangoUtils.getTradeTypeForRubic(rangoPath.swapper.swapperGroup, type);
|
88
88
|
const fromBlockchain = rango_utils_1.RangoUtils.getRubicBlockchainByRangoBlockchain(rangoPath.from.blockchain);
|
89
89
|
const toBlockchain = rango_utils_1.RangoUtils.getRubicBlockchainByRangoBlockchain(rangoPath.to.blockchain);
|
90
90
|
const fromTokenAmount = await tokens_1.TokenAmount.createToken({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rango-cross-chain-provider.js","sourceRoot":"","sources":["../../../../../../src/features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-provider.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AACrC,8CAA8E;AAC9E,6EAA6E;AAG7E,uEAAmE;AACnE,qGAGwE;AAOxE,wHAGgF;AAChF,4FAA8F;AAC9F,uFAAmF;AACnF,yFAAmF;AAEnF,gFAAkG;AAClG,yEAAoE;AAIpE,oHAA6G;AAE7G,uEAAiE;AACjE,4FAAqF;AACrF,gGAAmF;AAEnF,MAAa,uBAAwB,SAAQ,yCAAkB;IAA/D;;QACW,SAAI,GAAwB,+CAAsB,CAAC,KAAK,CAAC;QAMxD,8BAAyB,GAAG,uDAAyB,CAAC;
|
1
|
+
{"version":3,"file":"rango-cross-chain-provider.js","sourceRoot":"","sources":["../../../../../../src/features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-provider.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AACrC,8CAA8E;AAC9E,6EAA6E;AAG7E,uEAAmE;AACnE,qGAGwE;AAOxE,wHAGgF;AAChF,4FAA8F;AAC9F,uFAAmF;AACnF,yFAAmF;AAEnF,gFAAkG;AAClG,yEAAoE;AAIpE,oHAA6G;AAE7G,uEAAiE;AACjE,4FAAqF;AACrF,gGAAmF;AAEnF,MAAa,uBAAwB,SAAQ,yCA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WAAW;YACd,SAAS,EAAE,IAAI,sBAAS,CAAC,SAAS,CAAC;SACtC,CAAC,CAAC;QAEH,OAAO;YACH,MAAM,EAAE,oBAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC;YACzD,KAAK,EAAE,cAAc;SACxB,CAAC;IACN,CAAC;;AA7LL,0DA8LC;AA3L0B,8BAAM,GAAG,gCAAa,AAAhB,CAAiB;AAEvB,mCAAW,GAAG,qCAAkB,AAArB,CAAsB"}
|
@@ -106,7 +106,7 @@ class RangoCrossChainTrade extends evm_cross_chain_trade_1.EvmCrossChainTrade {
|
|
106
106
|
async swapDirect(options = {}) {
|
107
107
|
await this.checkTradeErrors();
|
108
108
|
await this.checkAllowanceAndApprove(options);
|
109
|
-
const { onConfirm,
|
109
|
+
const { onConfirm, gasPriceOptions } = options;
|
110
110
|
let transactionHash;
|
111
111
|
const onTransactionHash = (hash) => {
|
112
112
|
if (onConfirm) {
|
@@ -122,7 +122,6 @@ class RangoCrossChainTrade extends evm_cross_chain_trade_1.EvmCrossChainTrade {
|
|
122
122
|
data,
|
123
123
|
value,
|
124
124
|
onTransactionHash,
|
125
|
-
gas: gasLimit,
|
126
125
|
gasPriceOptions
|
127
126
|
});
|
128
127
|
return transactionHash;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rango-cross-chain-trade.js","sourceRoot":"","sources":["../../../../../../src/features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-trade.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AACrC,8CAAkD;AAElD,4DAA+D;AAE/D,6GAAwG;AAIxG,iHAA8G;AAG9G,0HAAmH;AAEnH,gFAAkG;AAClG,mGAA6F;AAC7F,qHAA8G;AAC9G,2HAAoH;AACpH,iGAA2F;AAE3F,8DAAuE;AAKvE,oHAA6G;AAK7G,4FAAqF;AAErF,MAAa,oBAAqB,SAAQ,0CAAkB;IACxD,gBAAgB;IACT,MAAM,CAAC,KAAK,CA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IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAE5E,OAAO;YACH,eAAe,EAAE,wDAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO;YACxE,WAAW,EAAE,yDAAyB;YACtC,UAAU,EAAE,eAAe;YAC3B,eAAe,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,wBAAwB,CAAC,IAAI,CAAC;YAC7E,KAAK;SACR,CAAC;IACN,CAAC;IAES,KAAK,CAAC,UAAU,CAAC,UAAkC,EAAE;QAC3D,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC9B,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QAE7C,MAAM,EAAE,SAAS,EAAE,
|
1
|
+
{"version":3,"file":"rango-cross-chain-trade.js","sourceRoot":"","sources":["../../../../../../src/features/cross-chain/calculation-manager/providers/rango-provider/rango-cross-chain-trade.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AACrC,8CAAkD;AAElD,4DAA+D;AAE/D,6GAAwG;AAIxG,iHAA8G;AAG9G,0HAAmH;AAEnH,gFAAkG;AAClG,mGAA6F;AAC7F,qHAA8G;AAC9G,2HAAoH;AACpH,iGAA2F;AAE3F,8DAAuE;AAKvE,oHAA6G;AAK7G,4FAAqF;AAErF,MAAa,oBAAqB,SAAQ,0CAAkB;IACxD,gBAAgB;IACT,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAC3B,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,EACT,eAAe,EACf,aAAa,EACb,eAAe,EACK;QACpB,IAAI;YACA,MAAM,KAAK,GAAG,IAAI,oBAAoB,CAAC;gBACnC,eAAe,EAAE;oBACb,IAAI,EAAE,SAAS;oBACf,EAAE,EAAE,OAAO;oBACX,gBAAgB,EAAE,IAAI,sBAAS,CAAC,CAAC,CAAC;oBAClC,OAAO;oBACP,OAAO,EAAE,IAAI;oBACb,WAAW,EAAE,SAAS,CAA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AAG,KAAK,CAAC,CAAC;SAC3F;QAED,MAAM,MAAM,GAAG;YACX,IAAI,EAAE,EAAE,CAAC,MAAO;YAChB,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,GAAG;YACtB,EAAE,EAAE,EAAE,CAAC,IAAI;SACd,CAAC;QAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;IAClD,CAAC;IAEM,YAAY;QACf,OAAO;YACH,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,IAAI;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,GAAG;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;SAC5B,CAAC;IACN,CAAC;CACJ;AA7ND,oDA6NC"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export declare const routerCrossChainSupportedChains: ("ETH" | "BSC" | "POLYGON" | "POLYGON_ZKEVM" | "AVALANCHE" | "FANTOM" | "ARBITRUM" | "AURORA" | "OPTIMISM" | "BOBA" | "METIS" | "ZK_SYNC" | "LINEA" | "BASE" | "MANTLE" | "MANTA_PACIFIC" | "SCROLL" | "BLAST" | "ROOTSTOCK" | "MODE" | "XLAYER" | "TAIKO" | "TRON")[];
|
2
|
+
export type RouterCrossChainSupportedBlockchains = (typeof routerCrossChainSupportedChains)[number];
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.routerCrossChainSupportedChains = void 0;
|
4
|
+
const blockchain_name_1 = require("../../../../../../core/blockchain/models/blockchain-name");
|
5
|
+
exports.routerCrossChainSupportedChains = [
|
6
|
+
blockchain_name_1.BLOCKCHAIN_NAME.ETHEREUM,
|
7
|
+
blockchain_name_1.BLOCKCHAIN_NAME.OPTIMISM,
|
8
|
+
blockchain_name_1.BLOCKCHAIN_NAME.ROOTSTOCK,
|
9
|
+
blockchain_name_1.BLOCKCHAIN_NAME.BINANCE_SMART_CHAIN,
|
10
|
+
blockchain_name_1.BLOCKCHAIN_NAME.POLYGON,
|
11
|
+
blockchain_name_1.BLOCKCHAIN_NAME.MANTA_PACIFIC,
|
12
|
+
blockchain_name_1.BLOCKCHAIN_NAME.XLAYER,
|
13
|
+
blockchain_name_1.BLOCKCHAIN_NAME.FANTOM,
|
14
|
+
blockchain_name_1.BLOCKCHAIN_NAME.BOBA,
|
15
|
+
blockchain_name_1.BLOCKCHAIN_NAME.ZK_SYNC,
|
16
|
+
blockchain_name_1.BLOCKCHAIN_NAME.METIS,
|
17
|
+
blockchain_name_1.BLOCKCHAIN_NAME.POLYGON_ZKEVM,
|
18
|
+
blockchain_name_1.BLOCKCHAIN_NAME.MANTLE,
|
19
|
+
blockchain_name_1.BLOCKCHAIN_NAME.BASE,
|
20
|
+
blockchain_name_1.BLOCKCHAIN_NAME.MODE,
|
21
|
+
blockchain_name_1.BLOCKCHAIN_NAME.ARBITRUM,
|
22
|
+
blockchain_name_1.BLOCKCHAIN_NAME.AVALANCHE,
|
23
|
+
blockchain_name_1.BLOCKCHAIN_NAME.LINEA,
|
24
|
+
blockchain_name_1.BLOCKCHAIN_NAME.BLAST,
|
25
|
+
blockchain_name_1.BLOCKCHAIN_NAME.TAIKO,
|
26
|
+
blockchain_name_1.BLOCKCHAIN_NAME.SCROLL,
|
27
|
+
blockchain_name_1.BLOCKCHAIN_NAME.TRON,
|
28
|
+
blockchain_name_1.BLOCKCHAIN_NAME.AURORA
|
29
|
+
// BLOCKCHAIN_NAME.SOLANA
|
30
|
+
];
|
31
|
+
//# sourceMappingURL=router-cross-chain-supported-chains.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"router-cross-chain-supported-chains.js","sourceRoot":"","sources":["../../../../../../../src/features/cross-chain/calculation-manager/providers/router-provider/constants/router-cross-chain-supported-chains.ts"],"names":[],"mappings":";;;AAAA,gFAA6E;AAEhE,QAAA,+BAA+B,GAAG;IAC3C,iCAAe,CAAC,QAAQ;IACxB,iCAAe,CAAC,QAAQ;IACxB,iCAAe,CAAC,SAAS;IACzB,iCAAe,CAAC,mBAAmB;IACnC,iCAAe,CAAC,OAAO;IACvB,iCAAe,CAAC,aAAa;IAC7B,iCAAe,CAAC,MAAM;IACtB,iCAAe,CAAC,MAAM;IACtB,iCAAe,CAAC,IAAI;IACpB,iCAAe,CAAC,OAAO;IACvB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,aAAa;IAC7B,iCAAe,CAAC,MAAM;IACtB,iCAAe,CAAC,IAAI;IACpB,iCAAe,CAAC,IAAI;IACpB,iCAAe,CAAC,QAAQ;IACxB,iCAAe,CAAC,SAAS;IACzB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,KAAK;IACrB,iCAAe,CAAC,MAAM;IACtB,iCAAe,CAAC,IAAI;IACpB,iCAAe,CAAC,MAAM;IACtB,yBAAyB;CAC5B,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { PriceToken, PriceTokenAmount } from '../../../../../common/tokens';
|
2
|
+
import { BlockchainName, EvmBlockchainName } from '../../../../../core/blockchain/models/blockchain-name';
|
3
|
+
import { RouterQuoteResponseConfig } from '../../../../common/providers/router/models/router-quote-response-config';
|
4
|
+
import { RequiredCrossChainOptions } from '../../models/cross-chain-options';
|
5
|
+
import { CrossChainProvider } from '../common/cross-chain-provider';
|
6
|
+
import { CalculationResult } from '../common/models/calculation-result';
|
7
|
+
import { FeeInfo } from '../common/models/fee-info';
|
8
|
+
import { RubicStep } from '../common/models/rubicStep';
|
9
|
+
export declare class RouterCrossChainProvider extends CrossChainProvider {
|
10
|
+
readonly type: "router";
|
11
|
+
isSupportedBlockchain(fromBlockchain: BlockchainName): boolean;
|
12
|
+
calculate(from: PriceTokenAmount<EvmBlockchainName>, toToken: PriceToken<EvmBlockchainName>, options: RequiredCrossChainOptions): Promise<CalculationResult>;
|
13
|
+
protected getRoutePath(fromToken: PriceTokenAmount<EvmBlockchainName>, toToken: PriceTokenAmount<EvmBlockchainName>, routerQuoteConfig: RouterQuoteResponseConfig): Promise<RubicStep[]>;
|
14
|
+
getFeeInfo(fromBlockchain: EvmBlockchainName, providerAddress: string, percentFeeToken: PriceTokenAmount, useProxy: boolean): Promise<FeeInfo>;
|
15
|
+
}
|
@@ -0,0 +1,155 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.RouterCrossChainProvider = void 0;
|
7
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
8
|
+
const errors_1 = require("../../../../../common/errors");
|
9
|
+
const tokens_1 = require("../../../../../common/tokens");
|
10
|
+
const chain_type_1 = require("../../../../../core/blockchain/models/chain-type");
|
11
|
+
const blockchains_info_1 = require("../../../../../core/blockchain/utils/blockchains-info/blockchains-info");
|
12
|
+
const web3_pure_1 = require("../../../../../core/blockchain/web3-pure/web3-pure");
|
13
|
+
const router_api_service_1 = require("../../../../common/providers/router/services/router-api-service");
|
14
|
+
const get_from_without_fee_1 = require("../../../../common/utils/get-from-without-fee");
|
15
|
+
const on_chain_trade_type_1 = require("../../../../on-chain/calculation-manager/providers/common/models/on-chain-trade-type");
|
16
|
+
const cross_chain_trade_type_1 = require("../../models/cross-chain-trade-type");
|
17
|
+
const cross_chain_provider_1 = require("../common/cross-chain-provider");
|
18
|
+
const proxy_cross_chain_evm_trade_1 = require("../common/proxy-cross-chain-evm-facade/proxy-cross-chain-evm-trade");
|
19
|
+
const router_cross_chain_supported_chains_1 = require("./constants/router-cross-chain-supported-chains");
|
20
|
+
const router_cross_chain_trade_1 = require("./router-cross-chain-trade");
|
21
|
+
const router_cross_chain_util_service_ts_1 = require("./utils/router-cross-chain-util-service.ts");
|
22
|
+
class RouterCrossChainProvider extends cross_chain_provider_1.CrossChainProvider {
|
23
|
+
constructor() {
|
24
|
+
super(...arguments);
|
25
|
+
this.type = cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.ROUTER;
|
26
|
+
}
|
27
|
+
isSupportedBlockchain(fromBlockchain) {
|
28
|
+
return router_cross_chain_supported_chains_1.routerCrossChainSupportedChains.some(chain => chain === fromBlockchain);
|
29
|
+
}
|
30
|
+
async calculate(from, toToken, options) {
|
31
|
+
const fromBlockchain = from.blockchain;
|
32
|
+
const toBlockchain = toToken.blockchain;
|
33
|
+
if (!this.areSupportedBlockchains(from.blockchain, toToken.blockchain) ||
|
34
|
+
blockchains_info_1.BlockchainsInfo.getChainType(fromBlockchain) !== chain_type_1.CHAIN_TYPE.EVM) {
|
35
|
+
return {
|
36
|
+
trade: null,
|
37
|
+
error: new errors_1.NotSupportedTokensError(),
|
38
|
+
tradeType: this.type
|
39
|
+
};
|
40
|
+
}
|
41
|
+
const useProxy = options?.useProxy?.[this.type] ?? true;
|
42
|
+
try {
|
43
|
+
// if (toBlockchain === BLOCKCHAIN_NAME.SOLANA && options.receiverAddress) {
|
44
|
+
// await RouterCrossChainUtilService.checkAtaAddress(
|
45
|
+
// options.receiverAddress,
|
46
|
+
// toToken.address
|
47
|
+
// );
|
48
|
+
// }
|
49
|
+
const srcChainId = router_cross_chain_util_service_ts_1.RouterCrossChainUtilService.getBlockchainId(fromBlockchain);
|
50
|
+
const dstChainId = router_cross_chain_util_service_ts_1.RouterCrossChainUtilService.getBlockchainId(toBlockchain);
|
51
|
+
const NATIVE_TOKEN_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE';
|
52
|
+
const srcTokenAddress = from.address;
|
53
|
+
const dstTokenAddress = await router_cross_chain_util_service_ts_1.RouterCrossChainUtilService.checkAndConvertAddress(toBlockchain, toToken.address);
|
54
|
+
const feeInfo = await this.getFeeInfo(from.blockchain, options.providerAddress, from, useProxy);
|
55
|
+
const fromWithoutFee = (0, get_from_without_fee_1.getFromWithoutFee)(from, feeInfo?.rubicProxy?.platformFee?.percent);
|
56
|
+
const routerQuoteConfig = await router_api_service_1.RouterApiService.getQuote({
|
57
|
+
amount: fromWithoutFee.stringWeiAmount,
|
58
|
+
fromTokenAddress: from.isNative ? NATIVE_TOKEN_ADDRESS : srcTokenAddress,
|
59
|
+
fromTokenChainId: srcChainId,
|
60
|
+
toTokenAddress: toToken.isNative ? NATIVE_TOKEN_ADDRESS : dstTokenAddress,
|
61
|
+
toTokenChainId: dstChainId,
|
62
|
+
slippageTolerance: options.slippageTolerance * 100
|
63
|
+
});
|
64
|
+
const dstTokenAmount = new bignumber_js_1.default(routerQuoteConfig.destination.tokenAmount);
|
65
|
+
const to = new tokens_1.PriceTokenAmount({
|
66
|
+
...toToken.asStruct,
|
67
|
+
tokenAmount: web3_pure_1.Web3Pure.fromWei(dstTokenAmount, routerQuoteConfig.destination.asset.decimals)
|
68
|
+
});
|
69
|
+
const routePath = await this.getRoutePath(from, to, routerQuoteConfig);
|
70
|
+
const gasData = options.gasCalculation === 'enabled'
|
71
|
+
? await router_cross_chain_trade_1.RouterCrossChainTrade.getGasData(from, to, feeInfo, options.providerAddress, routerQuoteConfig, options?.receiverAddress)
|
72
|
+
: null;
|
73
|
+
return {
|
74
|
+
trade: new router_cross_chain_trade_1.RouterCrossChainTrade({
|
75
|
+
from,
|
76
|
+
to,
|
77
|
+
feeInfo,
|
78
|
+
gasData,
|
79
|
+
priceImpact: from.calculatePriceImpactPercent(to),
|
80
|
+
routerQuoteConfig,
|
81
|
+
slippage: options.slippageTolerance
|
82
|
+
}, options.providerAddress, routePath),
|
83
|
+
tradeType: this.type
|
84
|
+
};
|
85
|
+
}
|
86
|
+
catch (err) {
|
87
|
+
return {
|
88
|
+
trade: null,
|
89
|
+
error: err,
|
90
|
+
tradeType: this.type
|
91
|
+
};
|
92
|
+
}
|
93
|
+
}
|
94
|
+
async getRoutePath(fromToken, toToken, routerQuoteConfig) {
|
95
|
+
const routerSrcAsset = routerQuoteConfig.source;
|
96
|
+
const routerDstAsset = routerQuoteConfig.destination;
|
97
|
+
if (routerSrcAsset.path.length === 0 && routerDstAsset.path.length === 0) {
|
98
|
+
return [
|
99
|
+
{
|
100
|
+
type: 'cross-chain',
|
101
|
+
provider: this.type,
|
102
|
+
path: [fromToken, toToken]
|
103
|
+
}
|
104
|
+
];
|
105
|
+
}
|
106
|
+
const transitFromAddress = fromToken.address.toLowerCase() !==
|
107
|
+
routerSrcAsset.stableReserveAsset.address.toLowerCase()
|
108
|
+
? routerSrcAsset.stableReserveAsset.address
|
109
|
+
: null;
|
110
|
+
const transitToAddress = toToken.address.toLowerCase() !==
|
111
|
+
routerDstAsset.stableReserveAsset.address.toLowerCase()
|
112
|
+
? routerDstAsset.stableReserveAsset.address
|
113
|
+
: null;
|
114
|
+
const fromTransitToken = transitFromAddress
|
115
|
+
? await tokens_1.TokenAmount.createToken({
|
116
|
+
blockchain: fromToken.blockchain,
|
117
|
+
address: transitFromAddress,
|
118
|
+
weiAmount: new bignumber_js_1.default(routerSrcAsset.stableReserveAmount)
|
119
|
+
})
|
120
|
+
: fromToken;
|
121
|
+
const toTransitToken = transitToAddress
|
122
|
+
? await tokens_1.TokenAmount.createToken({
|
123
|
+
blockchain: toToken.blockchain,
|
124
|
+
address: transitToAddress,
|
125
|
+
weiAmount: new bignumber_js_1.default(routerDstAsset.stableReserveAmount)
|
126
|
+
})
|
127
|
+
: toToken;
|
128
|
+
const routePath = [];
|
129
|
+
if (transitFromAddress) {
|
130
|
+
routePath.push({
|
131
|
+
type: 'on-chain',
|
132
|
+
provider: on_chain_trade_type_1.ON_CHAIN_TRADE_TYPE.ROUTER_SWAP,
|
133
|
+
path: [fromToken, fromTransitToken]
|
134
|
+
});
|
135
|
+
}
|
136
|
+
routePath.push({
|
137
|
+
type: 'cross-chain',
|
138
|
+
provider: cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.ROUTER,
|
139
|
+
path: [fromTransitToken, toTransitToken]
|
140
|
+
});
|
141
|
+
if (transitToAddress) {
|
142
|
+
routePath.push({
|
143
|
+
type: 'on-chain',
|
144
|
+
provider: on_chain_trade_type_1.ON_CHAIN_TRADE_TYPE.ROUTER_SWAP,
|
145
|
+
path: [toTransitToken, toToken]
|
146
|
+
});
|
147
|
+
}
|
148
|
+
return routePath;
|
149
|
+
}
|
150
|
+
async getFeeInfo(fromBlockchain, providerAddress, percentFeeToken, useProxy) {
|
151
|
+
return proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getFeeInfo(fromBlockchain, providerAddress, percentFeeToken, useProxy);
|
152
|
+
}
|
153
|
+
}
|
154
|
+
exports.RouterCrossChainProvider = RouterCrossChainProvider;
|
155
|
+
//# sourceMappingURL=router-cross-chain-provider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"router-cross-chain-provider.js","sourceRoot":"","sources":["../../../../../../src/features/cross-chain/calculation-manager/providers/router-provider/router-cross-chain-provider.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AACrC,8CAA4D;AAC5D,8CAA8E;AAE9E,sEAAmE;AACnE,kGAA8F;AAC9F,uEAAmE;AAEnE,yGAAoG;AACpG,yFAAmF;AACnF,+HAA4H;AAG5H,gFAA6E;AAC7E,yEAAoE;AAIpE,oHAA6G;AAC7G,yGAGyD;AACzD,yEAAmE;AACnE,mGAAyF;AACzF,MAAa,wBAAyB,SAAQ,yCAAkB;IAAhE;;QACoB,SAAI,GAAG,+CAAsB,CAAC,MAAM,CAAC;IAiMzD,CAAC;IA/LU,qBAAqB,CAAC,cAA8B;QACvD,OAAO,qEAA+B,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,cAAc,CAAC,CAAC;IACnF,CAAC;IAEM,KAAK,CAAC,SAAS,CAClB,IAAyC,EACzC,OAAsC,EACtC,OAAkC;QAElC,MAAM,cAAc,GAAG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J,CAAC,CAAC,SAAS,CAAC;QAEhB,MAAM,cAAc,GAAG,gBAAgB;YACnC,CAAC,CAAC,MAAM,oBAAW,CAAC,WAAW,CAAC;gBAC1B,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,OAAO,EAAE,gBAAgB;gBACzB,SAAS,EAAE,IAAI,sBAAS,CAAC,cAAc,CAAC,mBAAmB,CAAC;aAC/D,CAAC;YACJ,CAAC,CAAC,OAAO,CAAC;QACd,MAAM,SAAS,GAAgB,EAAE,CAAC;QAElC,IAAI,kBAAkB,EAAE;YACpB,SAAS,CAAC,IAAI,CAAC;gBACX,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,yCAAmB,CAAC,WAAW;gBACzC,IAAI,EAAE,CAAC,SAAS,EAAE,gBAAgB,CAAC;aACtC,CAAC,CAAC;SACN;QACD,SAAS,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,+CAAsB,CAAC,MAAM;YACvC,IAAI,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC;SAC3C,CAAC,CAAC;QACH,IAAI,gBAAgB,EAAE;YAClB,SAAS,CAAC,IAAI,CAAC;gBACX,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,yCAAmB,CAAC,WAAW;gBACzC,IAAI,EAAE,CAAC,cAAc,EAAE,OAAO,CAAC;aAClC,CAAC,CAAC;SACN;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,UAAU,CACnB,cAAiC,EACjC,eAAuB,EACvB,eAAiC,EACjC,QAAiB;QAEjB,OAAO,qDAAuB,CAAC,UAAU,CACrC,cAAc,EACd,eAAe,EACf,eAAe,EACf,QAAQ,CACX,CAAC;IACN,CAAC;CACJ;AAlMD,4DAkMC"}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
2
|
+
import { PriceTokenAmount } from '../../../../../common/tokens';
|
3
|
+
import { EvmBlockchainName } from '../../../../../core/blockchain/models/blockchain-name';
|
4
|
+
import { EvmEncodeConfig } from '../../../../../core/blockchain/web3-pure/typed-web3-pure/evm-web3-pure/models/evm-encode-config';
|
5
|
+
import { ContractParams } from '../../../../common/models/contract-params';
|
6
|
+
import { RouterQuoteResponseConfig } from '../../../../common/providers/router/models/router-quote-response-config';
|
7
|
+
import { CrossChainTradeType } from '../../models/cross-chain-trade-type';
|
8
|
+
import { EvmCrossChainTrade } from '../common/emv-cross-chain-trade/evm-cross-chain-trade';
|
9
|
+
import { GasData } from '../common/emv-cross-chain-trade/models/gas-data';
|
10
|
+
import { BridgeType } from '../common/models/bridge-type';
|
11
|
+
import { FeeInfo } from '../common/models/fee-info';
|
12
|
+
import { GetContractParamsOptions } from '../common/models/get-contract-params-options';
|
13
|
+
import { OnChainSubtype } from '../common/models/on-chain-subtype';
|
14
|
+
import { RubicStep } from '../common/models/rubicStep';
|
15
|
+
import { TradeInfo } from '../common/models/trade-info';
|
16
|
+
export declare class RouterCrossChainTrade extends EvmCrossChainTrade {
|
17
|
+
static getGasData(from: PriceTokenAmount<EvmBlockchainName>, to: PriceTokenAmount<EvmBlockchainName>, feeInfo: FeeInfo, providerAddress: string, routerQuoteConfig: RouterQuoteResponseConfig, receiverAddress?: string): Promise<GasData | null>;
|
18
|
+
readonly type: CrossChainTradeType;
|
19
|
+
readonly to: PriceTokenAmount<EvmBlockchainName>;
|
20
|
+
readonly from: PriceTokenAmount<EvmBlockchainName>;
|
21
|
+
readonly toTokenAmountMin: BigNumber;
|
22
|
+
readonly feeInfo: FeeInfo;
|
23
|
+
readonly onChainSubtype: OnChainSubtype;
|
24
|
+
readonly bridgeType: BridgeType;
|
25
|
+
readonly gasData: GasData | null;
|
26
|
+
readonly priceImpact: number | null;
|
27
|
+
private readonly slippage;
|
28
|
+
readonly isAggregator = false;
|
29
|
+
private readonly routerQuoteConfig;
|
30
|
+
private get fromBlockchain();
|
31
|
+
protected get fromContractAddress(): string;
|
32
|
+
protected get methodName(): string;
|
33
|
+
constructor(crossChainTrade: {
|
34
|
+
from: PriceTokenAmount<EvmBlockchainName>;
|
35
|
+
to: PriceTokenAmount<EvmBlockchainName>;
|
36
|
+
feeInfo: FeeInfo;
|
37
|
+
gasData: GasData | null;
|
38
|
+
priceImpact: number | null;
|
39
|
+
routerQuoteConfig: RouterQuoteResponseConfig;
|
40
|
+
slippage: number;
|
41
|
+
}, providerAddress: string, routePath: RubicStep[]);
|
42
|
+
protected getContractParams(options: GetContractParamsOptions, skipAmountChangeCheck?: boolean | undefined): Promise<ContractParams>;
|
43
|
+
protected getTransactionConfigAndAmount(receiverAddress?: string): Promise<{
|
44
|
+
config: EvmEncodeConfig;
|
45
|
+
amount: string;
|
46
|
+
}>;
|
47
|
+
getTradeInfo(): TradeInfo;
|
48
|
+
}
|
@@ -0,0 +1,141 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.RouterCrossChainTrade = void 0;
|
7
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
8
|
+
const errors_1 = require("../../../../../common/errors");
|
9
|
+
const blockchains_info_1 = require("../../../../../core/blockchain/utils/blockchains-info/blockchains-info");
|
10
|
+
const evm_web3_pure_1 = require("../../../../../core/blockchain/web3-pure/typed-web3-pure/evm-web3-pure/evm-web3-pure");
|
11
|
+
const router_api_service_1 = require("../../../../common/providers/router/services/router-api-service");
|
12
|
+
const cross_chain_trade_type_1 = require("../../models/cross-chain-trade-type");
|
13
|
+
const get_cross_chain_gas_data_1 = require("../../utils/get-cross-chain-gas-data");
|
14
|
+
const rubic_proxy_contract_address_1 = require("../common/constants/rubic-proxy-contract-address");
|
15
|
+
const evm_common_cross_chain_abi_1 = require("../common/emv-cross-chain-trade/constants/evm-common-cross-chain-abi");
|
16
|
+
const gateway_rubic_cross_chain_abi_1 = require("../common/emv-cross-chain-trade/constants/gateway-rubic-cross-chain-abi");
|
17
|
+
const evm_cross_chain_trade_1 = require("../common/emv-cross-chain-trade/evm-cross-chain-trade");
|
18
|
+
const bridge_type_1 = require("../common/models/bridge-type");
|
19
|
+
const proxy_cross_chain_evm_trade_1 = require("../common/proxy-cross-chain-evm-facade/proxy-cross-chain-evm-trade");
|
20
|
+
const router_cross_chain_util_service_ts_1 = require("./utils/router-cross-chain-util-service.ts");
|
21
|
+
class RouterCrossChainTrade extends evm_cross_chain_trade_1.EvmCrossChainTrade {
|
22
|
+
static async getGasData(from, to, feeInfo, providerAddress, routerQuoteConfig, receiverAddress) {
|
23
|
+
const trade = new RouterCrossChainTrade({
|
24
|
+
from,
|
25
|
+
to,
|
26
|
+
feeInfo,
|
27
|
+
gasData: null,
|
28
|
+
priceImpact: 0,
|
29
|
+
routerQuoteConfig,
|
30
|
+
slippage: 0
|
31
|
+
}, providerAddress || evm_web3_pure_1.EvmWeb3Pure.EMPTY_ADDRESS, []);
|
32
|
+
return (0, get_cross_chain_gas_data_1.getCrossChainGasData)(trade, receiverAddress);
|
33
|
+
}
|
34
|
+
get fromBlockchain() {
|
35
|
+
return this.from.blockchain;
|
36
|
+
}
|
37
|
+
get fromContractAddress() {
|
38
|
+
return this.isProxyTrade
|
39
|
+
? rubic_proxy_contract_address_1.rubicProxyContractAddress[this.fromBlockchain].gateway
|
40
|
+
: this.routerQuoteConfig.allowanceTo;
|
41
|
+
}
|
42
|
+
get methodName() {
|
43
|
+
return 'startBridgeTokensViaGenericCrossChain';
|
44
|
+
}
|
45
|
+
constructor(crossChainTrade, providerAddress, routePath) {
|
46
|
+
super(providerAddress, routePath);
|
47
|
+
this.type = cross_chain_trade_type_1.CROSS_CHAIN_TRADE_TYPE.ROUTER;
|
48
|
+
this.onChainSubtype = { from: undefined, to: undefined };
|
49
|
+
this.bridgeType = bridge_type_1.BRIDGE_TYPE.ROUTER;
|
50
|
+
this.isAggregator = false;
|
51
|
+
this.from = crossChainTrade.from;
|
52
|
+
this.to = crossChainTrade.to;
|
53
|
+
this.feeInfo = crossChainTrade.feeInfo;
|
54
|
+
this.gasData = crossChainTrade.gasData;
|
55
|
+
this.priceImpact = crossChainTrade.priceImpact;
|
56
|
+
this.routerQuoteConfig = crossChainTrade.routerQuoteConfig;
|
57
|
+
this.slippage = crossChainTrade.slippage;
|
58
|
+
this.toTokenAmountMin = this.to.tokenAmount.multipliedBy(1 - this.slippage);
|
59
|
+
}
|
60
|
+
async getContractParams(options, skipAmountChangeCheck) {
|
61
|
+
const { data, value: providerValue, to, gasPrice } = await this.setTransactionConfig(skipAmountChangeCheck || false, options?.useCacheData || false, options?.receiverAddress);
|
62
|
+
try {
|
63
|
+
const isEvmDestination = blockchains_info_1.BlockchainsInfo.isEvmBlockchainName(this.to.blockchain);
|
64
|
+
const receivingAsset = isEvmDestination ? this.to.address : this.from.address;
|
65
|
+
const toBlockchain = this.to.blockchain;
|
66
|
+
let receiverAddress = '';
|
67
|
+
if (!isEvmDestination && options.receiverAddress) {
|
68
|
+
receiverAddress = await router_cross_chain_util_service_ts_1.RouterCrossChainUtilService.checkAndConvertAddress(toBlockchain, options?.receiverAddress);
|
69
|
+
}
|
70
|
+
else {
|
71
|
+
receiverAddress = options?.receiverAddress || this.walletAddress;
|
72
|
+
}
|
73
|
+
const bridgeData = proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getBridgeData({
|
74
|
+
...options,
|
75
|
+
receiverAddress
|
76
|
+
}, {
|
77
|
+
walletAddress: this.walletAddress,
|
78
|
+
fromTokenAmount: this.from,
|
79
|
+
toTokenAmount: this.to,
|
80
|
+
srcChainTrade: null,
|
81
|
+
providerAddress: this.providerAddress,
|
82
|
+
type: `native:${this.type}`,
|
83
|
+
fromAddress: this.walletAddress,
|
84
|
+
toAddress: receivingAsset
|
85
|
+
});
|
86
|
+
const extraNativeFee = this.from.isNative
|
87
|
+
? new bignumber_js_1.default(providerValue).minus(this.from.stringWeiAmount).toFixed()
|
88
|
+
: new bignumber_js_1.default(providerValue).toFixed();
|
89
|
+
const providerData = await proxy_cross_chain_evm_trade_1.ProxyCrossChainEvmTrade.getGenericProviderData(to, data, this.fromBlockchain, to, extraNativeFee);
|
90
|
+
const methodArguments = [bridgeData, providerData];
|
91
|
+
const value = this.getSwapValue(providerValue);
|
92
|
+
const transactionConfiguration = evm_web3_pure_1.EvmWeb3Pure.encodeMethodCall(rubic_proxy_contract_address_1.rubicProxyContractAddress[this.from.blockchain].router, evm_common_cross_chain_abi_1.evmCommonCrossChainAbi, this.methodName, methodArguments, value, {
|
93
|
+
gasPrice: gasPrice
|
94
|
+
});
|
95
|
+
const sendingToken = this.from.isNative ? [] : [this.from.address];
|
96
|
+
const sendingAmount = this.from.isNative ? [] : [this.from.stringWeiAmount];
|
97
|
+
return {
|
98
|
+
contractAddress: rubic_proxy_contract_address_1.rubicProxyContractAddress[this.from.blockchain].gateway,
|
99
|
+
contractAbi: gateway_rubic_cross_chain_abi_1.gatewayRubicCrossChainAbi,
|
100
|
+
methodName: 'startViaRubic',
|
101
|
+
methodArguments: [sendingToken, sendingAmount, transactionConfiguration.data],
|
102
|
+
value
|
103
|
+
};
|
104
|
+
}
|
105
|
+
catch (err) {
|
106
|
+
console.log(err?.message);
|
107
|
+
throw new errors_1.RubicSdkError(err?.message);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
async getTransactionConfigAndAmount(receiverAddress) {
|
111
|
+
const toBlockchain = this.to.blockchain;
|
112
|
+
const toAddress = await router_cross_chain_util_service_ts_1.RouterCrossChainUtilService.checkAndConvertAddress(toBlockchain, receiverAddress || this.walletAddress, this.to.address);
|
113
|
+
const { txn, destination } = await router_api_service_1.RouterApiService.getSwapTx({
|
114
|
+
...this.routerQuoteConfig,
|
115
|
+
senderAddress: this.walletAddress,
|
116
|
+
receiverAddress: toAddress,
|
117
|
+
refundAddress: this.walletAddress
|
118
|
+
});
|
119
|
+
if (!txn) {
|
120
|
+
throw new errors_1.RubicSdkError();
|
121
|
+
}
|
122
|
+
const config = {
|
123
|
+
data: txn.data,
|
124
|
+
value: txn.value,
|
125
|
+
to: txn.to,
|
126
|
+
gasPrice: txn.gasPrice
|
127
|
+
};
|
128
|
+
return { config, amount: destination.tokenAmount };
|
129
|
+
}
|
130
|
+
getTradeInfo() {
|
131
|
+
return {
|
132
|
+
estimatedGas: this.estimatedGas,
|
133
|
+
feeInfo: this.feeInfo,
|
134
|
+
priceImpact: this.priceImpact,
|
135
|
+
slippage: this.slippage * 100,
|
136
|
+
routePath: this.routePath
|
137
|
+
};
|
138
|
+
}
|
139
|
+
}
|
140
|
+
exports.RouterCrossChainTrade = RouterCrossChainTrade;
|
141
|
+
//# sourceMappingURL=router-cross-chain-trade.js.map
|