EVM
Programming API reference for the Stork EVM contract.
SDK
Getting Started
// YourContract.sol
contract YourContract {
IStork public stork;
// ...
constructor (address _stork /*, ...*/) {
stork = IStork(_stork);
// ...
}
//...
}
// example: include getTemporalNumericValueUnsafeV1
interface IStork {
function getTemporalNumericValueUnsafeV1(
bytes32 id
) external view returns (StorkStructs.TemporalNumericValue memory value);
}
contract StorkStructs {
struct TemporalNumericValue {
// slot 1
// nanosecond level precision timestamp of latest publisher update in batch
uint64 timestampNs; // 8 bytes
// should be able to hold all necessary numbers (up to 6277101735386680763835789423207666416102355444464034512895)
int192 quantizedValue; // 8 bytes
}
}Concepts
Upgradeability
Methods
Initialize Stork
Update Temporal Numeric Values V1
Get Temporal Numeric Value V1
Get Temporal Numeric Value Unsafe V1
Get Update Fee V1
Verify Publisher Signatures V1
Version
Update Valid Time Period Seconds
Update Single Update Fee in Wei
Update Stork Public Key
Examples
Last updated