1 |
I = importlib |
2 |
|
3 |
YETI = 'con_yeti_contract_11' |
4 |
|
5 |
operator = Variable() |
6 |
|
7 |
@construct |
8 |
def init(): |
9 |
operator.set(YETI) |
10 |
|
11 |
@export |
12 |
def transfer(ctx_signer: str, contract: str, contract_method: str, amount: |
13 |
float, owners: list, tax_amount: float): |
14 |
assert_operator() |
15 |
|
16 |
if contract == 'con_rocketswap_official_v1_1': |
17 |
if contract_method == 'buy': |
18 |
if ctx_signer in owners: |
19 |
return amount |
20 |
else: |
21 |
amount -= tax_amount |
22 |
return amount |
23 |
else: |
24 |
#here works in the case of contract_method == remove_liquidity |
25 |
return amount |
26 |
|
27 |
def assert_operator(): |
28 |
assert ctx.caller == operator.get(), 'Only operator can call!' |
e30000000000000000000000000800000040000000734800000065005a0164005a0265036401640264038d025a046404640584005a0565066401830165076507650765086509650864069c0664076408840483015a0a6409640a84005a0b640b5300290cda14636f6e5f796574695f636f6e74726163745f3131da13636f6e5f796574695f7472616e736665725f34da086f70657261746f722902da08636f6e7472616374da046e616d65630000000000000000000000000200000043000000730e00000074006a017402830101006400530029014e2903da0a5f5f6f70657261746f72da03736574da0459455449a90072090000007209000000da00da045f5f5f5f0600000073020000000001720b0000002906da0a6374785f7369676e65727204000000da0f636f6e74726163745f6d6574686f64da06616d6f756e74da066f776e657273da0a7461785f616d6f756e7463060000000000000006000000020000004300000073380000007400830001007c0164016b0272347c0264026b0272307c007c046b0672227c0353007c037c0538007d037c0353006e047c0353006400530029034eda1c636f6e5f726f636b6574737761705f6f6666696369616c5f76315f31da036275792901da115f5f6173736572745f6f70657261746f722906720c0000007204000000720d000000720e000000720f000000721000000072090000007209000000720a000000da087472616e736665720a0000007310000000000306010801080108010402080106027214000000630000000000000000000000000200000043000000731a00000074006a0174026a0383006b02731674046401830182016400530029024e7a174f6e6c79206f70657261746f722063616e2063616c6c212905da03637478da0663616c6c65727206000000da03676574da0e417373657274696f6e4572726f72720900000072090000007209000000720a0000007213000000190000007302000000000172130000004e290cda09696d706f72746c6962da01497208000000da085661726961626c657206000000720b000000da085f5f6578706f7274da03737472da05666c6f6174da046c69737472140000007213000000720900000072090000007209000000720a000000da083c6d6f64756c653e01000000730e000000040104010c03080406010601140d