This contract is a light wrapper around the Stork EVM contract which conforms to Chainlink's AggregatorV3Interface.
- 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.
- update the package.json version
npm login
npm publish --access public