Transaction #11278

Hash cc6e690d9ad1d10afc1534f111ece88f1b03f76fb24da7b15753ac1110448f42
Status Success
Timestamp 390 days ago - 3/26/2023, 2:07:40 AM UTC+0
Block 11278
Stamps Used 343
Burned Fee 0.02029586 TAU
From 49aceeabdccdcb39f8c2c112e110ead1a5fef22c644825c1917b2df3204c433f 
Contract Name submission
Function Name submit_contract

Additional Info
Nonce 16
Processor 11185fe3c6e68d11f89929e2f531de3fb640771de1aee32c606c30c70b6600d2
Signature dbcacfe77cabd862d0e9a63d6a2408128c54c8c5e47e4ecf72d080cdb1a6f0a7713f674e748e26f1e665ea977b8f4ee1d1b59e6731c8c6a3916d2f626ef3b308
Stamps Supplied 500
Stamps per TAU 169

Kwargs

code I = importlib 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("Shit The Lamden CEO Says...") 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 or ctx.caller == "con_nftdrop", "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 @export def setup_redeem(name: str, redeem_type: str, redeem_contract: str, redeem_amount: float): assert collection_owner.get() == ctx.caller, "You are not the collection creator" assert collection_nfts[name] != 0, f"NFT {name} doesnt exist" assert redeem_type.lower() in ["lp", "token"], "Only redeem types lp and token supported" nft_data = collection_nfts[name] assert "redeem_type" not in nft_data, "NFT is already redeemable!" nft_data["redeem_type"] = redeem_type.lower() nft_data["redeem_contract"] = redeem_contract nft_data["redeem_amount"] = redeem_amount collection_nfts[name] = nft_data # Transfer token if redeem_type.lower() == "token": I.import_module(redeem_contract).transfer_from( amount=redeem_amount, to=ctx.this, main_account=ctx.caller) # Transfer LP elif redeem_type.lower() == "lp": I.import_module("con_rocketswap_official_v1_1").transfer_liquidity_from( contract=redeem_contract, amount=redeem_amount, to=ctx.this, main_account=ctx.caller) @export def redeem(name: str): assert collection_nfts[name] != 0, f"NFT {name} doesnt exist" nft_data = collection_nfts[name] assert "redeem_type" in nft_data, "NFT is not redeemable!" # Get redeem amount for one NFT redeem_amount = nft_data["redeem_amount"] nft_amount = nft_data["amount"] amount = redeem_amount / nft_amount # Transfer redeemable amount if nft_data["redeem_type"].lower() == "token": I.import_module(nft_data["redeem_contract"]).transfer(amount=amount, to=ctx.caller) elif nft_data["redeem_type"].lower() == "lp": I.import_module("con_rocketswap_official_v1_1").transfer_liquidity(contract=nft_data["redeem_contract"], amount=amount, to=ctx.caller) # Burn NFT approve(name=name, amount=1, to=ctx.this) transfer_from(name=name, amount=1, to=ctx.this, main_account=ctx.caller)
name con_shit_the_lamden_ceo_says

State Changes

Contract con_shit_the_lamden_ceo_says
Variable collection_name
New Value Shit The Lamden CEO Says...
 
Contract con_shit_the_lamden_ceo_says
Variable collection_owner
New Value 49aceeabdccdcb39f8c2c112e110ead1a5fef22c644825c1917b2df3204c433f
 
Contract con_shit_the_lamden_ceo_says
Variable __code__
New Value I = importlib __collection_name = Variable(contract='con_shit_the_lamden_ceo_says', name= 'collection_name') __collection_owner = Variable(contract='con_shit_the_lamden_ceo_says', name ='collection_owner') __collection_nfts = Hash(default_value=0, contract= 'con_shit_the_lamden_ceo_says', name='collection_nfts') __collection_balances = Hash(default_value=0, contract= 'con_shit_the_lamden_ceo_says', name='collection_balances') __collection_balances_approvals = Hash(default_value=0, contract= 'con_shit_the_lamden_ceo_says', name='collection_balances_approvals') def ____(): __collection_name.set('Shit The Lamden CEO Says...') __collection_owner.set(ctx.caller) @__export('con_shit_the_lamden_ceo_says') 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 or ctx.caller == 'con_nftdrop', '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_shit_the_lamden_ceo_says') 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_shit_the_lamden_ceo_says') 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_shit_the_lamden_ceo_says') 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 @__export('con_shit_the_lamden_ceo_says') def setup_redeem(name: str, redeem_type: str, redeem_contract: str, redeem_amount: float): assert __collection_owner.get( ) == ctx.caller, 'You are not the collection creator' assert __collection_nfts[name] != 0, f'NFT {name} doesnt exist' assert redeem_type.lower() in ['lp', 'token' ], 'Only redeem types lp and token supported' nft_data = __collection_nfts[name] assert 'redeem_type' not in nft_data, 'NFT is already redeemable!' nft_data['redeem_type'] = redeem_type.lower() nft_data['redeem_contract'] = redeem_contract nft_data['redeem_amount'] = redeem_amount __collection_nfts[name] = nft_data if redeem_type.lower() == 'token': I.import_module(redeem_contract).transfer_from(amount=redeem_amount, to=ctx.this, main_account=ctx.caller) elif redeem_type.lower() == 'lp': I.import_module('con_rocketswap_official_v1_1' ).transfer_liquidity_from(contract=redeem_contract, amount= redeem_amount, to=ctx.this, main_account=ctx.caller) @__export('con_shit_the_lamden_ceo_says') def redeem(name: str): assert __collection_nfts[name] != 0, f'NFT {name} doesnt exist' nft_data = __collection_nfts[name] assert 'redeem_type' in nft_data, 'NFT is not redeemable!' redeem_amount = nft_data['redeem_amount'] nft_amount = nft_data['amount'] amount = redeem_amount / nft_amount if nft_data['redeem_type'].lower() == 'token': I.import_module(nft_data['redeem_contract']).transfer(amount=amount, to=ctx.caller) elif nft_data['redeem_type'].lower() == 'lp': I.import_module('con_rocketswap_official_v1_1').transfer_liquidity( contract=nft_data['redeem_contract'], amount=amount, to=ctx.caller) approve(name=name, amount=1, to=ctx.this) transfer_from(name=name, amount=1, to=ctx.this, main_account=ctx.caller)
 
Contract con_shit_the_lamden_ceo_says
Variable __compiled__
New Value e3000000000000000000000000070000004000000073f200000065005a0165026400640164028d025a0365026400640364028d025a04650564046400640564068d035a06650564046400640764068d035a07650564046400640864068d035a086409640a84005a09650a64008301650b650b650b650c650d640b9c05640c640d840483015a0e650a64008301650b650d650b640e9c03640f6410840483015a0f650a64008301650d650b650b64119c0364126413840483015a10650a64008301650b650d650b650b64149c0464156416840483015a11650a64008301650b650b650b651264179c0464186419840483015a13650a64008301650b641a9c01641b641c840483015a14641d5300291eda1c636f6e5f736869745f7468655f6c616d64656e5f63656f5f73617973da0f636f6c6c656374696f6e5f6e616d652902da08636f6e7472616374da046e616d65da10636f6c6c656374696f6e5f6f776e6572e900000000da0f636f6c6c656374696f6e5f6e6674732903da0d64656661756c745f76616c756572030000007204000000da13636f6c6c656374696f6e5f62616c616e636573da1d636f6c6c656374696f6e5f62616c616e6365735f617070726f76616c73630000000000000000000000000200000043000000731a00000074006a0164018301010074026a0174036a04830101006400530029024e7a1b5368697420546865204c616d64656e2043454f20536179732e2e2e2905da115f5f636f6c6c656374696f6e5f6e616d65da03736574da125f5f636f6c6c656374696f6e5f6f776e6572da03637478da0663616c6c6572a90072100000007210000000da00da045f5f5f5f0e000000730400000000010a01721200000029057204000000da0b6465736372697074696f6eda0e697066735f696d6167655f75726cda086d65746164617461da06616d6f756e7463050000000000000005000000050000004300000073780000007c0064016b037310740064028301820174017c00190064036b02732474006404830182017c0464036b047334740064058301820174026a03830074046a056b02735474046a0564066b02735474006407830182017c017c027c037c0464089c0474017c003c007c04740674046a057c0066023c006400530029094e72110000007a144e616d652063616e6e6f7420626520656d70747972060000007a134e616d6520616c7265616479206578697374737a24596f752063616e6e6f74207472616e73666572206e6567617469766520616d6f756e7473da0b636f6e5f6e667464726f707a274f6e6c792074686520636f6c6c656374696f6e206f776e65722063616e206d696e74204e465473290472130000007214000000721500000072160000002907da0e417373657274696f6e4572726f72da115f5f636f6c6c656374696f6e5f6e667473720d000000da03676574720e000000720f000000da155f5f636f6c6c656374696f6e5f62616c616e636573290572040000007213000000721400000072150000007216000000721000000072100000007211000000da086d696e745f6e6674130000007310000000000310011401100106011a0102011001721c000000290372040000007216000000da02746f63030000000000000003000000040000004300000073680000007c0164016b04731074006402830182017c0064036b0373207400640483018201740174026a037c00660219007c016b05733a7400640583018201740174026a037c006602050019007c01380003003c0074017c027c006602050019007c01370003003c006400530029064e72060000007a24596f752063616e6e6f74207472616e73666572206e6567617469766520616d6f756e747372110000007a37506c65617365207370656369667920746865206e616d65206f6620746865204e465420796f752077616e7420746f207472616e736665727a21596f7520646f6e74206861766520656e6f756768204e46547320746f2073656e6429047218000000721b000000720e000000720f000000290372040000007216000000721d000000721000000072100000007211000000da087472616e7366657220000000730c0000000002100110010c010e011601721e000000290372160000007204000000721d000000630300000000000000030000000400000043000000732c0000007c0064016b0473107400640283018201740174026a037c027c016603050019007c00370003003c006400530029034e72060000007a1f43616e6e6f7420617070726f7665206e6567617469766520616d6f756e747329047218000000da1f5f5f636f6c6c656374696f6e5f62616c616e6365735f617070726f76616c73720e000000720f000000290372160000007204000000721d000000721000000072100000007211000000da07617070726f76652a0000007304000000000210017220000000290472040000007216000000721d000000da0c6d61696e5f6163636f756e7463040000000000000004000000060000004300000073960000007c0164016b047310740064028301820174017c037c027c00660319007c016b05733c740064036a0274017c037c027c00660319007c0183028301820174037c037c00660219007c016b057354740064048301820174017c037c027c006603050019007c01380003003c0074037c037c006602050019007c01380003003c0074037c027c006602050019007c01370003003c006400530029054e72060000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a484e6f7420656e6f756768204e46547320617070726f76656420746f2073656e642120596f752068617665207b7d20616e642061726520747279696e6720746f207370656e64207b7d7a184e6f7420656e6f756768204e46547320746f2073656e642129047218000000721f000000da06666f726d6174721b000000290472040000007216000000721d0000007221000000721000000072100000007211000000da0d7472616e736665725f66726f6d300000007312000000000210010c010c0114010a010e0116011401722300000029047204000000da0b72656465656d5f74797065da0f72656465656d5f636f6e7472616374da0d72656465656d5f616d6f756e7463040000000000000005000000060000004300000073d600000074006a01830074026a036b027316740464018301820174057c00190064026b037332740464037c009b0064049d03830182017c016a068300640f6b067346740464078301820174057c0019007d0464087c046b07735e74046409830182017c016a0683007c0464083c007c027c04640a3c007c037c04640b3c007c0474057c003c007c016a06830064066b0272aa74076a087c0283016a097c0374026a0a74026a03640c8d0301006e287c016a06830064056b0272d274076a08640d83016a0b7c027c0374026a0a74026a03640e8d0401006400530029104e7a22596f7520617265206e6f742074686520636f6c6c656374696f6e2063726561746f7272060000007a044e4654207a0d20646f65736e74206578697374da026c70da05746f6b656e7a284f6e6c792072656465656d207479706573206c7020616e6420746f6b656e20737570706f7274656472240000007a1a4e465420697320616c72656164792072656465656d61626c65217225000000722600000029037216000000721d0000007221000000da1c636f6e5f726f636b6574737761705f6f6666696369616c5f76315f31290472030000007216000000721d0000007221000000290272270000007228000000290c720d000000721a000000720e000000720f00000072180000007219000000da056c6f776572da0149da0d696d706f72745f6d6f64756c657223000000da0474686973da177472616e736665725f6c69717569646974795f66726f6d29057204000000722400000072250000007226000000da086e66745f64617461721000000072100000007211000000da0c73657475705f72656465656d3d00000073240000000003060110011c010e010601080110010c010801080108010c010c0110010c010a01020172300000002901720400000063010000000000000005000000060000004300000073cc00000074007c00190064016b03731c740164027c009b0064039d038301820174007c0019007d0164047c016b06733474016405830182017c01640619007d027c01640719007d037c027c031b007d047c01640419006a02830064086b02727874036a047c016409190083016a057c0474066a07640a8d0201006e2c7c01640419006a028300640b6b0272a474036a04640c83016a087c01640919007c0474066a07640d8d03010074097c00640e74066a0a640f8d030100740b7c00640e74066a0a74066a0764108d0401006400530029114e72060000007a044e4654207a0d20646f65736e7420657869737472240000007a164e4654206973206e6f742072656465656d61626c6521722600000072160000007228000000722500000029027216000000721d00000072270000007229000000290372030000007216000000721d000000e901000000290372040000007216000000721d000000290472040000007216000000721d0000007221000000290c72190000007218000000722a000000722b000000722c000000721e000000720e000000720f000000da127472616e736665725f6c69717569646974797220000000722d000000722300000029057204000000722f0000007226000000da0a6e66745f616d6f756e747216000000721000000072100000007211000000da0672656465656d54000000731c00000000021c0108011001080108010801100110010c0110010a011201100172340000004e2915da09696d706f72746c6962722b000000da085661726961626c65720b000000720d000000da04486173687219000000721b000000721f0000007212000000da085f5f6578706f7274da03737472da0464696374da03696e74721c000000721e00000072200000007223000000da05666c6f6174723000000072340000007210000000721000000072100000007211000000da083c6d6f64756c653e0100000073320000000401040108010401080104010a0104010a0104010a03080506010601120b06011409060114050601160c0601060110150601
 
Contract con_shit_the_lamden_ceo_says
Variable __owner__
New Value null
 
Contract con_shit_the_lamden_ceo_says
Variable __submitted__
New Value 2023,3,26,2,7,41,0
 
Contract con_shit_the_lamden_ceo_says
Variable __developer__
New Value 49aceeabdccdcb39f8c2c112e110ead1a5fef22c644825c1917b2df3204c433f
 
Contract currency
Variable balances
Key 49aceeabdccdcb39f8c2c112e110ead1a5fef22c644825c1917b2df3204c433f
New Value 79.938127428846203779050446625935