Skip to content

Commit

Permalink
Merge pull request #4 from crypto-com/NO-JIRA/remove-localhost
Browse files Browse the repository at this point in the history
remove localhost
  • Loading branch information
yeehan-crypto-com authored Oct 21, 2024
2 parents 849d3b5 + e4f535b commit 4b4b3c4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/integrations/block_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/contract_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand Down
10 changes: 5 additions & 5 deletions src/integrations/token_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand All @@ -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}"""

Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions src/integrations/transaction_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand All @@ -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'})
Expand All @@ -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'})
Expand Down
4 changes: 2 additions & 2 deletions src/integrations/wallet_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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:
Expand Down

0 comments on commit 4b4b3c4

Please sign in to comment.