@storknetwork/stork_chainlink_adapter
v1.0.4
Published
Solidity Contracts to get Stork data on chain in the same format as Chainlink
Downloads
131
Readme
Stork Chainlink Adapter
This contract is a light wrapper around the Stork EVM contract which conforms to Chainlink's AggregatorV3Interface.
Integrate with Your Solidity Contracts
- Install the Stork Chainlink Adapter npm package in your project
npm i @storknetwork/stork_chainlink_adapter
- Import the Stork Chainlink Adapter contract into your solidity contract using:
import "@storknetwork/stork_chainlink_adapter/contracts/StorkChainlinkAdapter.sol";
- Create one StorkChainlinkAdapter for each asset whose price you want to track. This object takes in the contract address of Stork's contract on this chain, and the bytes32-formatted price id for this asset:
storkChainlinkAdapter = new StorkChainlinkAdapter(storkContract, priceId);
You can see a simple working example of a Solidity contract using this here.
Publish to npm
- update the package.json version
npm login
npm publish --access public