Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 143cb5f

Browse files
committed
Implemented nft.transfer
1 parent f4ce3a0 commit 143cb5f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nftlabs/modules/nft.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ def burn(self, token_id: int):
9696
def transfer_from(self, from_address: str, to_address: str, token_id: int):
9797
pass
9898

99+
"""
100+
Transfers NFT from the current signers wallet to another wallet
101+
"""
102+
def transfer(self, to_address: str, token_id: int):
103+
tx = self.__abi_module.safe_transfer_from1.build_transaction(
104+
self.get_signer_address(),
105+
to_address,
106+
token_id,
107+
self.get_transact_opts()
108+
)
109+
self.execute_tx(tx)
110+
99111
def set_royalty_bps(self, amount: int):
100112
tx = self.__abi_module.set_royalty_bps.build_transaction(amount, self.get_transact_opts())
101113
self.execute_tx(tx)

0 commit comments

Comments
 (0)