Transaction #7130

Hash 49561035fb19570f5c0cdb1df2556f053b0ce2e2d8940b74cf63a3668c9f9510
Status Failed
Error Message AssertionError('Name must be lowercase!',)
Timestamp 435 days ago - 2/26/2023, 7:24:24 PM UTC+0
Block 7130
Stamps Used 4
Burned Fee 0.00023669 TAU
From 46e45f759a3ac61d30cfb8eeb51896e8edd91d1ca86fdd5d650fadbbb3d629fe 
Contract Name submission
Function Name submit_contract

Additional Info
Nonce 0
Processor 5b09493df6c18d17cc883ebce54fcb1f5afbd507533417fe32c006009a9c3c4a
Signature 922428cbe1578bdcc5e8f4b7c0dd75e45b2f3947bb16dc39e307c86f07535482083f989063e2595e53c98b8f903e92eeb23980d5ecf42edbea7af026ad67ae01
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("Kee") 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_nft_collection_Kee1

State Changes

Contract currency
Variable balances
Key 46e45f759a3ac61d30cfb8eeb51896e8edd91d1ca86fdd5d650fadbbb3d629fe
New Value 13.675571780523317795990308873517