@storknetwork/stork_chainlink_adapter

1.0.4 • Public • Published

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

  1. Install the Stork Chainlink Adapter npm package in your project
npm i @storknetwork/stork_chainlink_adapter
  1. Import the Stork Chainlink Adapter contract into your solidity contract using:
import "@storknetwork/stork_chainlink_adapter/contracts/StorkChainlinkAdapter.sol";
  1. 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

  1. update the package.json version
  2. npm login
  3. npm publish --access public

/@storknetwork/stork_chainlink_adapter/

    Package Sidebar

    Install

    npm i @storknetwork/stork_chainlink_adapter

    Weekly Downloads

    3

    Version

    1.0.4

    License

    Apache-2.0

    Unpacked Size

    5.03 kB

    Total Files

    3

    Last publish

    Collaborators

    • storknetwork
    • aaron-stork