Comments (3)
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.
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.
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:
- 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.
- Select DEXes that are supported by SpotPriceAggregator or are forks of supported protocols. You can find this information in the
contracts/oracles/
directory. - 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;
...
- Set the environment variables in the
.env
file at the project root with appropriate values forLINEA_RPC_URL
,LINEA_PRIVATE_KEY
, andLINEA_ETHERSCAN_KEY
. - Deploy the oracles for specific protocols using the deploy script located at
deploy/commands/simple-deploy.js
. You'll need to configure thePARAMS
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 tofalse
to proceed with the deployment.
- 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. - Similar steps apply to deploying necessary wrappers (you can find it in the
contracts/wrappers/
directory). - Similar steps apply to deploying the
OffchainOracle
. For theOffchainOracle
, make sure to include the deployed oracles, wrappers and specifying the tokens you wish to use as connectors for price discovery. AfterOffchainOracle
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)
- Issue with Uniswap V3 Gas Limit Estimation HOT 1
- Add Support for Bancor Pools HOT 4
- Add Support for Curve Pools HOT 7
- Add price impact for getRate HOT 1
- Multicall contract for AVAX HOT 1
- Multicall contract for Polygon HOT 2
- How to get USD+ price? HOT 1
- Uniswap v3 (and likes) on BSC HOT 1
- RPC timeout while doing multicall on `aggregator` on local forks HOT 1
- Which price does spot-price-aggregator returns, last, ask or else? HOT 2
- getRate on BSC for EOS returns the wrong price HOT 1
- missing price HOT 1
- Why, in some cases, a spot price aggregator cannot return the price of a token with high liquidity on a well-known exchange. And another time it may return the price of a token with a liquidity of $200 HOT 11
- WETH -> wstETH pricing is inverted with wrappers enabled HOT 1
- AVAX USDT -> USDC returning wrong rate HOT 2
- [feature] Add Aerodrome Oracle on Base Chain HOT 2
- Add USDC connector to BASE HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spot-price-aggregator.