Transaction #8206

Hash f394f1df26eafba098bd3c4e017e17de515f39727b3a2723c5dcf213565dd3f3
Status Success
Timestamp 413 days ago - 3/3/2023, 11:47:40 AM UTC+0
Block 8206
Stamps Used 171
Burned Fee 0.01011834 TAU
From ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d 
Contract Name submission
Function Name submit_contract

Additional Info
Nonce 74
Processor a04b5891ef8cd27095373a4f75b899ec2bc0883c02e506a6a5b55b491998cc3f
Signature f481d947f2ae10e6d521d7f39c9db26510b66045f540e576d465fd7557243fd6da4bf70bf5c21f02369aaba81e34f4806c1b9080e2eece313960dd5c8018d201
Stamps Supplied 845
Stamps per TAU 169

Kwargs

code import con_rocketswap_official_v1_1 as rswp import currency as tau I = importlib @export def buy(token_contract: str, tau_amount: float): tau.transfer_from(amount=tau_amount, to=ctx.this, main_account=ctx.signer) tau.approve(amount=tau_amount, to='con_rocketswap_official_v1_1') rswp.buy(contract=token_contract, currency_amount=tau_amount) balances = ForeignHash(foreign_contract=token_contract, foreign_name='balances') I.import_module(token_contract).transfer(amount=balances[ctx.this], to=ctx.caller) @export def sell(token_contract: str, token_amount: float): I.import_module(token_contract).transfer_from(amount=token_amount, to=ctx.this, main_account=ctx.signer) I.import_module(token_contract).approve(amount=token_amount, to='con_rocketswap_official_v1_1') rswp.sell(contract=token_contract, token_amount=token_amount) balances = ForeignHash(foreign_contract='currency', foreign_name='balances') tau.transfer(amount=balances[ctx.this], to=ctx.caller) @export def withdraw(token_contract: str): assert ctx.signer == 'ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d', 'Nope' balances = ForeignHash(foreign_contract=token_contract, foreign_name='balances') I.import_module(token_contract).transfer(amount=balances[ctx.this], to=ctx.caller)
name con_trd

State Changes

Contract con_trd
Variable __code__
New Value import con_rocketswap_official_v1_1 as rswp import currency as tau I = importlib @__export('con_trd') def buy(token_contract: str, tau_amount: float): tau.transfer_from(amount=tau_amount, to=ctx.this, main_account=ctx.signer) tau.approve(amount=tau_amount, to='con_rocketswap_official_v1_1') rswp.buy(contract=token_contract, currency_amount=tau_amount) __balances = ForeignHash(foreign_contract=token_contract, foreign_name= 'balances', contract='con_trd', name='balances') I.import_module(token_contract).transfer(amount=__balances[ctx.this], to=ctx.caller) @__export('con_trd') def sell(token_contract: str, token_amount: float): I.import_module(token_contract).transfer_from(amount=token_amount, to= ctx.this, main_account=ctx.signer) I.import_module(token_contract).approve(amount=token_amount, to= 'con_rocketswap_official_v1_1') rswp.sell(contract=token_contract, token_amount=token_amount) __balances = ForeignHash(foreign_contract='currency', foreign_name= 'balances', contract='con_trd', name='balances') tau.transfer(amount=__balances[ctx.this], to=ctx.caller) @__export('con_trd') def withdraw(token_contract: str): assert ctx.signer == 'ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d', 'Nope' __balances = ForeignHash(foreign_contract=token_contract, foreign_name= 'balances', contract='con_trd', name='balances') I.import_module(token_contract).transfer(amount=__balances[ctx.this], to=ctx.caller)
 
Contract con_trd
Variable __compiled__
New Value e30000000000000000000000000400000040000000735e000000640064016c005a01640064016c025a0365045a056506640283016507650864039c0264046405840483015a096506640283016507650864069c0264076408840483015a0a650664028301650764099c01640a640b840483015a0b64015300290ce9000000004eda07636f6e5f7472642902da0e746f6b656e5f636f6e7472616374da0a7461755f616d6f756e74630200000000000000030000000600000043000000736000000074006a017c0174026a0374026a0464018d03010074006a057c01640264038d02010074066a077c007c0164048d02010074087c0064056406640564078d047d0274096a0a7c0083016a0b7c0274026a03190074026a0c64038d0201006400530029084e2903da06616d6f756e74da02746fda0c6d61696e5f6163636f756e74da1c636f6e5f726f636b6574737761705f6f6666696369616c5f76315f312902720500000072060000002902da08636f6e7472616374da0f63757272656e63795f616d6f756e74da0862616c616e63657372020000002904da10666f726569676e5f636f6e7472616374da0c666f726569676e5f6e616d657209000000da046e616d65290dda03746175da0d7472616e736665725f66726f6dda03637478da0474686973da067369676e6572da07617070726f7665da0472737770da03627579da0b466f726569676e48617368da0149da0d696d706f72745f6d6f64756c65da087472616e73666572da0663616c6c6572290372030000007204000000da0a5f5f62616c616e636573a900721d000000da00721600000006000000730e000000000214010e010e0104010c011201721600000029027203000000da0c746f6b656e5f616d6f756e74630200000000000000030000000600000043000000736600000074006a017c0083016a027c0174036a0474036a0564018d03010074006a017c0083016a067c01640264038d02010074076a087c007c0164048d0201007409640564066407640664088d047d02740a6a0b7c0274036a04190074036a0c64038d0201006400530029094e2903720500000072060000007207000000720800000029027205000000720600000029027209000000721f000000da0863757272656e6379720b00000072020000002904720c000000720d0000007209000000720e000000290d72180000007219000000721000000072110000007212000000721300000072140000007215000000da0473656c6c7217000000720f000000721a000000721b00000029037203000000721f000000721c000000721d000000721d000000721e000000722100000011000000731000000000020c010e010c0108010e0104010c01722100000029017203000000630100000000000000020000000600000043000000734200000074006a0164016b027312740264028301820174037c0064036404640364058d047d0174046a057c0083016a067c0174006a07190074006a0864068d0201006400530029074eda4061653764313464366439623834343366383831626136323434373237623639623638313031306537383264346665343832646266623062366163613032643564da044e6f7065720b00000072020000002904720c000000720d0000007209000000720e000000290272050000007206000000290972110000007213000000da0e417373657274696f6e4572726f72721700000072180000007219000000721a0000007212000000721b00000029027203000000721c000000721d000000721d000000721e000000da0877697468647261771d000000730a0000000002120104010c0112017225000000290c720800000072150000007220000000720f000000da09696d706f72746c69627218000000da085f5f6578706f7274da03737472da05666c6f6174721600000072210000007225000000721d000000721d000000721d000000721e000000da083c6d6f64756c653e0100000073100000000801080104030601120a0601120b0601
 
Contract con_trd
Variable __owner__
New Value null
 
Contract con_trd
Variable __submitted__
New Value 2023,3,3,11,47,41,0
 
Contract con_trd
Variable __developer__
New Value ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
 
Contract currency
Variable balances
Key ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
New Value 2315.580877171376032341238464906271