Closed ObiajuluM closed 2 years ago
Hey @ObiajuluM, it seems you're connected to the wrong server :)
There's a dedicated NFT sandbox server at this url: wss://xls20-sandbox.rippletest.net:51233 (I got the link from this tutorial on how to play around with NFT's in the sandbox here: https://xrpl.org/nftoken-tester-tutorial.html)
You'll want to replace the testnet_url
you have with wss://xls20-sandbox.rippletest.net:51233
Additionally you'll have to get credentials for the NFT-Devnet specifically, which you can get by going to this faucet website and clicking "Generate NFT-Devnet Credentials": https://xrpl.org/xrp-testnet-faucet.html
(Then replacing your sender_addr
and wallet_seed
with the values generated)
Hopefully this helps!
You'll want to replace the
testnet_url
you have withwss://xls20-sandbox.rippletest.net:51233
Additionally you'll have to get credentials for the NFT-Devnet specifically, which you can get by going to this faucet website and clicking "Generate NFT-Devnet Credentials": https://xrpl.org/xrp-testnet-faucet.html (Then replacing yoursender_addr
andwallet_seed
with the values generated)
thanks but the devnet faucet returns this error, There was an error with the NFT-Devnet faucet. Please try again.
Oh, thanks for letting me know! I'll let you know when that's fixed :)
Relevant issue: https://github.com/XRPLF/xrpl.js/issues/1895
@ObiajuluM you should be able to generate credentials from the faucet now (The issue @mvadari linked is a feature request to get the faucet wallet in code, but for now the manual method should work :) )
Closing - the issue was that @ObiajuluM connected to the wrong server
hello @JST5000 the error remains😥
@ObiajuluM Huh, I think this might be a new issue with the same symptoms, I'll look into it :)
For reference, and I should have mentioned this earlier, I think the cause last time was not enough validators on the NFT Devnet network agreeing on the ledger. (AKA we had less than quorum) - If you want to check that, you can look at the NFT Devnet explorer here and ensure there are ledgers getting a green checkmark still :) (Since that seems to be working fine now, I think it's a new cause)
@ObiajuluM it should be working now.
Hello, I need help in creating an NFT but I always end up in an error HELP:
Traceback (most recent call last):
File "c:\Users\0xEarl\Desktop\Learn_XRP\apeft.py", line 23, in <module>
wallet_obj = create_WalletObject(sender_addr, wallet_seed)
File "c:\Users\0xEarl\Desktop\Learn_XRP\apeft.py", line 17, in create_WalletObject
response = client.request(acc_info)
File "c:\Users\0xEarl\Desktop\Learn_XRP\venv\lib\site-packages\xrpl\clients\sync_client.py", line 28, in request
return asyncio.run(self.request_impl(request))
File "C:\Users\0xEarl\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\0xEarl\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "c:\Users\0xEarl\Desktop\Learn_XRP\venv\lib\site-packages\xrpl\asyncio\clients\json_rpc_base.py", line 39, in request_impl
return json_to_response(response.json())
File "c:\Users\0xEarl\Desktop\Learn_XRP\venv\lib\site-packages\httpx\_models.py", line 1415, in json
return jsonlib.loads(self.text, **kwargs)
File "C:\Users\0xEarl\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\0xEarl\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\0xEarl\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
code:
from xrpl.models.requests.account_info import AccountInfo
from xrpl.wallet import Wallet
from xrpl.transaction import safe_sign_and_autofill_transaction, send_reliable_submission
from xrpl.clients import JsonRpcClient
from xrpl.models.transactions.nftoken_mint import NFTokenMint
testnet_url = "https://xls20-sandbox.rippletest.net:51233"
client = JsonRpcClient(testnet_url)
sender_addr = "rDAUZJogeeprHnJFzsTz6xz9piXPfUHCgv"
wallet_seed = "key"
def create_WalletObject(wallet_addr: str, wallet_seed: str) -> Wallet:
"""creates a wallet object for signing transactions"""
acc_info = AccountInfo(account=wallet_addr, ledger_index="validated")
response = client.request(acc_info)
result = response.result
sequence = result["account_data"]["Sequence"]
wallet_obj = Wallet(seed=wallet_seed, sequence=sequence)
return wallet_obj
wallet_obj = create_WalletObject(sender_addr, wallet_seed)
my_payment = NFTokenMint(account=sender_addr,
token_taxon=0)
print(my_payment)
signed_tx = safe_sign_and_autofill_transaction(
my_payment,
wallet_obj,
client)
product = send_reliable_submission(signed_tx, client)
max_ledger = signed_tx.last_ledger_sequence
tx_id = signed_tx.get_hash()
print(product.status)
print(product.result)
@ObiajuluM there's a couple things I notice:
To fix that use this JsonRPC url: http://xls20-sandbox.rippletest.net:51234
Hopefully that helps!
thanks @JST5000 you are a true bro 🤜🤛
Closing since it seems things are sorted out now :)
Hello, i am trying to mint an nft, but I keep on getting an error, please help:
code: