-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
Hey. I'm using the DeployCollectionManager (from the agentipy/tools/use_metaplex.py) to create an NFT. I've noticed several issues:
- The
mint_metaplex_core_nftfunction does not accept if the following parameters (sellerFeeBasisPoints,address,share,recipient) haveNonevalue. However, they haveOptiontype andNonedefault value in the code:
def mint_metaplex_core_nft(
agent: SolanaAgentKit,
collectionMint: str,
name: str,
uri: str,
sellerFeeBasisPoints: Optional[int] = None,
address: Optional[str] = None,
share: Optional[str] = None,
recipient: Optional[str] = None,
) -> Optional[Dict[str, Any]]:If you don't pass it, the API server will return an error:
url
https://api.agentipy.fun/v1/nft/mint
payload
{'requestId': '...', 'encrypted_private_key': '...', 'rpc_url': 'https://api.devnet.solana.com', 'open_api_key': '', 'collectionMint': '...', 'name': '...', 'uri': '...', 'sellerFeeBasisPoints': None, 'address': None, 'share': None, 'recipient': None}
response.json()
{'success': False, 'error': {'issues': [{'code': 'invalid_type', 'expected': 'number', 'received': 'null', 'path': ['sellerFeeBasisPoints'], 'message': 'Expected number, received null'}, {'code': 'invalid_type', 'expected': 'string', 'received': 'null', 'path': ['address'], 'message': 'Expected string, received null'}, {'code': 'invalid_type', 'expected': 'number', 'received': 'null', 'path': ['share'], 'message': 'Expected number, received null'}, {'code': 'invalid_type', 'expected': 'string', 'received': 'null', 'path': ['recipient'], 'message': 'Expected string, received null'}], 'name': 'ZodError'}}v
- The parameter
sharehasstrtype by code, but the server expectsint:
url
https://api.agentipy.fun/v1/nft/mint
payload
{'requestId': '...', 'encrypted_private_key': '...', 'rpc_url': 'https://api.devnet.solana.com', 'open_api_key': '', 'collectionMint': '...', 'name': 'My Nft', 'uri': '...', 'sellerFeeBasisPoints': 1, 'address': '...', 'share': '100', 'recipient': '...'}
response.json()
{'success': False, 'error': {'issues': [{'code': 'invalid_type', 'expected': 'number', 'received': 'string', 'path': ['share'], 'message': 'Expected number, received string'}], 'name': 'ZodError'}}
- The
symbolfield in theurifile is ignored:
{"name": "...", "symbol": "WTF", "image": "...", "seller_fee_basis_points": 0, "description": "...", "external_url": "..."}You can write it, but it won't be used
- The function
deploy_collectioncontains a check:
if not all([name, uri, royalty_basis_points, creator_address]):
raise ValueError("Name, URI, royalty_basis_points, and creator_address are required.")
It will raise an exception if royalty_basis_points==0. Is this the correct behavior?
P.S. if possible, could you please update the versions of the following dependencies: solders, solana, anchorpy
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels