mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-27 23:25:51 +00:00
Use autofill_and_sign as new name
This commit is contained in:
@@ -130,7 +130,7 @@ class XRPLMonitorThread(Thread):
|
||||
# Autofill provides a sequence number, but this may fail if you try to
|
||||
# send too many transactions too fast. You can send transactions more
|
||||
# rapidly if you track the sequence number more carefully.
|
||||
tx_signed = await xrpl.asyncio.transaction.safe_sign_and_autofill_transaction(
|
||||
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
||||
tx, self.wallet, self.client)
|
||||
await xrpl.asyncio.transaction.submit_transaction(tx_signed, self.client)
|
||||
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
||||
|
||||
@@ -184,7 +184,7 @@ class XRPLMonitorThread(Thread):
|
||||
# Autofill provides a sequence number, but this may fail if you try to
|
||||
# send too many transactions too fast. You can send transactions more
|
||||
# rapidly if you track the sequence number more carefully.
|
||||
tx_signed = await xrpl.asyncio.transaction.safe_sign_and_autofill_transaction(
|
||||
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
||||
tx, self.wallet, self.client)
|
||||
await xrpl.asyncio.transaction.submit_transaction(tx_signed, self.client)
|
||||
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
||||
|
||||
@@ -202,7 +202,7 @@ class XRPLMonitorThread(Thread):
|
||||
# Autofill provides a sequence number, but this may fail if you try to
|
||||
# send too many transactions too fast. You can send transactions more
|
||||
# rapidly if you track the sequence number more carefully.
|
||||
tx_signed = await xrpl.asyncio.transaction.safe_sign_and_autofill_transaction(
|
||||
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
||||
tx, self.wallet, self.client)
|
||||
await xrpl.asyncio.transaction.submit_transaction(tx_signed, self.client)
|
||||
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
||||
|
||||
@@ -220,7 +220,7 @@ class XRPLMonitorThread(Thread):
|
||||
# Autofill provides a sequence number, but this may fail if you try to
|
||||
# send too many transactions too fast. You can send transactions more
|
||||
# rapidly if you track the sequence number more carefully.
|
||||
tx_signed = await xrpl.asyncio.transaction.safe_sign_and_autofill_transaction(
|
||||
tx_signed = await xrpl.asyncio.transaction.autofill_and_sign(
|
||||
tx, self.wallet, self.client)
|
||||
await xrpl.asyncio.transaction.submit_transaction(tx_signed, self.client)
|
||||
wx.CallAfter(self.gui.add_pending_tx, tx_signed)
|
||||
|
||||
@@ -2,7 +2,7 @@ import asyncio
|
||||
|
||||
from xrpl.asyncio.clients import AsyncWebsocketClient
|
||||
from xrpl.asyncio.transaction import (
|
||||
safe_sign_and_autofill_transaction,
|
||||
autofill_and_sign,
|
||||
submit_and_wait,
|
||||
)
|
||||
from xrpl.asyncio.wallet import generate_faucet_wallet
|
||||
@@ -27,7 +27,7 @@ async def main() -> int:
|
||||
)
|
||||
|
||||
# Sign and autofill the transaction (ready to submit)
|
||||
signed_tx = await safe_sign_and_autofill_transaction(tx, wallet, client)
|
||||
signed_tx = await autofill_and_sign(tx, wallet, client)
|
||||
print("Transaction hash:", signed_tx.get_hash())
|
||||
|
||||
# Submit the transaction and wait for response (validated or rejected)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from xrpl.clients import JsonRpcClient
|
||||
from xrpl.models.transactions import Payment, Memo
|
||||
from xrpl.transaction import safe_sign_and_autofill_transaction, submit_and_wait
|
||||
from xrpl.transaction import autofill_and_sign, submit_and_wait
|
||||
from xrpl.wallet import generate_faucet_wallet
|
||||
|
||||
# This code sample validates and sends a transaction with a Memo attached
|
||||
@@ -42,7 +42,7 @@ payment_tx = Payment(
|
||||
|
||||
# Sign the transaction
|
||||
print("Submitting a payment transaction with our memo...")
|
||||
payment_tx_signed = safe_sign_and_autofill_transaction(payment_tx, wallet=test_wallet, client=client)
|
||||
payment_tx_signed = autofill_and_sign(payment_tx, wallet=test_wallet, client=client)
|
||||
print(f"\n Encoded Transaction MEMO: {payment_tx_signed.memos}")
|
||||
|
||||
# Send the transaction to the node
|
||||
|
||||
@@ -24,7 +24,7 @@ my_payment = xrpl.models.transactions.Payment(
|
||||
print("Payment object:", my_payment)
|
||||
|
||||
# Sign transaction -------------------------------------------------------------
|
||||
signed_tx = xrpl.transaction.safe_sign_and_autofill_transaction(
|
||||
signed_tx = xrpl.transaction.autofill_and_sign(
|
||||
my_payment, test_wallet, client)
|
||||
max_ledger = signed_tx.last_ledger_sequence
|
||||
tx_id = signed_tx.get_hash()
|
||||
|
||||
@@ -4,7 +4,7 @@ from decimal import Decimal
|
||||
|
||||
from xrpl.asyncio.clients import AsyncWebsocketClient
|
||||
from xrpl.asyncio.transaction import (
|
||||
safe_sign_and_autofill_transaction,
|
||||
autofill_and_sign,
|
||||
submit_and_wait,
|
||||
)
|
||||
from xrpl.asyncio.wallet import generate_faucet_wallet
|
||||
@@ -170,7 +170,7 @@ async def main() -> int:
|
||||
)
|
||||
|
||||
# Sign and autofill the transaction (ready to submit)
|
||||
signed_tx = await safe_sign_and_autofill_transaction(tx, wallet, client)
|
||||
signed_tx = await autofill_and_sign(tx, wallet, client)
|
||||
print("Transaction:", signed_tx)
|
||||
|
||||
# Submit the transaction and wait for response (validated or rejected)
|
||||
|
||||
Reference in New Issue
Block a user