Last active
November 29, 2023 19:09
-
-
Save anildukkipatty/6107b980fe73bd8fa48349531462724e to your computer and use it in GitHub Desktop.
Tezos SmartPy sample contract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smartpy as sp | |
FA2 = sp.io.import_script_from_url("https://smartpy.io/templates/fa2_lib.py") | |
class TezDynamicNft(FA2.Fa2Nft): | |
@sp.entry_point | |
def mint(self, owner, token_info): | |
token_id = self.data.last_token_id | |
self.data.ledger[token_id] = owner | |
self.data.token_metadata[token_id] = sp.record(token_id=token_id, token_info=token_info) | |
self.data.last_token_id += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment