(source, body_char_start_idx)
| 22 | def insert_contract(entry_point: str, code: str, contract: str): |
| 23 | # why is this so complicated? because the contract might be mis-indented... |
| 24 | def get_first_indent_size(source, body_char_start_idx): |
| 25 | assert source.strip() |
| 26 | indent_size = 0 |
| 27 | while source[body_char_start_idx - indent_size - 1] == " ": |
| 28 | indent_size += 1 |
| 29 | return indent_size |
| 30 | |
| 31 | code = code.replace("\t", " " * 4) |
| 32 | contract = contract.replace("\t", " " * 4) |
no outgoing calls
no test coverage detected
searching dependent graphs…