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
Multi-OffRamp - per-chain configs #761
Conversation
I see you updated files related to |
I see you updated files related to |
|
||
import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; | ||
|
||
contract EVM2EVMMultiOffRampSetup is TokenSetup, PriceRegistrySetup, OCR2BaseSetup { |
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.
note: mostly a copy of EVM2EVMOffRampSetup
/// @param encodedSourceTokenData Array of token data returned by token pools on the source chain. | ||
/// @param offchainTokenData Array of token data fetched offchain by the DON. | ||
/// @dev This function wrappes the token pool call in a try catch block to gracefully handle | ||
/// any non-rate limiting errors that may occur. If we encounter a rate limiting related error | ||
/// we bubble it up. If we encounter a non-rate limiting error we wrap it in a TokenHandlingError. | ||
function _releaseOrMintTokens( | ||
Client.EVMTokenAmount[] memory sourceTokenAmounts, | ||
bytes memory originalSender, |
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.
note: hitting the stack depth limit - using struct instead
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.
add a todo for this here; Pool interface will likely chance, currently being worked on by Rens, that might impact stack depth again
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.
Added
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 pulled in the new changes. Stack depth issues are still present, so we will have to go with the struct
LCOV of commit
|
// already has roots committed. | ||
// if (ICommitStore(staticConfig.commitStore).getExpectedNextSequenceNumber() != 1) revert CommitStoreAlreadyInUse(); | ||
|
||
// TODO: confirm if re-updating is allowed |
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.
Note: out-of-scope for this PR
bfc9a69
to
51edea2
Compare
Go solidity wrappers are out-of-date, regenerate them via the |
51edea2
to
2318faa
Compare
46d896d
to
cadf65f
Compare
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.
overall LGTM, please address @RayXpub's lints above; can do a followup PR once the per-lane v.s per-chain convo resolves
address armProxy; // ARM proxy address | ||
} | ||
|
||
/// @notice Per-chain source config (defining a lane from a Source Chain -> Dest OffRamp) | ||
struct SourceChainConfig { | ||
bool isEnabled; // ─────────╮ Flag whether the source chain is enabled or not |
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.
quick note, when it comes to it, isEnabled
should be moved to same slot as onRamp
, given prevOffRamp
isnt always read
Motivation
Implements per-chain source configs in the MultiOffRamp, which allows an OffRamp to support more than one source configuration
Solution
Modifies the MultiOffRamp configs to be per-chain, along with getters and setters. Puts TODOs for execution and other functional parts
Focus: The focus of the PR are the source config state, event, set/get and constructor changes
Out of scope for this PR: