stellar / rs-soroban-env

Rust environment for Soroban contracts.
Apache License 2.0
60 stars 40 forks source link

Bug #1178 - use Timepoint on get_ledger_timestamp #1282

Open graydon opened 9 months ago

graydon commented 9 months ago

Fixes #1178

This would be an env-breaking change if we do later. But it's also not super important? We can paper it over in the SDK or ship a different function in the future.

graydon commented 9 months ago

(Discussed with @leighmcculloch and decided this won't make it this time around, so maybe never, who knows)

leighmcculloch commented 8 months ago

(Discussed with @leighmcculloch and decided this won't make it this time around, so maybe never, who knows)

Sorry, I don't remember this. We must have been past the point where we were changing the API.

This relates to:

Can this PR be repurposed to adding a new host function that returns Timepoint? After it is released in the next protocol we can update the SDK to return Timepoint too.

Without this change Timepoint is hard to adopt since much of the time folks operate on "now" and modifications of now, and ledger close time is the closest thing to now that contract developers have.