mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
Update param order for autofill_and_sign and sign_and_submit
This commit is contained in:
@@ -131,7 +131,7 @@ class XRPLMonitorThread(Thread):
|
|||||||
# send too many transactions too fast. You can send transactions more
|
# send too many transactions too fast. You can send transactions more
|
||||||
# rapidly if you track the sequence number more carefully.
|
# rapidly if you track the sequence number more carefully.
|
||||||
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
||||||
tx, self.wallet, self.client)
|
tx, self.client, self.wallet)
|
||||||
await xrpl.asyncio.transaction.submit(tx_signed, self.client)
|
await xrpl.asyncio.transaction.submit(tx_signed, self.client)
|
||||||
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class XRPLMonitorThread(Thread):
|
|||||||
# send too many transactions too fast. You can send transactions more
|
# send too many transactions too fast. You can send transactions more
|
||||||
# rapidly if you track the sequence number more carefully.
|
# rapidly if you track the sequence number more carefully.
|
||||||
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
||||||
tx, self.wallet, self.client)
|
tx, self.client, self.wallet)
|
||||||
await xrpl.asyncio.transaction.submit(tx_signed, self.client)
|
await xrpl.asyncio.transaction.submit(tx_signed, self.client)
|
||||||
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
||||||
|
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ class XRPLMonitorThread(Thread):
|
|||||||
# send too many transactions too fast. You can send transactions more
|
# send too many transactions too fast. You can send transactions more
|
||||||
# rapidly if you track the sequence number more carefully.
|
# rapidly if you track the sequence number more carefully.
|
||||||
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
||||||
tx, self.wallet, self.client)
|
tx, self.client, self.wallet)
|
||||||
await xrpl.asyncio.transaction.submit(tx_signed, self.client)
|
await xrpl.asyncio.transaction.submit(tx_signed, self.client)
|
||||||
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
||||||
|
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ class XRPLMonitorThread(Thread):
|
|||||||
# send too many transactions too fast. You can send transactions more
|
# send too many transactions too fast. You can send transactions more
|
||||||
# rapidly if you track the sequence number more carefully.
|
# rapidly if you track the sequence number more carefully.
|
||||||
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
||||||
tx, self.wallet, self.client)
|
tx, self.client, self.wallet)
|
||||||
await xrpl.asyncio.transaction.submit(tx_signed, self.client)
|
await xrpl.asyncio.transaction.submit(tx_signed, self.client)
|
||||||
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ signer_list_set_tx = SignerListSet(
|
|||||||
signer_quorum=2,
|
signer_quorum=2,
|
||||||
signer_entries=signer_entries,
|
signer_entries=signer_entries,
|
||||||
)
|
)
|
||||||
signed_signer_list_set_tx = autofill_and_sign(signer_list_set_tx, master_wallet, client)
|
signed_signer_list_set_tx = autofill_and_sign(signer_list_set_tx, client, master_wallet)
|
||||||
|
|
||||||
print("Constructed SignerListSet and submitting it to the ledger...")
|
print("Constructed SignerListSet and submitting it to the ledger...")
|
||||||
signed_list_set_tx_response = submit_and_wait(
|
signed_list_set_tx_response = submit_and_wait(
|
||||||
|
|||||||
@@ -47,4 +47,4 @@ payment_tx = Payment(
|
|||||||
paths=paths,
|
paths=paths,
|
||||||
)
|
)
|
||||||
|
|
||||||
print("signed: ", autofill_and_sign(payment_tx, wallet, client))
|
print("signed: ", autofill_and_sign(payment_tx, client, wallet))
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ async def main() -> int:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Sign and autofill the transaction (ready to submit)
|
# Sign and autofill the transaction (ready to submit)
|
||||||
signed_tx = await autofill_and_sign(tx, wallet, client)
|
signed_tx = await autofill_and_sign(tx, client, wallet)
|
||||||
print("Transaction hash:", signed_tx.get_hash())
|
print("Transaction hash:", signed_tx.get_hash())
|
||||||
|
|
||||||
# Submit the transaction and wait for response (validated or rejected)
|
# Submit the transaction and wait for response (validated or rejected)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ payment_tx = Payment(
|
|||||||
|
|
||||||
# Sign the transaction
|
# Sign the transaction
|
||||||
print("Submitting a payment transaction with our memo...")
|
print("Submitting a payment transaction with our memo...")
|
||||||
payment_tx_signed = autofill_and_sign(payment_tx, wallet=test_wallet, client=client)
|
payment_tx_signed = autofill_and_sign(payment_tx, client=client, wallet=test_wallet)
|
||||||
print(f"\n Encoded Transaction MEMO: {payment_tx_signed.memos}")
|
print(f"\n Encoded Transaction MEMO: {payment_tx_signed.memos}")
|
||||||
|
|
||||||
# Send the transaction to the node
|
# Send the transaction to the node
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ print("Payment object:", my_payment)
|
|||||||
|
|
||||||
# Sign transaction -------------------------------------------------------------
|
# Sign transaction -------------------------------------------------------------
|
||||||
signed_tx = xrpl.transaction.autofill_and_sign(
|
signed_tx = xrpl.transaction.autofill_and_sign(
|
||||||
my_payment, test_wallet, client)
|
my_payment, client, test_wallet)
|
||||||
max_ledger = signed_tx.last_ledger_sequence
|
max_ledger = signed_tx.last_ledger_sequence
|
||||||
tx_id = signed_tx.get_hash()
|
tx_id = signed_tx.get_hash()
|
||||||
print("Signed transaction:", signed_tx)
|
print("Signed transaction:", signed_tx)
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ async def main() -> int:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Sign and autofill the transaction (ready to submit)
|
# Sign and autofill the transaction (ready to submit)
|
||||||
signed_tx = await autofill_and_sign(tx, wallet, client)
|
signed_tx = await autofill_and_sign(tx, client, wallet)
|
||||||
print("Transaction:", signed_tx)
|
print("Transaction:", signed_tx)
|
||||||
|
|
||||||
# Submit the transaction and wait for response (validated or rejected)
|
# Submit the transaction and wait for response (validated or rejected)
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ tx_set_signer_list = SignerListSet(
|
|||||||
|
|
||||||
# Sign transaction locally and submit
|
# Sign transaction locally and submit
|
||||||
print("Submitting a SignerListSet transaction to update our account to use our new Signers...")
|
print("Submitting a SignerListSet transaction to update our account to use our new Signers...")
|
||||||
tx_set_signer_list_signed = sign_and_submit(transaction=tx_set_signer_list, wallet=test_wallet, client=client)
|
tx_set_signer_list_signed = sign_and_submit(transaction=tx_set_signer_list, client=client, wallet=test_wallet)
|
||||||
|
|
||||||
# Construct a TicketCreate transaction, 3 tickets will be created
|
# Construct a TicketCreate transaction, 3 tickets will be created
|
||||||
tx_create_ticket = TicketCreate(
|
tx_create_ticket = TicketCreate(
|
||||||
@@ -65,7 +65,7 @@ tx_create_ticket = TicketCreate(
|
|||||||
|
|
||||||
# Sign transaction locally and submit
|
# Sign transaction locally and submit
|
||||||
print("Submitting a TicketCreate transaction to get Ticket Sequences for future transactions...")
|
print("Submitting a TicketCreate transaction to get Ticket Sequences for future transactions...")
|
||||||
tx_create_ticket_signed = sign_and_submit(transaction=tx_create_ticket, wallet=test_wallet, client=client)
|
tx_create_ticket_signed = sign_and_submit(transaction=tx_create_ticket, client=client, wallet=test_wallet)
|
||||||
|
|
||||||
# Get a Ticket Sequence
|
# Get a Ticket Sequence
|
||||||
get_ticket_sequence = client.request(AccountObjects(
|
get_ticket_sequence = client.request(AccountObjects(
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ tx = TicketCreate(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Sign transaction locally and submit
|
# Sign transaction locally and submit
|
||||||
my_tx_payment_signed = sign_and_submit(transaction=tx, wallet=test_wallet, client=client)
|
my_tx_payment_signed = sign_and_submit(transaction=tx, client=client, wallet=test_wallet)
|
||||||
|
|
||||||
# Get a Ticket Sequence
|
# Get a Ticket Sequence
|
||||||
get_ticket_sequence = AccountObjects(
|
get_ticket_sequence = AccountObjects(
|
||||||
|
|||||||
Reference in New Issue
Block a user