BridgeGovernance

BridgeGovernance

Owns the Bridge contract and is responsible for updating its governable parameters in respect to governance delay individual for each parameter. The other responsibility is marking a vault address as trusted or no longer trusted.

depositData

struct BridgeGovernanceParameters.DepositData depositData

redemptionData

struct BridgeGovernanceParameters.RedemptionData redemptionData

movingFundsData

struct BridgeGovernanceParameters.MovingFundsData movingFundsData

walletData

struct BridgeGovernanceParameters.WalletData walletData

fraudData

struct BridgeGovernanceParameters.FraudData fraudData

treasuryData

bridge

governanceDelays

bridgeGovernanceTransferChangeInitiated

newBridgeGovernance

BridgeGovernanceTransferStarted

DepositDustThresholdUpdateStarted

DepositDustThresholdUpdated

DepositTreasuryFeeDivisorUpdateStarted

DepositTreasuryFeeDivisorUpdated

DepositTxMaxFeeUpdateStarted

DepositTxMaxFeeUpdated

DepositRevealAheadPeriodUpdateStarted

DepositRevealAheadPeriodUpdated

RedemptionDustThresholdUpdateStarted

RedemptionDustThresholdUpdated

RedemptionTreasuryFeeDivisorUpdateStarted

RedemptionTreasuryFeeDivisorUpdated

RedemptionTxMaxFeeUpdateStarted

RedemptionTxMaxFeeUpdated

RedemptionTxMaxTotalFeeUpdateStarted

RedemptionTxMaxTotalFeeUpdated

RedemptionTimeoutUpdateStarted

RedemptionTimeoutUpdated

RedemptionTimeoutSlashingAmountUpdateStarted

RedemptionTimeoutSlashingAmountUpdated

RedemptionTimeoutNotifierRewardMultiplierUpdateStarted

RedemptionTimeoutNotifierRewardMultiplierUpdated

MovingFundsTxMaxTotalFeeUpdateStarted

MovingFundsTxMaxTotalFeeUpdated

MovingFundsDustThresholdUpdateStarted

MovingFundsDustThresholdUpdated

MovingFundsTimeoutResetDelayUpdateStarted

MovingFundsTimeoutResetDelayUpdated

MovingFundsTimeoutUpdateStarted

MovingFundsTimeoutUpdated

MovingFundsTimeoutSlashingAmountUpdateStarted

MovingFundsTimeoutSlashingAmountUpdated

MovingFundsTimeoutNotifierRewardMultiplierUpdateStarted

MovingFundsTimeoutNotifierRewardMultiplierUpdated

MovingFundsCommitmentGasOffsetUpdateStarted

MovingFundsCommitmentGasOffsetUpdated

MovedFundsSweepTxMaxTotalFeeUpdateStarted

MovedFundsSweepTxMaxTotalFeeUpdated

MovedFundsSweepTimeoutUpdateStarted

MovedFundsSweepTimeoutUpdated

MovedFundsSweepTimeoutSlashingAmountUpdateStarted

MovedFundsSweepTimeoutSlashingAmountUpdated

MovedFundsSweepTimeoutNotifierRewardMultiplierUpdateStarted

MovedFundsSweepTimeoutNotifierRewardMultiplierUpdated

WalletCreationPeriodUpdateStarted

WalletCreationPeriodUpdated

WalletCreationMinBtcBalanceUpdateStarted

WalletCreationMinBtcBalanceUpdated

WalletCreationMaxBtcBalanceUpdateStarted

WalletCreationMaxBtcBalanceUpdated

WalletClosureMinBtcBalanceUpdateStarted

WalletClosureMinBtcBalanceUpdated

WalletMaxAgeUpdateStarted

WalletMaxAgeUpdated

WalletMaxBtcTransferUpdateStarted

WalletMaxBtcTransferUpdated

WalletClosingPeriodUpdateStarted

WalletClosingPeriodUpdated

FraudChallengeDepositAmountUpdateStarted

FraudChallengeDepositAmountUpdated

FraudChallengeDefeatTimeoutUpdateStarted

FraudChallengeDefeatTimeoutUpdated

FraudSlashingAmountUpdateStarted

FraudSlashingAmountUpdated

