Executes an asynchronous or synchronous task on the chain, updating the chain's data with the result value