Elysium · price age · 59 / 60 / 61
Freshness tests for Elysium contracts.
See how your code handles late oracle prices before deployment.
… checked push feeds on Elysiumblock …gaps from their AnswerUpdated events over about a day
A price that is 60 seconds old is either fine or stale. Your contract decides which, one character at a time.
<= or <. updatedAt or startedAt. Unit tests with a mock feed rarely land on the exact second. Astrow does, on purpose, against the feed you will actually read.
Three ages, one block. Your read function at max-1, max and max+1 seconds of data age, on live chain state.
Deployed or not yet
Point at an address, or paste a forge artifact: the creation code runs inside the same eth_call, so nothing gets deployed to test it.
Real feeds
The source is a push feed on Elysium with its real updatedAt; only the block time is moved.
Off-by-one in plain sight
Each case says what the rule expects, what the contract did and the revert it gave.
Two reference contracts, one character apart (<= against <). Press one.
Every version on the log. AstrowVersionLog keeps each run against the code hash it ran on, and flags a regression when a new version changes the verdict.
Checked where it can be
Code hash, feed stamp, block range and the expected verdicts are checked by the contract itself.
Repeatable
A report hash goes on chain. Anyone can repeat the calls at that block and attest whether they saw the same.
No money in it
No fee, no admin, no funds held. A suite belongs to whoever opened it.
Not deployed on Elysium yet. The counters below appear from its events once it is; nothing is shown until then.
Open the version log →Know the feed you read. Update gaps per feed, from events: how often a 60-second rule would refuse data that is simply waiting for its next update.
Median, p90, longest
Gap statistics per feed over about a day of blocks.
Time past the limit
The share of time a feed sat beyond 60 seconds.
Same data as the API
/api/feeds returns exactly what the page shows.
Reading feeds…
One file in your pipeline. Exit code 1 when the boundary differs from the rule.
# forge build first; the artifact runs undeployed (creation code + constructor args) node tools/astrow-check.mjs \ --artifact out/MyVault.sol/MyVault.json \ --args $(cast abi-encode 'f(address,uint256)' 0xa3659c451c9e40d8869341ffd5fe296de24c0373 60) \ --call "readPrice()" --max-age 60 # exit 0 = follows the rule · 1 = differs at some age · 2 = could not run
Pick code and rule
An address or an artifact, a read function, a max age, inclusive or strict.
Run three ages
eth_call at one block with the time set to updatedAt + 59, 60, 61 (for 60 s).
Keep the verdict
Record it per code hash; the next version is compared with this one.