Skip to content

Commit

Permalink
cleaner docs
Browse files Browse the repository at this point in the history
  • Loading branch information
asoliman92 committed Jul 10, 2024
1 parent fffb568 commit c8b8be3
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions core/services/ocr3/plugins/ccip_integration_tests/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ func setupInitialConfigs(
if destChainID == sourceChainID {
continue
}

//===============================OnRamp=====================================
onrampDestChainConfigArgs = append(onrampDestChainConfigArgs, evm_2_evm_multi_onramp.EVM2EVMMultiOnRampDestChainConfigArgs{
DestChainSelector: destChainID,
DynamicConfig: defaultOnRampDynamicConfig(t),
Expand All @@ -244,12 +246,24 @@ func setupInitialConfigs(
remoteUni, ok := universes[destChainID]
require.Truef(t, ok, "could not find universe for chain id %d", destChainID)

//================================OffRamp====================================
offrampSourceChainConfigArgs = append(offrampSourceChainConfigArgs, evm_2_evm_multi_offramp.EVM2EVMMultiOffRampSourceChainConfigArgs{
SourceChainSelector: destChainID, // for each destination chain, add a source chain config
IsEnabled: true,
OnRamp: remoteUni.onramp.Address().Bytes(),
})

//==================================Router==================================
routerOnrampUpdates = append(routerOnrampUpdates, router.RouterOnRamp{
DestChainSelector: destChainID,
OnRamp: remoteUni.onramp.Address(),
})
routerOfframpUpdates = append(routerOfframpUpdates, router.RouterOffRamp{
SourceChainSelector: destChainID,
OffRamp: remoteUni.offramp.Address(),
})

//==============================premiumMultiplier======================================
// This multiplier is used to calculate the premium/fees
// Some tokens like LINK will have a discounted fee
premiumMultiplierWeiPerEthUpdatesArgs = append(premiumMultiplierWeiPerEthUpdatesArgs,
Expand All @@ -263,15 +277,7 @@ func setupInitialConfigs(
},
)

routerOnrampUpdates = append(routerOnrampUpdates, router.RouterOnRamp{
DestChainSelector: destChainID,
OnRamp: remoteUni.onramp.Address(),
})
routerOfframpUpdates = append(routerOfframpUpdates, router.RouterOffRamp{
SourceChainSelector: destChainID,
OffRamp: remoteUni.offramp.Address(),
})

//===============================PriceRegistry=====================================
priceUpdates.GasPriceUpdates = append(priceUpdates.GasPriceUpdates,
price_registry.InternalGasPriceUpdate{
DestChainSelector: destChainID,
Expand Down

0 comments on commit c8b8be3

Please sign in to comment.