Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add getBlockTimestamp and getBlockHeight #61

Closed
eyalorbs opened this issue Dec 24, 2018 · 2 comments
Closed

add getBlockTimestamp and getBlockHeight #61

eyalorbs opened this issue Dec 24, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@eyalorbs
Copy link

In many cases it is necessary to know the block timestamp and height and it would be very helpful to add those functions

@EsterEdelstein
Copy link
Contributor

Suggestion to add 2 commands:

  • get-last-block - returners the height of the last block that was committed to the virtual chain . type- (uint).

  • get-block-timestamp- returns the time stamp of the last block that was committed to the virtual chain . (uint): block timestamp as seconds since unix epoch .

This 2 commands should work with the option of -env and with orbs-gamma-config.json file

@EsterEdelstein EsterEdelstein added gamma Gamma - local ORBS blockchain Improvements enhancement New feature or request and removed Improvements labels Dec 24, 2018
@talkol talkol removed the gamma Gamma - local ORBS blockchain label Jan 1, 2019
@talkol
Copy link
Member

talkol commented Jan 1, 2019

I'm pretty sure he didn't mean for gamma-cli, but for the contract SDK itself - meaning add SDK methods to allow to get these values from within running contracts

Closed in 45ff006

@talkol talkol closed this as completed Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants