Transaction #1065711

Hash 0d1dc20200b3d1ba29903df656f46b24504601ee22a90053afc482d3d8ee9170
Status Success
Timestamp 86 days ago - 9/12/2022, 1:55:13 PM UTC+0
Block 1017163
Stamps Used 203
Burned Fee 0.01201183 TAU
From ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d 
Contract Name submission
Function Name submit_contract

Additional Info
SubBlock Number 0
Nonce 5931
Processor 5b09493df6c18d17cc883ebce54fcb1f5afbd507533417fe32c006009a9c3c4a
Signature 3d84ff0fcd50b25560a7f4eb8fe505705c3cf9d62d2d5445ce83dea747969d60d7fc6ed0962a865639a240f402acbfa9683405713c8a93efe04ed8b1163be402
Stamps Supplied 300
Stamps per TAU 169

Kwargs

code collection_name = Variable() collection_owner = Variable() collection_nfts = Hash(default_value=0) collection_balances = Hash(default_value=0) collection_balances_approvals = Hash(default_value=0) @construct def seed(): collection_name.set("Mazes") collection_owner.set(ctx.caller) @export def mint_nft(name: str, description: str, ipfs_image_url: str, metadata: dict, amount: int): assert name != "", "Name cannot be empty" assert collection_nfts[name] == 0, "Name already exists" assert amount > 0, "You cannot transfer negative amounts" assert collection_owner.get() == ctx.caller, "Only the collection owner can mint NFTs" collection_nfts[name] = {"description": description, "ipfs_image_url": ipfs_image_url, "metadata": metadata, "amount": amount} collection_balances[ctx.caller, name] = amount @export def transfer(name: str, amount:int, to: str): assert amount > 0, "You cannot transfer negative amounts" assert name != "", "Please specify the name of the NFT you want to transfer" assert collection_balances[ctx.caller, name] >= amount, "You dont have enough NFTs to send" collection_balances[ctx.caller, name] -= amount collection_balances[to, name] += amount # Adds amount to receiver @export def approve(amount: int, name: str, to: str): assert amount > 0, "Cannot approve negative amounts" collection_balances_approvals[ctx.caller, to, name] += amount @export def transfer_from(name:str, amount:int, to: str, main_account: str): assert amount > 0, "Cannot send negative balances!" assert collection_balances_approvals[main_account, to, name] >= amount, "Not enough NFTs approved to send! You have {} and are trying to spend {}".format(collection_balances_approvals[main_account, to, name], amount) assert collection_balances[main_account, name] >= amount, "Not enough NFTs to send!" collection_balances_approvals[main_account, to, name] -= amount collection_balances[main_account, name] -= amount collection_balances[to, name] += amount
name con_mazes

State Changes

Contract con_mazes
Variable collection_name
New Value Mazes
 
Contract con_mazes
Variable collection_owner
New Value ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
 
Contract con_mazes
Variable __code__
New Value __collection_name = Variable(contract='con_mazes', name='collection_name') __collection_owner = Variable(contract='con_mazes', name='collection_owner') __collection_nfts = Hash(default_value=0, contract='con_mazes', name= 'collection_nfts') __collection_balances = Hash(default_value=0, contract='con_mazes', name= 'collection_balances') __collection_balances_approvals = Hash(default_value=0, contract= 'con_mazes', name='collection_balances_approvals') def ____(): __collection_name.set('Mazes') __collection_owner.set(ctx.caller) @__export('con_mazes') def mint_nft(name: str, description: str, ipfs_image_url: str, metadata: dict, amount: int): assert name != '', 'Name cannot be empty' assert __collection_nfts[name] == 0, 'Name already exists' assert amount > 0, 'You cannot transfer negative amounts' assert __collection_owner.get( ) == ctx.caller, 'Only the collection owner can mint NFTs' __collection_nfts[name] = {'description': description, 'ipfs_image_url': ipfs_image_url, 'metadata': metadata, 'amount': amount} __collection_balances[ctx.caller, name] = amount @__export('con_mazes') def transfer(name: str, amount: int, to: str): assert amount > 0, 'You cannot transfer negative amounts' assert name != '', 'Please specify the name of the NFT you want to transfer' assert __collection_balances[ctx.caller, name ] >= amount, 'You dont have enough NFTs to send' __collection_balances[ctx.caller, name] -= amount __collection_balances[to, name] += amount @__export('con_mazes') def approve(amount: int, name: str, to: str): assert amount > 0, 'Cannot approve negative amounts' __collection_balances_approvals[ctx.caller, to, name] += amount @__export('con_mazes') def transfer_from(name: str, amount: int, to: str, main_account: str): assert amount > 0, 'Cannot send negative balances!' assert __collection_balances_approvals[main_account, to, name ] >= amount, 'Not enough NFTs approved to send! You have {} and are trying to spend {}'.format( __collection_balances_approvals[main_account, to, name], amount) assert __collection_balances[main_account, name ] >= amount, 'Not enough NFTs to send!' __collection_balances_approvals[main_account, to, name] -= amount __collection_balances[main_account, name] -= amount __collection_balances[to, name] += amount
 
Contract con_mazes
Variable __compiled__
New Value e3000000000000000000000000070000004000000073bc00000065006400640164028d025a0165006400640364028d025a02650364046400640564068d035a04650364046400640764068d035a05650364046400640864068d035a066409640a84005a07650864008301650965096509650a650b640b9c05640c640d840483015a0c6508640083016509650b6509640e9c03640f6410840483015a0d650864008301650b6509650964119c0364126413840483015a0e6508640083016509650b6509650964149c0464156416840483015a0f641753002918da09636f6e5f6d617a6573da0f636f6c6c656374696f6e5f6e616d652902da08636f6e7472616374da046e616d65da10636f6c6c656374696f6e5f6f776e6572e900000000da0f636f6c6c656374696f6e5f6e6674732903da0d64656661756c745f76616c756572030000007204000000da13636f6c6c656374696f6e5f62616c616e636573da1d636f6c6c656374696f6e5f62616c616e6365735f617070726f76616c73630000000000000000000000000200000043000000731a00000074006a0164018301010074026a0174036a04830101006400530029024eda054d617a65732905da115f5f636f6c6c656374696f6e5f6e616d65da03736574da125f5f636f6c6c656374696f6e5f6f776e6572da03637478da0663616c6c6572a90072110000007211000000da00da045f5f5f5f0b000000730400000000010a01721300000029057204000000da0b6465736372697074696f6eda0e697066735f696d6167655f75726cda086d65746164617461da06616d6f756e74630500000000000000050000000500000043000000736e0000007c0064016b037310740064028301820174017c00190064036b02732474006404830182017c0464036b047334740064058301820174026a03830074046a056b02734a74006406830182017c017c027c037c0464079c0474017c003c007c04740674046a057c0066023c006400530029084e72120000007a144e616d652063616e6e6f7420626520656d70747972060000007a134e616d6520616c7265616479206578697374737a24596f752063616e6e6f74207472616e73666572206e6567617469766520616d6f756e74737a274f6e6c792074686520636f6c6c656374696f6e206f776e65722063616e206d696e74204e465473290472140000007215000000721600000072170000002907da0e417373657274696f6e4572726f72da115f5f636f6c6c656374696f6e5f6e667473720e000000da03676574720f0000007210000000da155f5f636f6c6c656374696f6e5f62616c616e636573290572040000007214000000721500000072160000007217000000721100000072110000007212000000da086d696e745f6e667410000000731000000000031001140110010601100102011001721c000000290372040000007217000000da02746f63030000000000000003000000040000004300000073680000007c0164016b04731074006402830182017c0064036b0373207400640483018201740174026a037c00660219007c016b05733a7400640583018201740174026a037c006602050019007c01380003003c0074017c027c006602050019007c01370003003c006400530029064e72060000007a24596f752063616e6e6f74207472616e73666572206e6567617469766520616d6f756e747372120000007a37506c65617365207370656369667920746865206e616d65206f6620746865204e465420796f752077616e7420746f207472616e736665727a21596f7520646f6e74206861766520656e6f756768204e46547320746f2073656e6429047218000000721b000000720f0000007210000000290372040000007217000000721d000000721100000072110000007212000000da087472616e736665721d000000730c0000000002100110010c010e011601721e000000290372170000007204000000721d000000630300000000000000030000000400000043000000732c0000007c0064016b0473107400640283018201740174026a037c027c016603050019007c00370003003c006400530029034e72060000007a1f43616e6e6f7420617070726f7665206e6567617469766520616d6f756e747329047218000000da1f5f5f636f6c6c656374696f6e5f62616c616e6365735f617070726f76616c73720f0000007210000000290372170000007204000000721d000000721100000072110000007212000000da07617070726f7665270000007304000000000210017220000000290472040000007217000000721d000000da0c6d61696e5f6163636f756e7463040000000000000004000000060000004300000073960000007c0164016b047310740064028301820174017c037c027c00660319007c016b05733c740064036a0274017c037c027c00660319007c0183028301820174037c037c00660219007c016b057354740064048301820174017c037c027c006603050019007c01380003003c0074037c037c006602050019007c01380003003c0074037c027c006602050019007c01370003003c006400530029054e72060000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a484e6f7420656e6f756768204e46547320617070726f76656420746f2073656e642120596f752068617665207b7d20616e642061726520747279696e6720746f207370656e64207b7d7a184e6f7420656e6f756768204e46547320746f2073656e642129047218000000721f000000da06666f726d6174721b000000290472040000007217000000721d0000007221000000721100000072110000007212000000da0d7472616e736665725f66726f6d2d0000007312000000000210010c010c0114010a010e011601140172230000004e2910da085661726961626c65720c000000720e000000da04486173687219000000721b000000721f0000007213000000da085f5f6578706f7274da03737472da0464696374da03696e74721c000000721e000000722000000072230000007211000000721100000072110000007212000000da083c6d6f64756c653e0100000073220000000c010c01060108010601080104010a03080506010601120b06011409060114050601
 
Contract con_mazes
Variable __owner__
New Value null
 
Contract con_mazes
Variable __submitted__
New Value 2022,9,12,13,55,14,0
 
Contract con_mazes
Variable __developer__
New Value ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
 
Contract currency
Variable balances
Key ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
New Value 191841.668884963300046481709627522796