@fubuloubu how do you feel about forcing each branch of an if statement to have the same effect type? Take for instance the following example
def foo (x: num) : if x < 2 : x = 2 # modifies locally scoped variable, call it the 'locally scoped mutation effect' elif x < 10 : self.balances[self.owner] = x # modifies contract state, call it the 'contract mutation effect' elif x < 15 : return 1 # exits the function, call it the 'control flow effect' else : raw_call(stuff) # calls to external address, call it the 'external call effect' return 0
Each branch has fundamentally different properties which you might want to segregate. If you forced each branch to have the same kind of effect, it might be easier to perform certain kinds of analysis on these blocks.
decimalin its constructor, but I can't work out how the heck to pass a literal using
web3.py. I've unsuccessfully tried literals of the form:
1/2... Is this not yet possible? (I found this: ethereum/EIPs#598)
Decimaltype, with no luck)