Skip to content

Commit

Permalink
lint, wrappers, gas
Browse files Browse the repository at this point in the history
  • Loading branch information
Fletch153 committed Sep 12, 2023
1 parent 25da6ea commit 2109e78
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 26 deletions.
20 changes: 12 additions & 8 deletions contracts/test/v0.7/Operator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,9 @@ describe('Operator', () => {
.deploy(link.address, operator.address, specId)
const paymentAmount = toWei('1')
await link.transfer(gasGuzzlingConsumer.address, paymentAmount)
const tx =
await gasGuzzlingConsumer.gassyRequestEthereumPrice(paymentAmount)
const tx = await gasGuzzlingConsumer.gassyRequestEthereumPrice(
paymentAmount,
)
const receipt = await tx.wait()
request = decodeRunRequest(receipt.logs?.[3])
})
Expand Down Expand Up @@ -1479,8 +1480,9 @@ describe('Operator', () => {
.deploy(link.address, operator.address, specId)
const paymentAmount = toWei('1')
await link.transfer(gasGuzzlingConsumer.address, paymentAmount)
const tx =
await gasGuzzlingConsumer.gassyRequestEthereumPrice(paymentAmount)
const tx = await gasGuzzlingConsumer.gassyRequestEthereumPrice(
paymentAmount,
)
const receipt = await tx.wait()
request = decodeRunRequest(receipt.logs?.[3])
})
Expand Down Expand Up @@ -2085,8 +2087,9 @@ describe('Operator', () => {
.deploy(link.address, operator.address, specId)
const paymentAmount = toWei('1')
await link.transfer(gasGuzzlingConsumer.address, paymentAmount)
const tx =
await gasGuzzlingConsumer.gassyMultiWordRequest(paymentAmount)
const tx = await gasGuzzlingConsumer.gassyMultiWordRequest(
paymentAmount,
)
const receipt = await tx.wait()
request = decodeRunRequest(receipt.logs?.[3])
})
Expand Down Expand Up @@ -2601,8 +2604,9 @@ describe('Operator', () => {
.deploy(link.address, operator.address, specId)
const paymentAmount = toWei('1')
await link.transfer(gasGuzzlingConsumer.address, paymentAmount)
const tx =
await gasGuzzlingConsumer.gassyMultiWordRequest(paymentAmount)
const tx = await gasGuzzlingConsumer.gassyMultiWordRequest(
paymentAmount,
)
const receipt = await tx.wait()
request = decodeRunRequest(receipt.logs?.[3])
})
Expand Down
10 changes: 6 additions & 4 deletions contracts/test/v0.8/automation/CronUpkeep.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,12 @@ describe('CronUpkeep', () => {
it('creates jobs with sequential IDs', async () => {
const cronString1 = '0 * * * *'
const cronString2 = '0 1,2,3 */4 5-6 1-2'
const encodedSpec1 =
await cronFactoryContract.encodeCronString(cronString1)
const encodedSpec2 =
await cronFactoryContract.encodeCronString(cronString2)
const encodedSpec1 = await cronFactoryContract.encodeCronString(
cronString1,
)
const encodedSpec2 = await cronFactoryContract.encodeCronString(
cronString2,
)
const nextTick1 = (
await cronTestHelper.calculateNextTick(cronString1)
).toNumber()
Expand Down
5 changes: 3 additions & 2 deletions contracts/test/v0.8/automation/KeeperRegistry2_1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,9 @@ describe('KeeperRegistry2_1', () => {
'src/v0.8/tests/MockV3Aggregator.sol:MockV3Aggregator',
)) as unknown as MockV3AggregatorFactory
upkeepMockFactory = await ethers.getContractFactory('UpkeepMock')
upkeepAutoFunderFactory =
await ethers.getContractFactory('UpkeepAutoFunder')
upkeepAutoFunderFactory = await ethers.getContractFactory(
'UpkeepAutoFunder',
)
mockArbGasInfoFactory = await ethers.getContractFactory('MockArbGasInfo')
mockOVMGasPriceOracleFactory = await ethers.getContractFactory(
'MockOVMGasPriceOracle',
Expand Down
5 changes: 3 additions & 2 deletions contracts/test/v0.8/automation/UpkeepTranscoder3_0.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ async function deployLegacyRegistry1_2(
) {
const mock = await upkeepMockFactory.deploy()
// @ts-ignore bug in autogen file
const keeperRegistryFactory =
await ethers.getContractFactory('KeeperRegistry1_2')
const keeperRegistryFactory = await ethers.getContractFactory(
'KeeperRegistry1_2',
)
transcoder = await upkeepTranscoderFactory.connect(owner).deploy()
const legacyRegistry = await keeperRegistryFactory
.connect(owner)
Expand Down
5 changes: 3 additions & 2 deletions contracts/test/v0.8/automation/UpkeepTranscoder4_0.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ const encodeUpkeepV12 = (ids: number[], upkeeps: any[], checkDatas: any[]) => {
}

async function deployRegistry1_2(): Promise<[BigNumber, KeeperRegistry1_2]> {
const keeperRegistryFactory =
await ethers.getContractFactory('KeeperRegistry1_2')
const keeperRegistryFactory = await ethers.getContractFactory(
'KeeperRegistry1_2',
)
const registry12 = await keeperRegistryFactory
.connect(owner)
.deploy(linkToken.address, linkEthFeed.address, gasPriceFeed.address, {
Expand Down
5 changes: 3 additions & 2 deletions contracts/test/v0.8/dev/OptimismCrossDomainForwarder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ before(async () => {

describe('OptimismCrossDomainForwarder', () => {
beforeEach(async () => {
crossDomainMessenger =
await crossDomainMessengerFactory.deploy(l1OwnerAddress)
crossDomainMessenger = await crossDomainMessengerFactory.deploy(
l1OwnerAddress,
)
forwarder = await forwarderFactory.deploy(
crossDomainMessenger.address,
l1OwnerAddress,
Expand Down
5 changes: 3 additions & 2 deletions contracts/test/v0.8/dev/OptimismCrossDomainGovernor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ before(async () => {

describe('OptimismCrossDomainGovernor', () => {
beforeEach(async () => {
crossDomainMessenger =
await crossDomainMessengerFactory.deploy(l1OwnerAddress)
crossDomainMessenger = await crossDomainMessengerFactory.deploy(
l1OwnerAddress,
)
governor = await governorFactory.deploy(
crossDomainMessenger.address,
l1OwnerAddress,
Expand Down
10 changes: 6 additions & 4 deletions contracts/test/v0.8/functions/v0/FunctionsOracle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,9 @@ describe('FunctionsOracle', () => {
})

it('#estimateCost correctly estimates cost [ @skip-coverage ]', async () => {
const [subscriptionBalanceBefore] =
await registry.getSubscription(subscriptionId)
const [subscriptionBalanceBefore] = await registry.getSubscription(
subscriptionId,
)

const request = await client
.connect(roles.oracleNode)
Expand All @@ -375,8 +376,9 @@ describe('FunctionsOracle', () => {
.withArgs(requestId, transmitter)
.to.emit(registry, 'BillingEnd')

const [subscriptionBalanceAfter] =
await registry.getSubscription(subscriptionId)
const [subscriptionBalanceAfter] = await registry.getSubscription(
subscriptionId,
)

const feeData = await ethers.provider.getFeeData()
const estimatedCost = await client.estimateJuelCost(
Expand Down

0 comments on commit 2109e78

Please sign in to comment.