Skip to content
  • Alexander Theißen's avatar
    Allow to distinguish out of gas from other traps (#4883) · b999911b
    Alexander Theißen authored
    * contracts: Allow to distinguish out of gas from other traps
    
    When a contract encounters a runtime error a wasm trap is
    triggered and the execution is halted. Currently, no matter
    what was the cause for the trap it is always reported as:
    DispatchError::Other("contract trapped during execution").
    
    However, the trap that is triggered if a contract exhausts
    its gas budget is particulary interesting. Therefore we add
    a seperate error message for this cause:
    DispatchError::Other("ran out of gas during contract execution").
    
    A test is added hat executes a contract that never terminates.
    Therefore it always exhausts is gas budget.
    
    * fixup! contracts: Allow to distinguish out of gas from other traps
    
    Remove overlong lines.
    
    * fixup! contracts: Allow to distinguish out of gas from other traps
    
    Rename Contract to Contracts
    b999911b