Invoking contract methods via a transaction