Skip to content

Conversation

@Mameta29
Copy link
Collaborator

@Mameta29 Mameta29 commented Apr 3, 2025

🎨 Overview
Implementation of a Python SDK for interacting with JPYC tokens. This SDK provides interfaces to interact with JPYCv2 smart contracts across multiple chains including Ethereum, Polygon, Avalanche, and Astar.
🌈 Details

SDK implementation compatible with Python 3.11 and above
Smart contract integration using web3.py
Support for multiple chains (Ethereum, Polygon, Gnosis, Avalanche, Astar, Shiden, etc.)
Implementation of all API endpoints for JWT authentication and token operations
Unit test implementation and documentation generation
GitHub workflow configuration

📚 References

JPYCv2 Contracts
ERC-20 Specification
RetryClaude does not have internet access. Links provided may not be accurate or up to date.Claude can make mistakes. Please double-check responses.

@Mameta29 Mameta29 self-assigned this Apr 3, 2025
@SeiyaKobayashi
Copy link
Collaborator

@Mameta29
セルフレビュー & CI が通り次第みます!

Copy link
Collaborator Author

@Mameta29 Mameta29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

セルフレビュー

Returns:
HexBytes: トランザクションハッシュ
"""
...
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

日本語のコメントが混ざっているので英語で統一する

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントが日本語になっているので英語 or 削除

"""
return await asyncio.to_thread(func)

async def _execute_transaction(self, contract_fn: ContractFunction) -> HexBytes:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

エラーハンドリングの部分で、具体的なエラータイプを追加したほうがよいか。例えば InsufficientFundsError や GasLimitExceededError など。

self.web3 = get_web3_for_chain(chain_name, network_name, rpc_endpoint)
self.account = None

def create_private_key_account(self, private_key: Optional[str] = None) -> Optional[LocalAccount]:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらは常にLocalAccountを返すので、戻り値の型をOptional[LocalAccount]ではなく単にLocalAccountにする

@@ -0,0 +1,65 @@
[tool.poetry]
name = "jpyc-sdk-python"
version = "1.0.0"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このバージョンの書き方はnode sdkにならっている

@SeiyaKobayashi
Copy link
Collaborator

一旦こちらの PR は閉じさせていただきます 🙇🏻

@SeiyaKobayashi SeiyaKobayashi deleted the develop branch May 22, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants