Draft contract change for no native billing in data streams
Problem
- A report's nativeFee amount is in ETH.
- You can pay the nativeFee with either native (msg.value) or an ERC20 token
- Paying with msg.value is a problem on chains where ETH isn't the native token. For instance, on Avalanche, because AVAX is worth several thousands of percent less than ETH,
- The nativeFee amount is tightly bound to the feed. If you wanted a nativeFee amount in say, AVAX, you would require a second feed
- Since Data Streams is only confirmed to be able to support 30 feeds (as of writing this), we can't affort to literally double our feed count so we can bill on both Avalanche and chains where ETH is native
Short term solution
- This PR contains a variation of the FeeManager contract, "FeeManagerNoNative". In this contract, we revert when msg.value != 0. Code relating to msg.value (like returning change) has been removed as well.
- This contract should only ever be deployed to chains where ETH isn't the native token
- Currently this is only Avalanche, but (for example) if we deployed to Polygon later, we'd deploy this to Polygon as well since MATIC is the native token, but if we deployed to Arbitrum, we wouldn't, since ETH is native there
I see that you haven't updated any CHANGELOG files. Would it make sense to do so?
Go solidity wrappers are out-of-date, regenerate them via the make wrappers-all command
@ad0ll could you also generate geth wrapper for this contract and commit it in this PR (core/gethwrappers/llo-feeds/generated/fee_manager_no_native/fee_manager_no_native.go)? I will need it for E2E tests
I've hardcoded the solc path for FeeManagerNoNative in this PR, but have made the compile script more generic in this one: feature/dynamic-llo-feed-solc-compile-script (https://github.com/smartcontractkit/chainlink/pull/12002)
@ad0ll I added https://github.com/smartcontractkit/chainlink/pull/11928/commits/05044ccb9658d8e16d653acf73c68b5d388bca7d with test code updates needed for new E2E tests (https://smartcontract-it.atlassian.net/browse/MERC-3499)
Quality Gate passed
Issues
0 New issues
0 Fixed issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:
#addedFor any new functionality added.#breaking_changeFor any functionality that requires manual action for the node to boot.#bugfixFor bug fixes.#changedFor any change to the existing functionality.#db_updateFor any feature that introduces updates to database schema.#deprecation_noticeFor any upcoming deprecation functionality.#internalFor changesets that need to be excluded from the final changelog.#nopsFor any feature that is NOP facing and needs to be in the official Release Notes for the release.#removedFor any functionality/config that is removed.#updatedFor any functionality that is updated.#wipFor any change that is not ready yet and external communication about it should be held off till it is feature complete.
Quality Gate passed
Issues
0 New issues
0 Fixed issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
Quality Gate passed
Issues
0 New issues
0 Fixed issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code