-
Notifications
You must be signed in to change notification settings - Fork 324
Add Copper EA #3991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Copper EA #3991
Conversation
🦋 Changeset detectedLatest commit: 0eff9cd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
ETHEREUM_RPC_URL: { | ||
description: 'RPC url of Ethereum node', | ||
type: 'string', | ||
default: '', | ||
}, | ||
ETHEREUM_RPC_CHAIN_ID: { | ||
description: 'Ethereum chain id', | ||
type: 'number', | ||
default: 1, | ||
}, | ||
ARBITRUM_RPC_URL: { | ||
description: 'RPC url of Arbitrum node', | ||
type: 'string', | ||
default: '', | ||
}, | ||
ARBITRUM_RPC_CHAIN_ID: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need both Eth and Arbi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using arbitrum for USDT, USDC, SOl and ETH.
USTB is available only on Ethereum.
However, what is the thumb rule of using a price feed? Which chain do we prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say just use Ethereum for everything then
if (param.currencies && param.currencies.length > 0) { | ||
parameters.currencies = param.currencies.join(',') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required? Can they just dump all currency to us in a portfolio?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a new token is added to the portfolio, the jobspec input parameter must be configured to include the appropriate priceOracle value. This ensures that we only process currencies for which price oracles have been set up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right but the jobSpec already contains them under the token field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote a piece that does toUSD conversion via feeds here: https://github.com/smartcontractkit/external-adapters-js/pull/4001/files#diff-b055dd5883b7d442ff66fab11e1b72a8c60be605839d13b94e4f65323e11ec6aR13
Wonder if your EA should simply reference my EA or vice versa?
Eventually we do want to swap into the streams solution
ETHEREUM_RPC_URL: { | ||
description: 'RPC url of Ethereum node', | ||
type: 'string', | ||
default: '', | ||
}, | ||
ETHEREUM_RPC_CHAIN_ID: { | ||
description: 'Ethereum chain id', | ||
type: 'number', | ||
default: 1, | ||
}, | ||
ARBITRUM_RPC_URL: { | ||
description: 'RPC url of Arbitrum node', | ||
type: 'string', | ||
default: '', | ||
}, | ||
ARBITRUM_RPC_CHAIN_ID: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using arbitrum for USDT, USDC, SOl and ETH.
USTB is available only on Ethereum.
However, what is the thumb rule of using a price feed? Which chain do we prefer?
) | ||
} | ||
|
||
// if (adapterSettings.ETHEREUM_RPC_URL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed these comments
if (param.currencies && param.currencies.length > 0) { | ||
parameters.currencies = param.currencies.join(',') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a new token is added to the portfolio, the jobspec input parameter must be configured to include the appropriate priceOracle value. This ensures that we only process currencies for which price oracles have been set up
I dont understand the ask here. |
I think I understand. |
No, I mean to re-use code that does token to USD calculation, we do want to use a single EA eventually once we switch to streams |
Closes #OPDATA-3656
Description
This PR adds Copper EA as one of the EA to complete the solstice PoR endpoint.
......
Changes
wallets
endpointNB: I did not add a changeset and test is scrappy
Steps to Test
yarn test packages/source/copper/test
Quality Assurance
infra-k8s
configuration file.adapter-secrets
configuration file or update the soak testing blacklist.test-payload.json
file with relevant requests.feature/x
,chore/x
,release/x
,hotfix/x
,fix/x
) or is created from Jira.