python-api icon indicating copy to clipboard operation
python-api copied to clipboard

Deploy not working

Open gweinz opened this issue 4 years ago • 5 comments

It appears the deploy function is no longer working as the test_api.py is failing and returning a 400 status response on deploy calls. anyone have a fix to this or as to why it might be happening?

gweinz avatar Nov 02 '21 06:11 gweinz

can you provide your code? which solana-py version are you using?

crypt0miester avatar Nov 04 '21 04:11 crypt0miester

i actually used your fork. let me bring it up!

im just trying to even generate an account and airdrop and none of it works. not sure what else to do. the client returns None for value when i print too.

`import base58 import json import os from api import metaplex_api from cryptography.fernet import Fernet from solana.keypair import Keypair from solana.rpc.api import Client

account = Keypair()

cfg = {"PRIVATE_KEY": base58.b58encode(account.secret_key).decode("ascii"), "PUBLIC_KEY": str(account.public_key), "DECRYPTION_KEY": Fernet.generate_key().decode("ascii")} api_endpoint = "https://api.devnet.solana.com/" Client(api_endpoint).request_airdrop(account.public_key, int(1e10)) print(Client(api_endpoint).get_account_info(account.public_key)) api = metaplex_api.MetaplexAPI(cfg)

result = api.api_deploy(api_endpoint, "A"*32, "A"*10) print(result)`

gweinz avatar Nov 04 '21 17:11 gweinz

@crypt0miester any help would be great

gweinz avatar Nov 04 '21 17:11 gweinz

try changing secret_key to seed in account keypair.

sorry I am on mobile. @gweinz

crypt0miester avatar Nov 05 '21 03:11 crypt0miester

checkout the latest pr readme btw. try the code from there.

crypt0miester avatar Nov 05 '21 03:11 crypt0miester