Skip to content

Commit

Permalink
test(contracts): Update target gas costs to adjust for solidity 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
maurelian authored and smartcontracts committed Nov 10, 2021
1 parent bf3929e commit d723495
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
'Non-calldata overhead gas cost per transaction:',
(gasUsed - fixedCalldataCost) / numTxs
)
expectApprox(gasUsed, 1_604_975, {
expectApprox(gasUsed, 1_767_570, {
upperPercentDeviation: 0,
// Assert a lower bound of 1% reduction on gas cost. If your tests are breaking because your
// contracts are too efficient, consider updating the target value!
Expand Down Expand Up @@ -211,7 +211,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
'Non-calldata overhead gas cost per transaction:',
(gasUsed - fixedCalldataCost) / numTxs
)
expectApprox(gasUsed, 1_738_990, {
expectApprox(gasUsed, 1_950_378, {
upperPercentDeviation: 0,
// Assert a lower bound of 1% reduction on gas cost. If your tests are breaking because your
// contracts are too efficient, consider updating the target value!
Expand Down Expand Up @@ -269,7 +269,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
'Non-calldata overhead gas cost per transaction:',
(gasUsed - fixedCalldataCost) / numTxs
)
expectApprox(gasUsed, 1_126_553, { upperPercentDeviation: 0 })
expectApprox(gasUsed, 1_293_111, { upperPercentDeviation: 0 })
}).timeout(10_000_000)
})

Expand Down Expand Up @@ -297,7 +297,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
console.log('Benchmark complete.')
console.log('Gas used:', gasUsed)

expectApprox(gasUsed, 217_218, {
expectApprox(gasUsed, 219_896, {
upperPercentDeviation: 0,
// Assert a lower bound of 1% reduction on gas cost. If your tests are breaking because your
// contracts are too efficient, consider updating the target value!
Expand All @@ -319,7 +319,7 @@ describe('[GAS BENCHMARK] CanonicalTransactionChain', () => {
console.log('Benchmark complete.')
console.log('Gas used:', gasUsed)

expectApprox(gasUsed, 156_314, {
expectApprox(gasUsed, 158_709, {
upperPercentDeviation: 0,
// Assert a lower bound of 1% reduction on gas cost. If your tests are breaking because your
// contracts are too efficient, consider updating the target value!
Expand Down

0 comments on commit d723495

Please sign in to comment.