Giter Club home page Giter Club logo

Comments (3)

zZoMROT avatar zZoMROT commented on May 31, 2024

Hello JP,

Thank you for your interest in our library and for your suggestion.

At this moment, we do not have plans to add support for Linea prices primarily because the aggregator we are developing this for, 1inch, does not support this network. However, we understand that the oracles could be beneficial for users beyond the functionalities of 1inch.

Should there be a necessity for Linea support, you have the option to deploy the relevant oracles in that network yourself. Dodo and Kyber are good candidates for this task, and considering many DEXs in the Linea network are likely forks of Uniswap, the integration process should be relatively straightforward.

We are always open to feedback and willing to offer advice on deploying an oracle in any network if needed.

from spot-price-aggregator.

jpsains avatar jpsains commented on May 31, 2024

Hey @zZoMROT,

Can I take you up on that offer of advice on deploying an oracle please.

What is the process?

from spot-price-aggregator.

zZoMROT avatar zZoMROT commented on May 31, 2024

Of course, I'd be glad to delve deeper into the advice on deploying an oracle. Here's a more detailed guide, including the nuances of script parameters and additional setup steps:

  1. Start by surveying the network for DEXes that offer sufficient liquidity. This is crucial for ensuring that the oracle can retrieve reliable and accurate price data.
  2. Select DEXes that are supported by SpotPriceAggregator or are forks of supported protocols. You can find this information in the contracts/oracles/ directory.
  3. Configure the network in the Hardhat settings file. Utilize the Networks class from solidity-utils to register a new network. Here’s an example using the Hardhat configuration (I'm not entirely sure, but you might need to use the registerCustom method there):
...
const { Networks } = require('@1inch/solidity-utils/hardhat-setup');
const net = new Networks(true, 'mainnet', true);
net.register('linea', networkId, process.env.LINEA_RPC_URL, process.env.LINEA_PRIVATE_KEY, 'linea', process.env.LINEA_ETHERSCAN_KEY);
const networks = net.networks;
const etherscan = net.etherscan;
...
  1. Set the environment variables in the .env file at the project root with appropriate values for LINEA_RPC_URL, LINEA_PRIVATE_KEY, and LINEA_ETHERSCAN_KEY.
  2. Deploy the oracles for specific protocols using the deploy script located at deploy/commands/simple-deploy.js. You'll need to configure the PARAMS object for each protocol you wish to deploy an oracle for. The parameters include:
  • contractName: Name of the contract from the contracts/oracles/ directory.

  • args: Arguments required by the contract (See contract's constructor).

  • deploymentName: A name for your deployment, which will be used to create a file in the deployments/ directory.

    Before running the deploy script, ensure the skip flag is set to false to proceed with the deployment.

  1. Execute the deployment script with yarn && yarn deploy linea. This command compiles your contracts, deploys them to the specified network, and saves the deployment information.
  2. Similar steps apply to deploying necessary wrappers (you can find it in the contracts/wrappers/ directory).
  3. Similar steps apply to deploying the OffchainOracle. For the OffchainOracle, make sure to include the deployed oracles, wrappers and specifying the tokens you wish to use as connectors for price discovery. After OffchainOracle is deployed, it will be possible to edit these lists.

If you have any questions or need further assistance, feel free to ask!

from spot-price-aggregator.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.