diff --git a/src/integrations/block_api.py b/src/integrations/block_api.py index 2cb10e8..c60e038 100644 --- a/src/integrations/block_api.py +++ b/src/integrations/block_api.py @@ -15,7 +15,7 @@ def get_block_by_tag(chain_id: str, api_key: str, block_tag: str, tx_detail: str :rtype: ApiResponse :raises Exception: If the block retrieval fails or the server responds with an error. """ - url = f"""http://localhost:8000/v1/cdc-developer-platform/block/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/block/{ chain_id}/block-tag?blockTag={block_tag}&txDetail={tx_detail}&apiKey={api_key}""" response = requests.get(url, headers={'Content-Type': 'application/json'}) diff --git a/src/integrations/contract_api.py b/src/integrations/contract_api.py index ec09db3..e5b7052 100644 --- a/src/integrations/contract_api.py +++ b/src/integrations/contract_api.py @@ -14,7 +14,7 @@ def get_contract_abi(chain_id: str, api_key: str, contract_address: str) -> ApiR :rtype: ApiResponse :raises Exception: If the contract ABI retrieval fails or the server responds with an error. """ - url = f"""http://localhost:8000/v1/cdc-developer-platform/contract/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/contract/{ chain_id}/contract-abi?contractAddress={contract_address}&apiKey={api_key}""" response = requests.get(url, headers={'Content-Type': 'application/json'}) diff --git a/src/integrations/token_api.py b/src/integrations/token_api.py index 4977c02..eef68c5 100644 --- a/src/integrations/token_api.py +++ b/src/integrations/token_api.py @@ -15,7 +15,7 @@ def get_native_token_balance(chain_id: str, api_key: str, address: str) -> ApiRe :return: The native token balance. :rtype: ApiResponse """ - url = f"""http://localhost:8000/v1/cdc-developer-platform/token/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/token/{ chain_id}/native-token-balance?address={address}&apiKey={api_key}""" response = requests.get(url, headers={'Content-Type': 'application/json'}) @@ -42,7 +42,7 @@ def get_erc20_token_balance(chain_id: str, api_key: str, address: str, contract_ :return: The ERC20 token balance. :rtype: ApiResponse """ - url = f"""http://localhost:8000/v1/cdc-developer-platform/token/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/token/{ chain_id}/erc20-token-balance?address={ address}&contractAddress={contract_address}&blockHeight={block_height}&apiKey={api_key}""" @@ -67,7 +67,7 @@ def transfer_token(chain_id: str, payload: dict) -> ApiResponse: :param provider: The provider for the transfer. :return: The transfer response. """ - url = f"http://localhost:8000/v1/cdc-developer-platform/token/{ + url = f"https://developer-platform-api.crypto.com/v1/cdc-developer-platform/token/{ chain_id}/transfer" response = requests.post( @@ -95,7 +95,7 @@ def wrap_token(chain_id: str, payload: dict) -> ApiResponse: :param provider: The provider for the wrap. :return: The wrap response. """ - url = f"""http://localhost:8000/v1/cdc-developer-platform/token/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/token/{ chain_id}/wrap""" response = requests.post( @@ -122,7 +122,7 @@ def swap_token(chain_id: str, payload: dict) -> ApiResponse: :param provider: The provider for the swap. :return: The swap response. """ - url = f"""http://localhost:8000/v1/cdc-developer-platform/token/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/token/{ chain_id}/swap""" response = requests.post( diff --git a/src/integrations/transaction_api.py b/src/integrations/transaction_api.py index 3af754a..4059816 100644 --- a/src/integrations/transaction_api.py +++ b/src/integrations/transaction_api.py @@ -4,7 +4,7 @@ def get_transactions_by_address(chain_id: str, address: str, session: str, limit: str, api_key: str) -> ApiResponse: - url = f"""http://localhost:8000/v1/cdc-developer-platform/transaction/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/transaction/{ chain_id}/address?address={address}&session={session}&limit={limit}&apiKey={api_key}""" response = requests.get(url, headers={'Content-Type': 'application/json'}) @@ -20,7 +20,7 @@ def get_transactions_by_address(chain_id: str, address: str, session: str, limit def get_transaction_by_hash(chain_id: str, tx_hash: str, api_key: str) -> ApiResponse: - url = f"""http://localhost:8000/v1/cdc-developer-platform/transaction/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/transaction/{ chain_id}/tx-hash?txHash={tx_hash}&apiKey={api_key}""" response = requests.get(url, headers={'Content-Type': 'application/json'}) @@ -36,7 +36,7 @@ def get_transaction_by_hash(chain_id: str, tx_hash: str, api_key: str) -> ApiRes def get_transaction_status(chain_id: str, tx_hash: str, api_key: str) -> ApiResponse: - url = f"""http://localhost:8000/v1/cdc-developer-platform/transaction/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/transaction/{ chain_id}/status?txHash={tx_hash}&apiKey={api_key}""" response = requests.get(url, headers={'Content-Type': 'application/json'}) diff --git a/src/integrations/wallet_api.py b/src/integrations/wallet_api.py index 93266f7..fbcc51e 100644 --- a/src/integrations/wallet_api.py +++ b/src/integrations/wallet_api.py @@ -13,7 +13,7 @@ def create_wallet() -> ApiResponse: :rtype: ApiResponse :raises Exception: If the wallet creation fails or the server responds with an error. """ - url = f"""http://localhost:8000/v1/cdc-developer-platform/wallet""" + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/wallet""" try: response = requests.post( @@ -39,7 +39,7 @@ def get_balance(chain_id: str, address: str, api_key: str) -> ApiResponse: :rtype: ApiResponse :raises Exception: If the fetch request fails or the server responds with an error message. """ - url = f"""http://localhost:8000/v1/cdc-developer-platform/wallet/{ + url = f"""https://developer-platform-api.crypto.com/v1/cdc-developer-platform/wallet/{ chain_id}/balance?address={address}&api_key={api_key}""" try: