Skip to content

[FR] - Tooling for slot - unixtime conversion #4928

@nielstron

Description

@nielstron

Internal/External
External

Area
Plutus

Describe the feature you'd like
There is currently only external tooling for converting between unixtime and slot time. This is a nuisance because

  • Plutus works with Unix timestamps
  • building a transaction with the CLI expects invalid-hereafter and invalid-before in slots
  • native scripts work with slots

A simple command to convert between the two, given the network, would help a lot.

Describe alternatives you've considered
An alternative is adding a invalid-hereafter-unixtimestamp-ish flag to transaction build, but it is not nearly as widely applicable
(for example tools may want to check what unix time a specific slot returned by the CLI corresponds to)

Additional context / screenshots
This would also be useful to be able to convert between native scripts and plutus scripts, see this comment: cardano-foundation/CIPs#392 (comment)

Metadata

Metadata

Assignees

Labels

type: enhancementAn improvement on the existing functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions