Transaction #465814

Hash a1e22724001c219969b7cc381f4f9765199ea78b1e69b851f13ae6bf2d9dfd2f
Status Failed
Error Message Exception('Contract already exists.',)
Timestamp 951 days ago - 11/30/2021, 12:19:54 AM UTC+0
Block 446170
Stamps Used 7
Burned Fee 0.00041420 TAU
From fb8721c4f736b22075f08f1161f24522132522311ac4f1e19730e3298bb8a40e 
Contract Name submission
Function Name submit_contract

Additional Info
SubBlock Number 0
Nonce 3169
Processor 5b09493df6c18d17cc883ebce54fcb1f5afbd507533417fe32c006009a9c3c4a
Signature 389d87af7ee1781ff63425a5d597eb55aa0ab6e09d8a0f8122dd421ac872d8285caa55fbaf04bc22e8e057f63b690865f086184690e6be4a74329f52c3e2ea06
Stamps Supplied 1000
Stamps per TAU 169

Kwargs

code balances = Hash(default_value=0) metadata = Hash() operator = Variable() total_supply = Variable() @construct def seed(owner: str): total_supply.set(0) operator.set(owner) metadata['token_name'] = 'RubixDAO' metadata['token_symbol'] = 'lMKR' metadata['token_logo_url'] = 'image.site' metadata['operator'] = ctx.caller @export def transfer(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller assert balances[sender] >= amount, 'Not enough coins to send!' balances[sender] -= amount balances[to] += amount @export def balance_of(account: str): return balances[account] @export def allowance(owner: str, spender: str): return balances[owner, spender] @export def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller balances[sender, to] += amount return balances[sender, to] @export def transfer_from(amount: float, to: str, main_account: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller assert balances[main_account] >= amount, 'Not enough coins to send!' assert balances[main_account, sender] >= amount, 'Not enough coins approved to send! You have {} and are trying to spend {}'\ .format(balances[main_account, sender], amount) balances[main_account, sender] -= amount balances[main_account] -= amount balances[to] += amount @export def mint(amount: float): assert_owner() assert amount > 0, 'Cannot mint negative balances!' sender = ctx.caller balances[sender] += amount total = total_supply.get() + amount total_supply.set(total) @export def burn(amount: float): assert amount > 0, 'Cannot burn negative balances!' sender = ctx.caller assert balances[sender] >= amount, 'Not enough coins to burn!' balances[sender] -= amount total = total_supply.get() - amount total_supply.set(total) @export def get_total_supply(): return total_supply.get() @export def change_metadata(key: str, value: Any): assert ctx.caller == metadata['operator'], 'Only operator can set metadata!' metadata[key] = value @export def change_owner(new_owner: str): assert_owner() operator.set(new_owner) def assert_owner(): assert ctx.caller == operator.get(), 'Only operator can call!'
constructor_args {"owner":"con_rubix_test_dec_vault"}
name con_rubix_test_dec_tad

State Changes

Contract currency
Variable balances
Key fb8721c4f736b22075f08f1161f24522132522311ac4f1e19730e3298bb8a40e
New Value 27.88238822934909877