FraudNotifierRewardMultiplierUpdateStarted

FraudNotifierRewardMultiplierUpdated

TreasuryUpdateStarted

TreasuryUpdated

constructor

setVaultStatus

Allows the Governance to mark the given vault address as trusted or no longer trusted. Vaults are not trusted by default. Trusted vault must meet the following criteria:

  • IVault.receiveBalanceIncrease must have a known, low gas cost,

  • IVault.receiveBalanceIncrease must never revert.

Parameters

Name
Type
Description

vault

address

The address of the vault.

isTrusted

bool

flag indicating whether the vault is trusted or not.

setSpvMaintainerStatus

Allows the Governance to mark the given address as trusted or no longer trusted SPV maintainer. Addresses are not trusted as SPV maintainers by default.

Parameters

Name
Type
Description

spvMaintainer

address

The address of the SPV maintainer.

isTrusted

bool

flag indicating whether the address is trusted or not.

beginGovernanceDelayUpdate

Begins the governance delay update process.

Can be called only by the contract owner. The event that informs about the start of the governance delay was skipped on purpose to trim the contract size. All the params inside of the governanceDelays array are public and can be easily fetched.

Parameters

Name
Type
Description

_newGovernanceDelay

uint256

New governance delay

finalizeGovernanceDelayUpdate

Finalizes the governance delay update process.

Can be called only by the contract owner, after the governance delay elapses. Updated event was skipped on purpose to trim the contract size. All the params inside of the governanceDelays array are public and can be easily fetched.

beginBridgeGovernanceTransfer

Begins the Bridge governance transfer process.

Can be called only by the contract owner. It is the governance responsibility to validate the correctness of the new Bridge Governance contract. The other reason for not adding this check is to go down with the contract size and leaving only the essential code.

finalizeBridgeGovernanceTransfer

Finalizes the bridge governance transfer process.

Can be called only by the contract owner, after the governance delay elapses. Bridge governance transferred event can be read from the Governable bridge contract 'GovernanceTransferred(old, new)'. Event that informs about the transfer in this function is skipped on purpose to go down with the contract size.

beginDepositDustThresholdUpdate

Begins the deposit dust threshold amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newDepositDustThreshold

uint64

New deposit dust threshold amount.

finalizeDepositDustThresholdUpdate

Finalizes the deposit dust threshold amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginDepositTreasuryFeeDivisorUpdate

Begins the deposit treasury fee divisor amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newDepositTreasuryFeeDivisor

uint64

New deposit treasury fee divisor.

finalizeDepositTreasuryFeeDivisorUpdate

Finalizes the deposit treasury fee divisor amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginDepositTxMaxFeeUpdate

Begins the deposit tx max fee amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newDepositTxMaxFee

uint64

New deposit tx max fee.

finalizeDepositTxMaxFeeUpdate

Finalizes the deposit tx max fee amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginDepositRevealAheadPeriodUpdate

Begins the deposit reveal ahead period update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newDepositRevealAheadPeriod

uint32

New deposit reveal ahead period.

finalizeDepositRevealAheadPeriodUpdate

Finalizes the deposit reveal ahead period update process.

Can be called only by the contract owner, after the governance delay elapses.

beginRedemptionDustThresholdUpdate

Begins the redemption dust threshold amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newRedemptionDustThreshold

uint64

New redemption dust threshold.

finalizeRedemptionDustThresholdUpdate

Finalizes the dust threshold amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginRedemptionTreasuryFeeDivisorUpdate

Begins the redemption treasury fee divisor amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newRedemptionTreasuryFeeDivisor

uint64

New redemption treasury fee divisor.

finalizeRedemptionTreasuryFeeDivisorUpdate

Finalizes the redemption treasury fee divisor amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginRedemptionTxMaxFeeUpdate

Begins the redemption tx max fee amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newRedemptionTxMaxFee

uint64

New redemption tx max fee.

finalizeRedemptionTxMaxFeeUpdate

Finalizes the redemption tx max fee amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginRedemptionTxMaxTotalFeeUpdate

Begins the redemption tx max total fee amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newRedemptionTxMaxTotalFee

uint64

New redemption tx max total fee.

finalizeRedemptionTxMaxTotalFeeUpdate

