2 releases
0.1.1 | Jan 28, 2025 |
---|---|
0.1.0 | Jan 28, 2025 |
#823 in Magic Beans
202 downloads per month
36KB
805 lines
Stork Cosmwasm Contract
This is the Stork CosmWasm compatible contract. This crate is maintained by Stork Labs.
It is available on crates.io.
This crate can be used as an SDK to build contracts that interact with the Stork Contract by including it as a depency and enabling the library
feature.
Pull Model
The Stork Cosmwasm Contract allows users to consume Stork price updates on a pull basis. This puts the responsibility of submitting the price updates on-chain to the user whenever they want to interact with an app that consumes Stork price feeds. Stork Labs maintains a Chain Pusher in order to do this.
Stork Feeds
On CosmWasm, Stork feeds exist inside a table stored on-chain. This table associates a given encoded asset id (keccak256 of the plaintext asset id) with a TemporalNumericValue
instance.
Sylvia
This contract is built using the Sylvia Framework. This heavily reduces the amount of boilerplate needed to create a CosmWasm contract while remaining fully compatible with the CosmWasm SDK. This generates the sv
and entry_points
modules, in the contract
module.
Examples of using this crate as an SDK in both Sylvia and Non-Sylvia contracts to consume Stork data can be found in the stork-external github repo.
Dependencies
~7–11MB
~210K SLoC