Expand description

Pallet used for time measurement.

It is recognised that measurements of time periods using block numbers as a timestamp is not the recommended approach due to significant time-drift over long periods of elapsed time.

This module however uses number of blocks as a time measurement (with 1 block equivalent to approximately 15 seconds) on the basis that the employee’s working time measurement segments do not present a significant calculation risk when measuring and capturing relatively small amounts of booked time. The blocktime therefore behaves similar to a stopwatch for timekeeping.

It should be noted that validators timestamp each new block with the “correct” timestamp, which can be retrieved when needed to provide time analysis for accounting entries.


pub use __tt_default_parts_6 as tt_default_parts;



Contains one variant per dispatchable that can be called by an extrinsic.

Custom dispatch errors of this pallet.

The event emitted by this pallet.


Configuration trait of this pallet.

Type Definitions


Type alias to Pallet, to be used by construct_runtime.

List of all workers (team) booking time on the project. Used mainly by the Project owner, but other workers can be seen. The two here will logically replace the above two storage items, however as much of the code is dependent on the status. There will have to be a re-write.

All the time records for a given project.

ARCHIVE Experimental! May go somewhere else in future.

Project worker can be banned by project owner.

Simple getter to associate time record to owner.

This records the amount of blocks per address, per project, per entry. Start block number can be calculated. Only accepted if an end block number is given in the transaction as this is the “service rendered” date for accounting purposes.

Overall hours worked on all projects for a given address for all projects.

This stores the total number of blocks (blocktime) for a given project. It collates all time by all team members.

This records the total amount of blocks booked per address (worker), per project. It records the first seen block which indicates when the project worker first worked on the project It also records the total time (number of blocks) for that address.

Project owner sends project ref to worker address (AccountId is the Worker). Note: Currently unbounded Vec!

Accepted Status is true/false.

Time Record Hashes created by submitter.

ARCHIVE Experimental! May go somewhere else in future.