Transaction #473

Hash bf9835ff40ab476edbcdf509ba1fb9df3cbf8ac37b16f50a90799b3bfff6d280
Status Success
Timestamp 464 days ago - 2/4/2023, 10:43:25 PM UTC+0
Block 473
Stamps Used 359
Burned Fee 0.02124260 TAU
From ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d 
Contract Name submission
Function Name submit_contract

Additional Info
Nonce 0
Processor ffd7182fcfd0d84ca68845fb11bafad11abca2f9aca8754a6d9cad7baa39d28b
Signature 323a37d4a6bf02867dc1fee7f37cc65cd81cb855776fb2bc673055d0d0b6e485cc83957b7724d606235d5fa39a462a52b638d1fcbff4eebb0decf5518dbc600a
Stamps Supplied 6500
Stamps per TAU 169

Kwargs

code I = importlib metadata = Hash() balances = Hash(default_value=0) allowances = Hash(default_value=0) multisig = Hash(default_value=False) total_supply = Variable() swap_end_date = Variable() # TODO: Change BENJI = '889f923fb54a79deb11ee2850010488992222c92351d3024ea3a737b78fab0eb' ENDO = 'ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d' CS = '8377f976c6ba25a219c1535c56793cf966c360c73db0ce23233c29bcd484d4df' @construct def seed(): # TODO: Change balances[ctx.submission_name] = 142487438 metadata['token_name'] = "NEB2" metadata['token_symbol'] = "NEB2" metadata['operator'] = ctx.caller # TODO: Change swap_end_date.set(now + datetime.timedelta(days=30)) total_supply.set(0) @export def change_metadata(key: str, value: Any): assert_caller_is_owner() metadata[key] = value @export def transfer(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' assert balances[ctx.caller] >= amount, 'Not enough tokens to send!' balances[ctx.caller] -= amount balances[to] += amount @export def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' allowances[ctx.caller, to] += amount @export def transfer_from(amount: float, to: str, main_account: str): approved = allowances[main_account, ctx.caller] assert amount > 0, 'Cannot send negative balances!' assert approved >= amount, f'You approved {approved} but need {amount}' assert balances[main_account] >= amount, 'Not enough tokens to send!' allowances[main_account, ctx.caller] -= amount balances[main_account] -= amount balances[to] += amount @export def balance_of(address: str): return balances[address] @export def time_until_swap_end(): return swap_end_date.get() - now @export def total_supply(): return int(total_supply.get()) def multisig_agrees(topic: str): yes = 0 # TODO: Change if multisig[BENJI, topic]: yes += 1 if multisig[ENDO, topic]: yes += 1 if multisig[CS, topic]: yes += 1 if yes > 1: # TODO: Change multisig[BENJI, topic] = False multisig[ENDO, topic] = False multisig[CS, topic] = False return True return False @export def allow_swap(address: str, amount: float, decision: bool): multisig[ctx.caller, f'swap-{address}-{amount}'] = decision assert_caller_is_owner() @export def swap_neb(amount: float): assert amount > 0, 'Cannot swap negative balances!' if now > swap_end_date.get(): assert multisig_agrees(f'swap-{ctx.signer}-{amount}'), 'Swap period ended' I.import_module('con_nebula').transfer_from( amount=amount, to='NEBULA_BURN_ADDRESS', main_account=ctx.caller ) # TODO: Change swap_amount = amount * 0.1 balances[ctx.caller] += swap_amount total_supply.set(total_supply.get() + swap_amount) @export def allow_withdraw(token_contract: str, amount: float, decision: bool): multisig[ctx.caller, f'withdraw-{token_contract}-{amount}'] = decision assert_caller_is_owner() @export def withdraw(token_contract: str, amount: float): assert_caller_is_owner() topic = f'withdraw-{token_contract}-{amount}' assert multisig_agrees(topic), 'Not enough votes!' I.import_module(token_contract).transfer(amount, ctx.caller) def assert_caller_is_owner(): # TODO: Change assert ctx.caller in (BENJI, ENDO, CS), 'Only executable by operators!'
name con_new_neb

State Changes

Contract con_new_neb
Variable balances
Key con_new_neb
New Value 142487438
 
Contract con_new_neb
Variable metadata
Key token_name
New Value NEB2
 
Contract con_new_neb
Variable metadata
Key token_symbol
New Value NEB2
 
