diff --git a/contracts/avs/.gas-snapshot b/contracts/avs/.gas-snapshot index 40e416307..cc13a430b 100644 --- a/contracts/avs/.gas-snapshot +++ b/contracts/avs/.gas-snapshot @@ -1,9 +1,9 @@ OmniAVS_admin_Test:test_avsDirectory_succeeds() (gas: 17892) -OmniAVS_admin_Test:test_ejectOwner_byOwner_succeeds() (gas: 433687) +OmniAVS_admin_Test:test_ejectOwner_byOwner_succeeds() (gas: 435687) OmniAVS_admin_Test:test_ejectOwner_notOwner_reverts() (gas: 107965) OmniAVS_admin_Test:test_getOPeratorRestakedStrategies_notOperator_succeeds() (gas: 108732) -OmniAVS_admin_Test:test_getOperatorRestakedStrategies_noStrategies_succeeds() (gas: 516711) -OmniAVS_admin_Test:test_getOperatorRestakedStrategies_succeeds() (gas: 581706) +OmniAVS_admin_Test:test_getOperatorRestakedStrategies_noStrategies_succeeds() (gas: 519211) +OmniAVS_admin_Test:test_getOperatorRestakedStrategies_succeeds() (gas: 584206) OmniAVS_admin_Test:test_getRestakeableStrategies_noStrategies_succeeds() (gas: 27757) OmniAVS_admin_Test:test_getRestakeableStrategies_succeeds() (gas: 90719) OmniAVS_admin_Test:test_pause_byOwner_succeeds() (gas: 45167) @@ -40,21 +40,21 @@ OmniAVS_allowlist_Test:test_disableAllowlist_succeeds() (gas: 29389) OmniAVS_allowlist_Test:test_enableAllowlist_alreadyEnabled_reverts() (gas: 26027) OmniAVS_allowlist_Test:test_enableAllowlist_notOwner_reverts() (gas: 17844) OmniAVS_allowlist_Test:test_enableAllowlist_succeeds() (gas: 29831) -OmniAVS_allowlist_Test:test_registerOperator_allowlistDisabled_succeeds() (gas: 519995) +OmniAVS_allowlist_Test:test_registerOperator_allowlistDisabled_succeeds() (gas: 522495) OmniAVS_allowlist_Test:test_registerOperator_invalidPubkey_reverts() (gas: 314771) OmniAVS_allowlist_Test:test_registerOperator_nowAllowed_reverts() (gas: 117028) -OmniAVS_allowlist_Test:test_registerOperator_succeeds() (gas: 538434) -OmniAVS_allowlist_Test:test_registerOperator_succeeds() (gas: 540287) +OmniAVS_allowlist_Test:test_registerOperator_succeeds() (gas: 540934) +OmniAVS_allowlist_Test:test_registerOperator_succeeds() (gas: 542787) OmniAVS_allowlist_Test:test_registerOperator_wrongPubkey_reverts() (gas: 404418) OmniAVS_allowlist_Test:test_removeFromAllowlist_notOwner_reverts() (gas: 107967) OmniAVS_allowlist_Test:test_removeFromAllowlist_succeeds() (gas: 242142) OmniAVS_canRegister_Test:test_canRegister_allowed() (gas: 331230) OmniAVS_canRegister_Test:test_canRegister_allowlistDisabled() (gas: 311203) -OmniAVS_canRegister_Test:test_canRegister_alreadyRegistered() (gas: 522800) +OmniAVS_canRegister_Test:test_canRegister_alreadyRegistered() (gas: 525300) OmniAVS_canRegister_Test:test_canRegister_maxOperatorsReached() (gas: 265051) OmniAVS_canRegister_Test:test_canRegister_minStakeNotMet() (gas: 331770) OmniAVS_canRegister_Test:test_canRegister_notAllowed() (gas: 225880) OmniAVS_canRegister_Test:test_canRegister_notOperator() (gas: 120672) OmniAVS_initialize_Test:test_initialize_defaultParams_succeeds() (gas: 3596420) -OmniAVS_syncWithOmni_Test:test_depositBeaconEth_succeeds() (gas: 635740) -OmniAVS_syncWithOmni_Test:test_unsupportedStrategyDeposit_succeeds() (gas: 1675178) \ No newline at end of file +OmniAVS_syncWithOmni_Test:test_depositBeaconEth_succeeds() (gas: 638274) +OmniAVS_syncWithOmni_Test:test_unsupportedStrategyDeposit_succeeds() (gas: 1677678) \ No newline at end of file diff --git a/contracts/core/.gas-snapshot b/contracts/core/.gas-snapshot index b8d77d30b..521f6754f 100644 --- a/contracts/core/.gas-snapshot +++ b/contracts/core/.gas-snapshot @@ -3,7 +3,7 @@ Admin_Test:test_pause_unpause_bridge() (gas: 25710460) Admin_Test:test_pause_unpause_xcall() (gas: 30634703) Admin_Test:test_pause_unpause_xsubmit() (gas: 30634454) Admin_Test:test_upgrade() (gas: 34715948) -AllocPredeploys_Test:test_num_allocs() (gas: 1181364529) +AllocPredeploys_Test:test_num_allocs() (gas: 1181319043) AllocPredeploys_Test:test_predeploys() (gas: 1181300853) AllocPredeploys_Test:test_preinstalls() (gas: 1182017269) AllocPredeploys_Test:test_proxies() (gas: 1408944070) diff --git a/lib/contracts/feeoraclev2/feeparams.go b/lib/contracts/feeoraclev2/feeparams.go index ffc8273b2..655e118fd 100644 --- a/lib/contracts/feeoraclev2/feeparams.go +++ b/lib/contracts/feeoraclev2/feeparams.go @@ -78,8 +78,8 @@ func destFeeParams(ctx context.Context, srcChain evmchain.Metadata, destChain ev return bindings.IFeeOracleV2FeeParams{ ChainId: destChain.ChainID, - ExecGasPrice: withGasPriceShield(float64(execGasPrice.Uint64())), - DataGasPrice: withGasPriceShield(float64(dataGasPrice.Uint64())), + ExecGasPrice: withGasPriceOffset(execGasPrice.Uint64()), + DataGasPrice: withGasPriceOffset(dataGasPrice.Uint64()), ToNativeRate: rateToNumerator(toNativeRate), }, nil } @@ -126,7 +126,8 @@ func rateToNumerator(r float64) uint64 { return norm } -// withGasPriceShield returns the gas price with an added xfeemngr.GasPriceShield pct offset. -func withGasPriceShield(gasPrice float64) uint64 { - return uint64(gasPrice + (xfeemngr.GasPriceShield * gasPrice)) +// withGasPriceOffset returns the gas price with an added xfeemngr.GasPriceShield pct offset. +func withGasPriceOffset(gasPrice uint64) uint64 { + gasPriceF := float64(gasPrice) + return uint64(gasPriceF + (xfeemngr.GasPriceBufferOffset * gasPriceF)) }