Skip to main content

RateModelStore

RateModelStore#

This contract is designed to be queried by off-chain relayers that need to compute realized LP fee %'s before submitting relay transactions to a BridgePool contract. Therefore, this contract does not perform any validation on the shape of the rate model, which is stored as a string to enable arbitrary data encoding via a stringified JSON object. This leaves this contract unopionated on the parameters within the rate model, enabling governance to adjust the structure in the future.

Functions#

updateRateModel(address l1Token, string rateModel) (external)

Updates rate model string for L1 token.

Parameters:#

  • l1Token: the l1 token rate model to update.
  • rateModel: the updated rate model.
multicall(bytes[] data) โ†’ bytes[] results (external)
constructor() (internal)

Initializes the contract setting the deployer as the initial owner.

owner() โ†’ address (public)

Returns the address of the current owner.

renounceOwnership() (public)

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

transferOwnership(address newOwner) (public)

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

_transferOwnership(address newOwner) (internal)

Transfers ownership of the contract to a new account (newOwner). Internal function without access restriction.

_msgSender() โ†’ address (internal)
_msgData() โ†’ bytes (internal)

Events#

UpdatedRateModel(address l1Token, string rateModel)
OwnershipTransferred(address previousOwner, address newOwner)

Modifiers#

onlyOwner()

Throws if called by any account other than the owner.