Finalizes the redemption tx max total fee amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginRedemptionTimeoutUpdate

Begins the redemption timeout amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newRedemptionTimeout

uint32

New redemption timeout.

finalizeRedemptionTimeoutUpdate

Finalizes the redemption timeout amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginRedemptionTimeoutSlashingAmountUpdate

Begins the redemption timeout slashing amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newRedemptionTimeoutSlashingAmount

uint96

New redemption timeout slashing amount.

finalizeRedemptionTimeoutSlashingAmountUpdate

Finalizes the redemption timeout slashing amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginRedemptionTimeoutNotifierRewardMultiplierUpdate

Begins the redemption timeout notifier reward multiplier amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newRedemptionTimeoutNotifierRewardMultiplier

uint32

New redemption timeout notifier reward multiplier.

finalizeRedemptionTimeoutNotifierRewardMultiplierUpdate

Finalizes the redemption timeout notifier reward multiplier amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovingFundsTxMaxTotalFeeUpdate

Begins the moving funds tx max total fee update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovingFundsTxMaxTotalFee

uint64

New moving funds tx max total fee.

finalizeMovingFundsTxMaxTotalFeeUpdate

Finalizes the moving funds tx max total fee update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovingFundsDustThresholdUpdate

Begins the moving funds dust threshold update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovingFundsDustThreshold

uint64

New moving funds dust threshold.

finalizeMovingFundsDustThresholdUpdate

Finalizes the moving funds dust threshold update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovingFundsTimeoutResetDelayUpdate

Begins the moving funds timeout reset delay update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovingFundsTimeoutResetDelay

uint32

New moving funds timeout reset delay.

finalizeMovingFundsTimeoutResetDelayUpdate

Finalizes the moving funds timeout reset delay update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovingFundsTimeoutUpdate

Begins the moving funds timeout update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovingFundsTimeout

uint32

New moving funds timeout.

finalizeMovingFundsTimeoutUpdate

Finalizes the moving funds timeout update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovingFundsTimeoutSlashingAmountUpdate

Begins the moving funds timeout slashing amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovingFundsTimeoutSlashingAmount

uint96

New moving funds timeout slashing amount.

finalizeMovingFundsTimeoutSlashingAmountUpdate

Finalizes the moving funds timeout slashing amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovingFundsTimeoutNotifierRewardMultiplierUpdate

Begins the moving funds timeout notifier reward multiplier update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovingFundsTimeoutNotifierRewardMultiplier

uint32

New moving funds timeout notifier reward multiplier.

finalizeMovingFundsTimeoutNotifierRewardMultiplierUpdate

Finalizes the moving funds timeout notifier reward multiplier update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovingFundsCommitmentGasOffsetUpdate

Begins the moving funds commitment gas offset update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovingFundsCommitmentGasOffset

uint16

New moving funds commitment gas offset.

finalizeMovingFundsCommitmentGasOffsetUpdate

Finalizes the moving funds commitment gas offset update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovedFundsSweepTxMaxTotalFeeUpdate

Begins the moved funds sweep tx max total fee update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovedFundsSweepTxMaxTotalFee

uint64

New moved funds sweep tx max total fee.

finalizeMovedFundsSweepTxMaxTotalFeeUpdate

Finalizes the moved funds sweep tx max total fee update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovedFundsSweepTimeoutUpdate

Begins the moved funds sweep timeout update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovedFundsSweepTimeout

uint32

New moved funds sweep timeout.

finalizeMovedFundsSweepTimeoutUpdate

Finalizes the moved funds sweep timeout update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovedFundsSweepTimeoutSlashingAmountUpdate

Begins the moved funds sweep timeout slashing amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovedFundsSweepTimeoutSlashingAmount

uint96

New moved funds sweep timeout slashing amount.

finalizeMovedFundsSweepTimeoutSlashingAmountUpdate

Finalizes the moved funds sweep timeout slashing amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginMovedFundsSweepTimeoutNotifierRewardMultiplierUpdate

Begins the moved funds sweep timeout notifier reward multiplier update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newMovedFundsSweepTimeoutNotifierRewardMultiplier

uint32

New moved funds sweep timeout notifier reward multiplier.

finalizeMovedFundsSweepTimeoutNotifierRewardMultiplierUpdate

Finalizes the moved funds sweep timeout notifier reward multiplier update process.

Can be called only by the contract owner, after the governance delay elapses.

beginWalletCreationPeriodUpdate

Begins the wallet creation period update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newWalletCreationPeriod

uint32

New wallet creation period.

finalizeWalletCreationPeriodUpdate

Finalizes the wallet creation period update process.

Can be called only by the contract owner, after the governance delay elapses.

beginWalletCreationMinBtcBalanceUpdate

Begins the wallet creation min btc balance update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newWalletCreationMinBtcBalance

uint64

New wallet creation min btc balance.

finalizeWalletCreationMinBtcBalanceUpdate

Finalizes the wallet creation min btc balance update process.

Can be called only by the contract owner, after the governance delay elapses.

beginWalletCreationMaxBtcBalanceUpdate

Begins the wallet creation max btc balance update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newWalletCreationMaxBtcBalance

uint64

New wallet creation max btc balance.

finalizeWalletCreationMaxBtcBalanceUpdate

Finalizes the wallet creation max btc balance update process.

Can be called only by the contract owner, after the governance delay elapses.

beginWalletClosureMinBtcBalanceUpdate

Begins the wallet closure min btc balance update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newWalletClosureMinBtcBalance

uint64

New wallet closure min btc balance.

finalizeWalletClosureMinBtcBalanceUpdate

Finalizes the wallet closure min btc balance update process.

Can be called only by the contract owner, after the governance delay elapses.

beginWalletMaxAgeUpdate

Begins the wallet max age update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newWalletMaxAge

uint32

New wallet max age.

finalizeWalletMaxAgeUpdate

Finalizes the wallet max age update process.

Can be called only by the contract owner, after the governance delay elapses.

beginWalletMaxBtcTransferUpdate

Begins the wallet max btc transfer amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newWalletMaxBtcTransfer

uint64

New wallet max btc transfer.

finalizeWalletMaxBtcTransferUpdate

Finalizes the wallet max btc transfer amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginWalletClosingPeriodUpdate

Begins the wallet closing period update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newWalletClosingPeriod

uint32

New wallet closing period.

finalizeWalletClosingPeriodUpdate

Finalizes the wallet closing period update process.

Can be called only by the contract owner, after the governance delay elapses.

beginFraudChallengeDepositAmountUpdate

Begins the fraud challenge deposit amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newFraudChallengeDepositAmount

uint96

New fraud challenge deposit amount.

finalizeFraudChallengeDepositAmountUpdate

Finalizes the fraud challenge deposit amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginFraudChallengeDefeatTimeoutUpdate

Begins the fraud challenge defeat timeout update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newFraudChallengeDefeatTimeout

uint32

New fraud challenge defeat timeout.

finalizeFraudChallengeDefeatTimeoutUpdate

Finalizes the fraud challenge defeat timeout update process.

Can be called only by the contract owner, after the governance delay elapses.

beginFraudSlashingAmountUpdate

Begins the fraud slashing amount update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newFraudSlashingAmount

uint96

New fraud slashing amount.

finalizeFraudSlashingAmountUpdate

Finalizes the fraud slashing amount update process.

Can be called only by the contract owner, after the governance delay elapses.

beginFraudNotifierRewardMultiplierUpdate

Begins the fraud notifier reward multiplier update process.

Can be called only by the contract owner.

Parameters

Name
Type
Description

_newFraudNotifierRewardMultiplier

uint32

New fraud notifier reward multiplier.

finalizeFraudNotifierRewardMultiplierUpdate

Finalizes the fraud notifier reward multiplier update process.

Can be called only by the contract owner, after the governance delay elapses.

beginTreasuryUpdate

Begins the treasury address update process.

Can be called only by the contract owner. It does not perform any parameter validation.

Parameters

Name
Type
Description

_newTreasury

address

New treasury address.

finalizeTreasuryUpdate

Finalizes the treasury address update process.

Can be called only by the contract owner, after the governance delay elapses.

governanceDelay

Gets the governance delay parameter.

Last updated

Was this helpful?