From 965d8c20a2206870acb2b9a667e9d4783173f2d7 Mon Sep 17 00:00:00 2001 From: JST5000 Date: Thu, 8 Jun 2023 15:43:39 -0700 Subject: [PATCH] Change to AccountSetAsfFlag for enum --- content/_code-samples/delete-account/py/blackhole-account.py | 4 ++-- content/_code-samples/freeze/py/enable_no_freeze.py | 4 ++-- content/_code-samples/freeze/py/set_global_freeze.py | 4 ++-- content/_code-samples/issue-a-token/py/issue-a-token.py | 4 ++-- .../_code-samples/non-fungible-token/py/authorize-minter.py | 4 ++-- content/_code-samples/non-fungible-token/py/nft-general.py | 4 ++-- .../require-destination-tags/py/require-destination-tags.py | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/content/_code-samples/delete-account/py/blackhole-account.py b/content/_code-samples/delete-account/py/blackhole-account.py index 91c9472b94..ad75bacf4c 100644 --- a/content/_code-samples/delete-account/py/blackhole-account.py +++ b/content/_code-samples/delete-account/py/blackhole-account.py @@ -1,5 +1,5 @@ from xrpl.clients import JsonRpcClient -from xrpl.models.transactions import AccountSet, SetRegularKey, AccountSetFlag +from xrpl.models.transactions import AccountSet, SetRegularKey, AccountSetAsfFlag from xrpl.transaction import submit_and_wait from xrpl.wallet import generate_faucet_wallet from xrpl.models.requests import AccountInfo @@ -41,7 +41,7 @@ print(f" Tx content: {submit_tx_regular}") # This permanently blackholes an account! tx_disable_master_key = AccountSet( account=myAddr, - set_flag=AccountSetFlag.ASF_DISABLE_MASTER + set_flag=AccountSetAsfFlag.ASF_DISABLE_MASTER ) # Sign and submit the transaction diff --git a/content/_code-samples/freeze/py/enable_no_freeze.py b/content/_code-samples/freeze/py/enable_no_freeze.py index f642bfad36..44b5de626d 100644 --- a/content/_code-samples/freeze/py/enable_no_freeze.py +++ b/content/_code-samples/freeze/py/enable_no_freeze.py @@ -1,5 +1,5 @@ from xrpl.clients import JsonRpcClient -from xrpl.models import AccountSet, AccountSetFlag +from xrpl.models import AccountSet, AccountSetAsfFlag from xrpl.transaction import submit_and_wait from xrpl.wallet import generate_faucet_wallet @@ -12,7 +12,7 @@ sender_wallet = generate_faucet_wallet(client=client) print("Successfully generated test wallet") # build accountset transaction to disable freezing -accountset = AccountSet(account=sender_wallet.address, set_flag=AccountSetFlag.ASF_NO_FREEZE) +accountset = AccountSet(account=sender_wallet.address, set_flag=AccountSetAsfFlag.ASF_NO_FREEZE) print("Now sending an AccountSet transaction to set the ASF_NO_FREEZE flag...") diff --git a/content/_code-samples/freeze/py/set_global_freeze.py b/content/_code-samples/freeze/py/set_global_freeze.py index 892d38f064..7150db4908 100644 --- a/content/_code-samples/freeze/py/set_global_freeze.py +++ b/content/_code-samples/freeze/py/set_global_freeze.py @@ -1,5 +1,5 @@ from xrpl.clients import JsonRpcClient -from xrpl.models import AccountSet, AccountSetFlag +from xrpl.models import AccountSet, AccountSetAsfFlag from xrpl.transaction import submit_and_wait from xrpl.wallet import generate_faucet_wallet @@ -12,7 +12,7 @@ print("Successfully generated test wallet") # Build accountset transaction to enable global freeze accountset = AccountSet(account=sender_wallet.address, - set_flag=AccountSetFlag.ASF_GLOBAL_FREEZE) + set_flag=AccountSetAsfFlag.ASF_GLOBAL_FREEZE) print("Preparing and submitting Account set transaction with ASF_GLOBAL_FREEZE ...") diff --git a/content/_code-samples/issue-a-token/py/issue-a-token.py b/content/_code-samples/issue-a-token/py/issue-a-token.py index b74974bc7c..61ac109126 100644 --- a/content/_code-samples/issue-a-token/py/issue-a-token.py +++ b/content/_code-samples/issue-a-token/py/issue-a-token.py @@ -23,7 +23,7 @@ cold_settings_tx = xrpl.models.transactions.AccountSet( transfer_rate=0, tick_size=5, domain=bytes.hex("example.com".encode("ASCII")), - set_flag=xrpl.models.transactions.AccountSetFlag.ASF_DEFAULT_RIPPLE, + set_flag=xrpl.models.transactions.AccountSetAsfFlag.ASF_DEFAULT_RIPPLE, ) print("Sending cold address AccountSet transaction...") @@ -34,7 +34,7 @@ print(response) # Configure hot address settings ----------------------------------------------- hot_settings_tx = xrpl.models.transactions.AccountSet( account=hot_wallet.address, - set_flag=xrpl.models.transactions.AccountSetFlag.ASF_REQUIRE_AUTH, + set_flag=xrpl.models.transactions.AccountSetAsfFlag.ASF_REQUIRE_AUTH, ) print("Sending hot address AccountSet transaction...") diff --git a/content/_code-samples/non-fungible-token/py/authorize-minter.py b/content/_code-samples/non-fungible-token/py/authorize-minter.py index 830f0cec0a..879131866d 100644 --- a/content/_code-samples/non-fungible-token/py/authorize-minter.py +++ b/content/_code-samples/non-fungible-token/py/authorize-minter.py @@ -1,6 +1,6 @@ from xrpl.transaction import submit_and_wait from xrpl.models.transactions.nftoken_mint import NFTokenMint, NFTokenMintFlag -from xrpl.models.transactions.account_set import AccountSet, AccountSetFlag +from xrpl.models.transactions.account_set import AccountSet, AccountSetAsfFlag from xrpl.wallet import generate_faucet_wallet from xrpl.models.requests import AccountNFTs from xrpl.clients import JsonRpcClient @@ -40,7 +40,7 @@ print(f" Seed: {nftoken_minter_wallet.seed}") print(f"\nAuthorizing account {minterAddr} as a NFT minter on account {issuerAddr}...") authorize_minter_tx = AccountSet( account=issuerAddr, - set_flag=AccountSetFlag.ASF_AUTHORIZED_NFTOKEN_MINTER, + set_flag=AccountSetAsfFlag.ASF_AUTHORIZED_NFTOKEN_MINTER, nftoken_minter=minterAddr ) diff --git a/content/_code-samples/non-fungible-token/py/nft-general.py b/content/_code-samples/non-fungible-token/py/nft-general.py index aabbaf55a8..f3824e07e1 100644 --- a/content/_code-samples/non-fungible-token/py/nft-general.py +++ b/content/_code-samples/non-fungible-token/py/nft-general.py @@ -3,7 +3,7 @@ from xrpl.transaction import submit_and_wait from xrpl.models.transactions.nftoken_mint import NFTokenMint, NFTokenMintFlag from xrpl.models.transactions.nftoken_accept_offer import NFTokenAcceptOffer from xrpl.models.transactions.nftoken_cancel_offer import NFTokenCancelOffer -from xrpl.models.transactions.account_set import AccountSet, AccountSetFlag +from xrpl.models.transactions.account_set import AccountSet, AccountSetAsfFlag from xrpl.models.transactions.nftoken_burn import NFTokenBurn from xrpl.wallet import generate_faucet_wallet from xrpl.models.requests import AccountNFTs @@ -94,7 +94,7 @@ else: print(f"\n - Authorizing account {minterAddr} as a NFT minter on account {issuerAddr}...") authorize_minter_tx = AccountSet( account=issuerAddr, - set_flag=AccountSetFlag.ASF_AUTHORIZED_NFTOKEN_MINTER, + set_flag=AccountSetAsfFlag.ASF_AUTHORIZED_NFTOKEN_MINTER, nftoken_minter=minterAddr ) diff --git a/content/_code-samples/require-destination-tags/py/require-destination-tags.py b/content/_code-samples/require-destination-tags/py/require-destination-tags.py index 46b22981be..f66399de45 100644 --- a/content/_code-samples/require-destination-tags/py/require-destination-tags.py +++ b/content/_code-samples/require-destination-tags/py/require-destination-tags.py @@ -9,7 +9,7 @@ from xrpl.asyncio.wallet import generate_faucet_wallet from xrpl.models.requests import AccountInfo from xrpl.models.transactions import ( AccountSet, - AccountSetFlag, + AccountSetAsfFlag, ) @@ -23,7 +23,7 @@ async def main() -> int: # Send AccountSet transaction ----------------------------------------------- tx = AccountSet( account=wallet.address, - set_flag=AccountSetFlag.ASF_REQUIRE_DEST, + set_flag=AccountSetAsfFlag.ASF_REQUIRE_DEST, ) # Sign and autofill the transaction (ready to submit)