Exemplo n.º 1
0
 def get_call_params(self, computation: BaseComputation) -> CallParams:
     call_params = super().get_call_params(computation)
     value = call_params[1]
     if computation.msg.is_static and value != 0:
         raise WriteProtection(
             "Cannot modify state while inside of a STATICCALL context")
     return call_params
Exemplo n.º 2
0
 def inner(computation: BaseComputation) -> Callable[..., Any]:
     if computation.msg.is_static:
         raise WriteProtection(
             "Cannot modify state while inside of a STATICCALL context")
     return opcode_fn(computation)
Exemplo n.º 3
0
 def __call__(self, computation: ComputationAPI) -> None:
     if computation.msg.is_static:
         raise WriteProtection(
             "Cannot modify state while inside of a STATICCALL context")
     return super().__call__(computation)
Exemplo n.º 4
0
 def inner(computation):
     if computation.msg.is_static:
         raise WriteProtection(
             "Cannot modify state while inside of a STATICCALL context")
     return opcode_fn(computation)