Skip to content
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

FE Release 2024-04-11 #2488

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/synapse-interface/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.16.4](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.16.3...@synapsecns/synapse-interface@0.16.4) (2024-04-11)

**Note:** Version bump only for package @synapsecns/synapse-interface





Comment on lines +10 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reduce the number of consecutive blank lines to maintain Markdown best practices.

- 
- 
- 
- 

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change

## [0.16.3](https://github.com/synapsecns/sanguine/compare/@synapsecns/synapse-interface@0.16.2...@synapsecns/synapse-interface@0.16.3) (2024-04-11)

**Note:** Version bump only for package @synapsecns/synapse-interface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useBridgeState } from '@/slices/bridge/hooks'
import { useIntervalTimer } from '@/utils/hooks/useIntervalTimer'
import { OPTIMISM, BASE, BLAST } from '@/constants/chains/master'
import { OPTIMISM, BASE, BLAST, METIS } from '@/constants/chains/master'
import {
useEventCountdownProgressBar,
getCountdownTimeStatus,
Expand All @@ -16,11 +16,11 @@ import { WarningMessage } from '../../../Warning'
*/

/** Banner start time */
const MAINTENANCE_BANNERS_START = new Date(Date.UTC(2024, 2, 20, 20, 20, 0))
const MAINTENANCE_BANNERS_START = new Date(Date.UTC(2024, 3, 11, 0, 0, 0))
/** Countdown Progress Bar, Bridge Warning Message + Bridge Pause start time */
const MAINTENANCE_START_DATE = new Date(Date.UTC(2024, 2, 20, 20, 20, 0))
const MAINTENANCE_START_DATE = new Date(Date.UTC(2024, 3, 11, 0, 0, 0))
/** Ends Banner, Countdown Progress Bar, Bridge Warning Message, Bridge Pause */
const MAINTENANCE_END_DATE = new Date(Date.UTC(2024, 2, 20, 20, 20, 0))
const MAINTENANCE_END_DATE = new Date(Date.UTC(2025, 3, 20, 20, 20, 0))

export const MaintenanceBanner = () => {
const { isComplete } = getCountdownTimeStatus(
Expand All @@ -35,7 +35,7 @@ export const MaintenanceBanner = () => {
bannerId="03262024-pause-blast-banner"
bannerContents={
<>
<p className="m-auto">Bridging on Blast is temporarily paused.</p>
<p className="m-auto">Bridging on Metis is temporarily paused.</p>
</>
}
startDate={MAINTENANCE_BANNERS_START}
Expand All @@ -49,7 +49,7 @@ export const MaintenanceWarningMessage = () => {

const isWarningChain = isChainIncluded(
[fromChainId, toChainId],
[BLAST.id] // Update for Chains to show warning on
[METIS.id] // Update for Chains to show warning on
)

const { isComplete } = getCountdownTimeStatus(
Expand All @@ -64,7 +64,7 @@ export const MaintenanceWarningMessage = () => {
<WarningMessage
message={
<>
<p>Bridging on Blast is temporarily paused.</p>
<p>Bridging on Metis is temporarily paused.</p>
</>
}
/>
Expand All @@ -79,14 +79,14 @@ export const useMaintenanceCountdownProgress = () => {

const isCurrentChain = isChainIncluded(
[fromChainId, toChainId],
[BLAST.id] // Update for Chains to show maintenance on
[METIS.id] // Update for Chains to show maintenance on
)

const {
isPending: isMaintenancePending,
EventCountdownProgressBar: MaintenanceCountdownProgressBar,
} = useEventCountdownProgressBar(
'Bridging on Blast paused.',
'Bridging on METIS paused.',
MAINTENANCE_START_DATE, // Countdown Bar will automatically appear after start time
MAINTENANCE_END_DATE // Countdown Bar will automatically disappear when end time is reached
)
Expand Down
2 changes: 1 addition & 1 deletion packages/synapse-interface/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@synapsecns/synapse-interface",
"version": "0.16.3",
"version": "0.16.4",
"private": true,
"engines": {
"node": ">=18.17.0"
Expand Down
12 changes: 0 additions & 12 deletions sin-executor/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ type Config struct {
type ChainConfig struct {
// ChainID is the chain ID.
ChainID int `yaml:"id"`
// GasBuffer is the gas buffer to use on top of the requested gas limit.
GasBuffer uint64 `yaml:"gas_buffer"`
// ExecutionService is the address of the execution service contract.
ExecutionService string `yaml:"execution_service"`
// Client is the address of the interchain client contract.
Expand All @@ -37,13 +35,3 @@ type DatabaseConfig struct {
Type string `yaml:"type"`
DSN string `yaml:"dsn"` // Data Source Name
}

const defaultGasBuffer = 1_000_000

// GetGasBuffer returns the configured gas buffer for the chain.
func (c ChainConfig) GetGasBuffer() uint64 {
if c.GasBuffer == 0 {
return defaultGasBuffer
}
return c.GasBuffer
}
7 changes: 0 additions & 7 deletions sin-executor/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type Executor struct {
cfg config.Config
chainListeners map[int]listener.ContractListener
clientContracts map[int]*interchainclient.InterchainClientRef
gasBuffers map[int]uint64
}

// NewExecutor creates a new executor.
Expand All @@ -64,7 +63,6 @@ func NewExecutor(ctx context.Context, handler metrics.Handler, cfg config.Config

executor.chainListeners = make(map[int]listener.ContractListener)
executor.clientContracts = make(map[int]*interchainclient.InterchainClientRef)
executor.gasBuffers = make(map[int]uint64)

for _, chainCfg := range cfg.Chains {
executionService := common.HexToAddress(chainCfg.ExecutionService)
Expand All @@ -90,8 +88,6 @@ func NewExecutor(ctx context.Context, handler metrics.Handler, cfg config.Config
if err != nil {
return nil, fmt.Errorf("could not get synapse module ref: %w", err)
}

executor.gasBuffers[chainCfg.ChainID] = chainCfg.GetGasBuffer()
}

executor.signer, err = signerConfig.SignerFromConfig(ctx, cfg.Signer)
Expand Down Expand Up @@ -180,11 +176,8 @@ func (e *Executor) executeTransaction(ctx context.Context, request db.Transactio
if !ok {
return fmt.Errorf("could not get contract for chain %d", request.SrcChainID.Int64())
}
// GasBuffer should be always set if Client contract is set
gasBuffer := e.gasBuffers[int(request.DstChainID.Int64())]

_, err := e.submitter.SubmitTransaction(ctx, request.DstChainID, func(transactor *bind.TransactOpts) (tx *types.Transaction, err error) {
transactor.GasLimit = request.Options.GasLimit.Uint64() + gasBuffer
transactor.Value = request.Options.GasAirdrop

// nolint: wrapcheck
Expand Down
Loading