Commit 6fcdeaa0 authored by Mark Tyneway's avatar Mark Tyneway

sdk: fix linting

Fix linting issues in the SDK. Ran `yarn lint --fix` and
committed the diff.
parent 11697889
...@@ -1004,18 +1004,23 @@ export class CrossChainMessenger { ...@@ -1004,18 +1004,23 @@ export class CrossChainMessenger {
*/ */
public async getChallengePeriodSeconds(): Promise<number> { public async getChallengePeriodSeconds(): Promise<number> {
if (!this.bedrock) { if (!this.bedrock) {
return (await this.contracts.l1.StateCommitmentChain.FRAUD_PROOF_WINDOW()).toNumber() return (
await this.contracts.l1.StateCommitmentChain.FRAUD_PROOF_WINDOW()
).toNumber()
} }
const oracleVersion = await this.contracts.l1.L2OutputOracle.version() const oracleVersion = await this.contracts.l1.L2OutputOracle.version()
const challengePeriod = oracleVersion === '1.0.0' const challengePeriod =
// The ABI in the SDK does not contain FINALIZATION_PERIOD_SECONDS oracleVersion === '1.0.0'
// in OptimismPortal, so making an explicit call instead. ? // The ABI in the SDK does not contain FINALIZATION_PERIOD_SECONDS
? BigNumber.from(await this.contracts.l1.OptimismPortal.provider.call({ // in OptimismPortal, so making an explicit call instead.
to: this.contracts.l1.OptimismPortal.address, BigNumber.from(
data: '0xf4daa291' // FINALIZATION_PERIOD_SECONDS await this.contracts.l1.OptimismPortal.provider.call({
})) to: this.contracts.l1.OptimismPortal.address,
: await this.contracts.l1.L2OutputOracle.FINALIZATION_PERIOD_SECONDS() data: '0xf4daa291', // FINALIZATION_PERIOD_SECONDS
})
)
: await this.contracts.l1.L2OutputOracle.FINALIZATION_PERIOD_SECONDS()
return challengePeriod.toNumber() return challengePeriod.toNumber()
} }
......
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