Commit 767585b0 authored by Kelvin Fichter's avatar Kelvin Fichter

maint(sdk): remove unused variable

Removes an unused variable and function from the SDK.
parent e941ee73
---
'@eth-optimism/sdk': patch
---
Removes an unused variable from the SDK
...@@ -116,11 +116,6 @@ export class CrossChainMessenger { ...@@ -116,11 +116,6 @@ export class CrossChainMessenger {
*/ */
public bedrock: boolean public bedrock: boolean
/**
* Parameters for the L2OutputOracle contract.
*/
private _l2OutputOracleParameters: L2OutputOracleParameters
/** /**
* Creates a new CrossChainProvider instance. * Creates a new CrossChainProvider instance.
* *
...@@ -228,42 +223,6 @@ export class CrossChainMessenger { ...@@ -228,42 +223,6 @@ export class CrossChainMessenger {
} }
} }
/**
* Accesses the L2OutputOracle parameters, with caching to avoid unnecessary requests.
*
* @returns The L2OutputOracle parameters.
*/
public async getL2OutputOracleParameters(): Promise<L2OutputOracleParameters> {
if (this._l2OutputOracleParameters) {
return this._l2OutputOracleParameters
}
// Temporary logic to support legacy Bedrock testnets.
// TODO: Remove this once all legacy testnets are deprecated.
let startingBlockNumber: number
try {
startingBlockNumber = (
await this.contracts.l1.L2OutputOracle.startingBlockNumber()
).toNumber()
} catch {
startingBlockNumber = (
await this.contracts.l1.L2OutputOracle.STARTING_BLOCK_NUMBER()
).toNumber()
}
this._l2OutputOracleParameters = {
startingBlockNumber,
submissionInterval: (
await this.contracts.l1.L2OutputOracle.SUBMISSION_INTERVAL()
).toNumber(),
l2BlockTime: (
await this.contracts.l1.L2OutputOracle.L2_BLOCK_TIME()
).toNumber(),
}
return this._l2OutputOracleParameters
}
/** /**
* Retrieves all cross chain messages sent within a given transaction. * Retrieves all cross chain messages sent within a given transaction.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment