Contract con_washtrading_v2


Contract Code


  
1 import con_rocketswap_official_v1_1 as rocketswap
2 import currency as tau
3 I = importlib
4
5 @export
6 def generate_volume(token_contract: str, amount_of_trades: int, starter_sell_amount: float):
7 token = I.import_module(token_contract)
8 token.transfer_from(amount=starter_sell_amount, to=ctx.this, main_account=ctx.caller)
9 sell_amount = starter_sell_amount
10 buy_amount = 0
11 tau.approve(amount=99999999999, to="con_rocketswap_official_v1_1")
12 token.approve(amount=999999999999, to="con_rocketswap_official_v1_1")
13 i = 0
14 for i in range(amount_of_trades):
15 buy_amount = rocketswap.sell(contract=token_contract, token_amount=sell_amount)
16 sell_amount = rocketswap.buy(contract=token_contract, currency_amount=buy_amount)

Byte Code

e300000000000000000000000005000000400000007332000000640064016c005a01640064016c025a0365045a0565066402830165076508650964039c0364046405840483015a0a640153002906e9000000004eda12636f6e5f7761736874726164696e675f76322903da0e746f6b656e5f636f6e7472616374da10616d6f756e745f6f665f747261646573da13737461727465725f73656c6c5f616d6f756e74630300000000000000070000000500000043000000737800000074006a017c0083017d037c036a027c0274036a0474036a0564018d0301007c027d0464027d0574066a076403640464058d0201007c036a076406640464058d02010064027d06782c74087c01830144005d207d0674096a0a7c007c0464078d027d0574096a0b7c007c0564088d027d04715057006400530029094e2903da06616d6f756e74da02746fda0c6d61696e5f6163636f756e7472010000006c03000000ff67ed105d00da1c636f6e5f726f636b6574737761705f6f6666696369616c5f76315f312902720600000072070000006c03000000ff0f4a29a3032902da08636f6e7472616374da0c746f6b656e5f616d6f756e742902720a000000da0f63757272656e63795f616d6f756e74290cda0149da0d696d706f72745f6d6f64756c65da0d7472616e736665725f66726f6dda03637478da0474686973da0663616c6c6572da03746175da07617070726f7665da0572616e6765da0a726f636b657473776170da0473656c6cda036275792907720300000072040000007205000000da05746f6b656eda0b73656c6c5f616d6f756e74da0a6275795f616d6f756e74da0169a900721d000000da00da0f67656e65726174655f766f6c756d6506000000731a00000000030a010a010a01040104010e010e0104010e01060108010601721f000000290b72090000007216000000da0863757272656e63797213000000da09696d706f72746c6962720d000000da085f5f6578706f7274da03737472da03696e74da05666c6f6174721f000000721d000000721d000000721d000000721e000000da083c6d6f64756c653e01000000730a00000008010801040306010401