Contract con_new_neb
Variable metadata
Key operator
New Value ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
 
Contract con_new_neb
Variable swap_end_date
New Value 2023,3,6,22,43,26,0
 
Contract con_new_neb
Variable total_supply
New Value 0
 
Contract con_new_neb
Variable __code__
New Value I = importlib __metadata = Hash(contract='con_new_neb', name='metadata') __balances = Hash(default_value=0, contract='con_new_neb', name='balances') __allowances = Hash(default_value=0, contract='con_new_neb', name='allowances') __multisig = Hash(default_value=False, contract='con_new_neb', name='multisig') __total_supply = Variable(contract='con_new_neb', name='total_supply') __swap_end_date = Variable(contract='con_new_neb', name='swap_end_date') BENJI = '889f923fb54a79deb11ee2850010488992222c92351d3024ea3a737b78fab0eb' ENDO = 'ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d' CS = '8377f976c6ba25a219c1535c56793cf966c360c73db0ce23233c29bcd484d4df' def ____(): __balances[ctx.submission_name] = 142487438 __metadata['token_name'] = 'NEB2' __metadata['token_symbol'] = 'NEB2' __metadata['operator'] = ctx.caller __swap_end_date.set(now + datetime.timedelta(days=30)) __total_supply.set(0) @__export('con_new_neb') def change_metadata(key: str, value: Any): __assert_caller_is_owner() __metadata[key] = value @__export('con_new_neb') def transfer(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' assert __balances[ctx.caller] >= amount, 'Not enough tokens to send!' __balances[ctx.caller] -= amount __balances[to] += amount @__export('con_new_neb') def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' __allowances[ctx.caller, to] += amount @__export('con_new_neb') def transfer_from(amount: float, to: str, main_account: str): approved = __allowances[main_account, ctx.caller] assert amount > 0, 'Cannot send negative balances!' assert approved >= amount, f'You approved {approved} but need {amount}' assert __balances[main_account] >= amount, 'Not enough tokens to send!' __allowances[main_account, ctx.caller] -= amount __balances[main_account] -= amount __balances[to] += amount @__export('con_new_neb') def balance_of(address: str): return __balances[address] @__export('con_new_neb') def time_until_swap_end(): return __swap_end_date.get() - now @__export('con_new_neb') def total_supply(): return int(__total_supply.get()) def __multisig_agrees(topic: str): yes = 0 if __multisig[BENJI, topic]: yes += 1 if __multisig[ENDO, topic]: yes += 1 if __multisig[CS, topic]: yes += 1 if yes > 1: __multisig[BENJI, topic] = False __multisig[ENDO, topic] = False __multisig[CS, topic] = False return True return False @__export('con_new_neb') def allow_swap(address: str, amount: float, decision: bool): __multisig[ctx.caller, f'swap-{address}-{amount}'] = decision __assert_caller_is_owner() @__export('con_new_neb') def swap_neb(amount: float): assert amount > 0, 'Cannot swap negative balances!' if now > __swap_end_date.get(): assert __multisig_agrees(f'swap-{ctx.signer}-{amount}' ), 'Swap period ended' I.import_module('con_nebula').transfer_from(amount=amount, to= 'NEBULA_BURN_ADDRESS', main_account=ctx.caller) swap_amount = amount * decimal('0.1') __balances[ctx.caller] += swap_amount __total_supply.set(__total_supply.get() + swap_amount) @__export('con_new_neb') def allow_withdraw(token_contract: str, amount: float, decision: bool): __multisig[ctx.caller, f'withdraw-{token_contract}-{amount}'] = decision __assert_caller_is_owner() @__export('con_new_neb') def withdraw(token_contract: str, amount: float): __assert_caller_is_owner() topic = f'withdraw-{token_contract}-{amount}' assert __multisig_agrees(topic), 'Not enough votes!' I.import_module(token_contract).transfer(amount, ctx.caller) def __assert_caller_is_owner(): assert ctx.caller in (BENJI, ENDO, CS), 'Only executable by operators!'
 
Contract con_new_neb
Variable __compiled__
New Value e30000000000000000000000000500000040000000737a01000065005a0165026400640164028d025a03650264036400640464058d035a04650264036400640664058d035a05650264076400640864058d035a0665076400640964028d025a0865076400640a64028d025a09640b5a0a640c5a0b640d5a0c640e640f84005a0d650e64008301650f651064109c0264116412840483015a11650e640083016512650f64139c0264146415840483015a13650e640083016512650f64139c0264166417840483015a14650e640083016512650f650f64189c036419641a840483015a15650e64008301650f641b9c01641c641d840483015a16650e64008301641e641f840083015a17650e6400830164206409840083015a18650f64219c016422642384045a19650e64008301650f6512651a64249c0364256426840483015a1b650e64008301651264279c0164286429840483015a1c650e64008301650f6512651a642a9c03642b642c840483015a1d650e64008301650f6512642d9c02642e642f840483015a1e6430643184005a1f643253002933da0b636f6e5f6e65775f6e6562da086d657461646174612902da08636f6e7472616374da046e616d65e900000000da0862616c616e6365732903da0d64656661756c745f76616c756572030000007204000000da0a616c6c6f77616e63657346da086d756c7469736967da0c746f74616c5f737570706c79da0d737761705f656e645f64617465da4038383966393233666235346137396465623131656532383530303130343838393932323232633932333531643330323465613361373337623738666162306562da4061653764313464366439623834343366383831626136323434373237623639623638313031306537383264346665343832646266623062366163613032643564da403833373766393736633662613235613231396331353335633536373933636639363663333630633733646230636532333233336332396263643438346434646663000000000000000000000000050000004300000073480000006401740074016a023c006402740364033c006402740364043c0074016a04740364053c0074056a06740774086a09640664078d01170083010100740a6a066408830101006400530029094e698e2f7e08da044e454232da0a746f6b656e5f6e616d65da0c746f6b656e5f73796d626f6cda086f70657261746f72e91e0000002901da04646179737205000000290bda0a5f5f62616c616e636573da03637478da0f7375626d697373696f6e5f6e616d65da0a5f5f6d65746164617461da0663616c6c6572da0f5f5f737761705f656e645f64617465da03736574da036e6f77da086461746574696d65da0974696d6564656c7461da0e5f5f746f74616c5f737570706c79a90072200000007220000000da00da045f5f5f5f0d000000730c00000000010a01080108010a01160172220000002902da036b6579da0576616c756563020000000000000002000000030000004300000073120000007400830001007c0174017c003c006400530029014e2902da185f5f6173736572745f63616c6c65725f69735f6f776e65727218000000290272230000007224000000722000000072200000007221000000da0f6368616e67655f6d657461646174611600000073040000000002060172260000002902da06616d6f756e74da02746f630200000000000000020000000400000043000000734c0000007c0064016b0473107400640283018201740174026a0319007c006b0573267400640383018201740174026a03050019007c00380003003c0074017c01050019007c00370003003c006400530029044e72050000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a1a4e6f7420656e6f75676820746f6b656e7320746f2073656e64212904da0e417373657274696f6e4572726f72721500000072160000007219000000290272270000007228000000722000000072200000007221000000da087472616e736665721c00000073080000000002100116011201722a000000630200000000000000020000000400000043000000732a0000007c0064016b0473107400640283018201740174026a037c016602050019007c00370003003c006400530029034e72050000007a1e43616e6e6f742073656e64206e656761746976652062616c616e6365732129047229000000da0c5f5f616c6c6f77616e63657372160000007219000000290272270000007228000000722000000072200000007221000000da07617070726f766524000000730400000000021001722c000000290372270000007228000000da0c6d61696e5f6163636f756e74630300000000000000040000000500000043000000738800000074007c0274016a02660219007d037c0064016b04731e74036402830182017c037c006b05733a740364037c039b0064047c009b009d048301820174047c0219007c006b05734e740364058301820174007c0274016a026602050019007c00380003003c0074047c02050019007c00380003003c0074047c01050019007c00370003003c006400530029064e72050000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a0d596f7520617070726f766564207a0a20627574206e656564207a1a4e6f7420656e6f75676820746f6b656e7320746f2073656e64212905722b0000007216000000721900000072290000007215000000290472270000007228000000722d000000da08617070726f766564722000000072200000007221000000da0d7472616e736665725f66726f6d2a000000730e00000000020e0110011c01140116011001722f0000002901da0761646472657373630100000000000000010000000200000043000000730800000074007c001900530029014e2901721500000029017230000000722000000072200000007221000000da0a62616c616e63655f6f6635000000730200000000027231000000630000000000000000000000000200000043000000730c00000074006a01830074021800530029014e2903721a000000da03676574721c0000007220000000722000000072200000007221000000da1374696d655f756e74696c5f737761705f656e643a000000730200000000027233000000630000000000000000000000000200000043000000730c000000740074016a0283008301530029014e2903da03696e74721f00000072320000007220000000722000000072200000007221000000720a0000003f000000730200000000022901da05746f706963630100000000000000020000000400000043000000737400000064017d01740074017c006602190072187c01640237007d01740074027c0066021900722c7c01640237007d01740074037c006602190072407c01640237007d017c0164026b0472706403740074017c0066023c006403740074027c0066023c006403740074037c0066023c00640453006403530029054e7205000000e90100000046542904da0a5f5f6d756c7469736967da0542454e4a49da04454e444fda02435329027235000000da03796573722000000072200000007221000000da115f5f6d756c74697369675f61677265657344000000731a000000000104010c0108010c0108010c01080108010c010c010c010401723c000000290372300000007227000000da086465636973696f6e63030000000000000003000000070000004300000073240000007c02740074016a0264017c009b0064027c019b009d0466023c007403830001006400530029034e7a05737761702dfa012d29047237000000721600000072190000007225000000290372300000007227000000723d000000722000000072200000007221000000da0a616c6c6f775f7377617054000000730400000000021a01723f0000002901722700000063010000000000000002000000050000004300000073860000007c0064016b0473107400640283018201740174026a0383006b04723a7404640374056a069b0064047c009b009d048301733a740064058301820174076a08640683016a097c00640774056a0a64088d0301007c00740b6409830114007d01740c74056a0a050019007c01370003003c00740d6a0e740d6a0383007c0117008301010064005300290a4e72050000007a1e43616e6e6f742073776170206e656761746976652062616c616e636573217a05737761702d723e0000007a115377617020706572696f6420656e646564da0a636f6e5f6e6562756c61da134e4542554c415f4255524e5f41444452455353290372270000007228000000722d0000007a03302e31290f7229000000721c000000721a0000007232000000723c0000007216000000da067369676e6572da0149da0d696d706f72745f6d6f64756c65722f0000007219000000da07646563696d616c7215000000721f000000721b00000029027227000000da0b737761705f616d6f756e74722000000072200000007221000000da08737761705f6e65625a0000007312000000000210010c01180106010c010c010c01120172470000002903da0e746f6b656e5f636f6e74726163747227000000723d00000063030000000000000003000000070000004300000073240000007c02740074016a0264017c009b0064027c019b009d0466023c007403830001006400530029034e7a0977697468647261772d723e00000029047237000000721600000072190000007225000000290372480000007227000000723d000000722000000072200000007221000000da0e616c6c6f775f776974686472617767000000730400000000021a017249000000290272480000007227000000630200000000000000030000000400000043000000733e00000074008300010064017c009b0064027c019b009d047d0274017c0283017326740264038301820174036a047c0083016a057c0174066a07830201006400530029044e7a0977697468647261772d723e0000007a114e6f7420656e6f75676820766f7465732129087225000000723c000000722900000072430000007244000000722a000000721600000072190000002903724800000072270000007235000000722000000072200000007221000000da0877697468647261776d00000073080000000002060110011001724a000000630000000000000000000000000400000043000000731c00000074006a0174027403740466036b06731874056401830182016400530029024e7a1d4f6e6c792065786563757461626c65206279206f70657261746f72732129067216000000721900000072380000007239000000723a000000722900000072200000007220000000722000000072210000007225000000750000007302000000000172250000004e2920da09696d706f72746c69627243000000da044861736872180000007215000000722b0000007237000000da085661726961626c65721f000000721a00000072380000007239000000723a0000007222000000da085f5f6578706f7274da03737472da03416e797226000000da05666c6f6174722a000000722c000000722f00000072310000007233000000720a000000723c000000da04626f6f6c723f00000072470000007249000000724a00000072250000007220000000722000000072200000007221000000da083c6d6f64756c653e01000000734000000004010c010e010e010e010c010c0104010401040308090601120506011207060112050601140a06011004100510050e10060114050601100c0601140506011207
 
Contract con_new_neb
Variable __owner__
New Value null
 
Contract con_new_neb
Variable __submitted__
New Value 2023,2,4,22,43,26,0
 
Contract con_new_neb
Variable __developer__
New Value ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
 
Contract currency
Variable balances
Key ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
New Value 2057.631288810053685151650774034939