Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform multiplication before division for fee calculations #132

Merged
merged 4 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
OptionSettlementTest:testAddOptionsToExistingClaim() (gas: 449104)
OptionSettlementTest:testAssignMultipleBuckets() (gas: 719294)
OptionSettlementTest:testDecodeTokenId() (gas: 487495)
OptionSettlementTest:testEncodeTokenId() (gas: 487096)
OptionSettlementTest:testEventExercise() (gas: 340754)
OptionSettlementTest:testAddOptionsToExistingClaim() (gas: 449329)
OptionSettlementTest:testAssignMultipleBuckets() (gas: 719503)
OptionSettlementTest:testDecodeTokenId() (gas: 487645)
OptionSettlementTest:testEncodeTokenId() (gas: 487246)
OptionSettlementTest:testEventExercise() (gas: 340888)
OptionSettlementTest:testEventNewOptionType() (gas: 124268)
OptionSettlementTest:testEventRedeem() (gas: 299276)
OptionSettlementTest:testEventWriteWhenExistingClaim() (gas: 318634)
OptionSettlementTest:testEventWriteWhenNewClaim() (gas: 300830)
OptionSettlementTest:testExerciseBeforeExpiry() (gas: 333430)
OptionSettlementTest:testExerciseIncompleteExercise() (gas: 354554)
OptionSettlementTest:testExerciseMultipleWriteSameChain() (gas: 467167)
OptionSettlementTest:testExerciseWithDifferentDecimals() (gas: 407083)
OptionSettlementTest:testFuzzDecodeTokenId(uint256,uint256) (runs: 256, μ: 11051, ~: 11138)
OptionSettlementTest:testFuzzEncodeTokenId(uint256,uint256) (runs: 256, μ: 10977, ~: 11064)
OptionSettlementTest:testFuzzExercise(uint112,uint112) (runs: 256, μ: 402353, ~: 405947)
OptionSettlementTest:testEventRedeem() (gas: 299351)
OptionSettlementTest:testEventWriteWhenExistingClaim() (gas: 318784)
OptionSettlementTest:testEventWriteWhenNewClaim() (gas: 300905)
OptionSettlementTest:testExerciseBeforeExpiry() (gas: 333564)
OptionSettlementTest:testExerciseIncompleteExercise() (gas: 354747)
OptionSettlementTest:testExerciseMultipleWriteSameChain() (gas: 467376)
OptionSettlementTest:testExerciseWithDifferentDecimals() (gas: 407217)
OptionSettlementTest:testFuzzDecodeTokenId(uint256,uint256) (runs: 256, μ: 11049, ~: 11138)
OptionSettlementTest:testFuzzEncodeTokenId(uint256,uint256) (runs: 256, μ: 10975, ~: 11064)
OptionSettlementTest:testFuzzExercise(uint112,uint112) (runs: 256, μ: 402487, ~: 406081)
OptionSettlementTest:testFuzzNewOptionType(uint96,uint96,uint40,uint40) (runs: 256, μ: 124704, ~: 124704)
OptionSettlementTest:testFuzzRedeem(uint112,uint112) (runs: 256, μ: 393014, ~: 396836)
OptionSettlementTest:testFuzzWrite(uint112) (runs: 256, μ: 318304, ~: 318304)
OptionSettlementTest:testFuzzWriteExerciseRedeem(uint32) (runs: 256, μ: 11505904, ~: 11596957)
OptionSettlementTest:testGetClaimForTokenId() (gas: 375653)
OptionSettlementTest:testFuzzRedeem(uint112,uint112) (runs: 256, μ: 393148, ~: 396970)
OptionSettlementTest:testFuzzWrite(uint112) (runs: 256, μ: 318379, ~: 318379)
OptionSettlementTest:testFuzzWriteExerciseRedeem(uint32) (runs: 256, μ: 11542131, ~: 11602716)
OptionSettlementTest:testGetClaimForTokenId() (gas: 375728)
OptionSettlementTest:testGetOptionForTokenId() (gas: 124586)
OptionSettlementTest:testInitial() (gas: 7835)
OptionSettlementTest:testIsOptionInitialized() (gas: 124875)
OptionSettlementTest:testRandomAssignment() (gas: 1599519)
OptionSettlementTest:testRedeemNotExercised() (gas: 302870)
OptionSettlementTest:testRevertExerciseBeforeExcercise() (gas: 401568)
OptionSettlementTest:testRevertExerciseWhenCallerHoldsInsufficientOptions() (gas: 306338)
OptionSettlementTest:testRevertExerciseWhenExerciseTooEarly() (gas: 308028)
OptionSettlementTest:testRevertExerciseWhenExpiredOption() (gas: 427770)
OptionSettlementTest:testRevertExerciseWhenInvalidOption() (gas: 294502)
OptionSettlementTest:testRandomAssignment() (gas: 1600221)
OptionSettlementTest:testRedeemNotExercised() (gas: 302945)
OptionSettlementTest:testRevertExerciseBeforeExcercise() (gas: 401643)
OptionSettlementTest:testRevertExerciseWhenCallerHoldsInsufficientOptions() (gas: 306413)
OptionSettlementTest:testRevertExerciseWhenExerciseTooEarly() (gas: 308103)
OptionSettlementTest:testRevertExerciseWhenExpiredOption() (gas: 427920)
OptionSettlementTest:testRevertExerciseWhenInvalidOption() (gas: 294577)
OptionSettlementTest:testRevertNewOptionTypeWhenExerciseWindowTooShort() (gas: 19244)
OptionSettlementTest:testRevertNewOptionTypeWhenExpiryTooSoon() (gas: 20607)
OptionSettlementTest:testRevertNewOptionTypeWhenInvalidAssets() (gas: 20812)
OptionSettlementTest:testRevertNewOptionTypeWhenOptionsTypeExists() (gas: 22551)
OptionSettlementTest:testRevertNewOptionTypeWhenTotalSuppliesAreTooLowToExercise() (gas: 48745)
OptionSettlementTest:testRevertRedeemWhenCallerDoesNotOwnClaimId() (gas: 318477)
OptionSettlementTest:testRevertRedeemWhenClaimTooSoon() (gas: 298523)
OptionSettlementTest:testRevertRedeemWhenCallerDoesNotOwnClaimId() (gas: 318552)
OptionSettlementTest:testRevertRedeemWhenClaimTooSoon() (gas: 298598)
OptionSettlementTest:testRevertRedeemWhenInvalidClaim() (gas: 10603)
OptionSettlementTest:testRevertSetFeeToWhenNotCurrentFeeTo() (gas: 11908)
OptionSettlementTest:testRevertSetFeeToWhenZeroAddress() (gas: 11722)
Expand All @@ -45,17 +45,17 @@ OptionSettlementTest:testRevertUnderlyingWhenTokenNotFound() (gas: 11757)
OptionSettlementTest:testRevertUriWhenTokenNotFound() (gas: 18716)
OptionSettlementTest:testRevertWriteExpiredOption() (gas: 16626)
OptionSettlementTest:testRevertWriteWhenAmountWrittenCannotBeZero() (gas: 10948)
OptionSettlementTest:testRevertWriteWhenCallerDoesNotOwnClaimId() (gas: 298936)
OptionSettlementTest:testRevertWriteWhenCallerDoesNotOwnClaimId() (gas: 300916)
OptionSettlementTest:testRevertWriteWhenEncodedOptionIdInClaimIdDoesNotMatchProvidedOptionId() (gas: 11690)
OptionSettlementTest:testRevertWriteWhenExpiredOption() (gas: 295565)
OptionSettlementTest:testRevertWriteWhenExpiredOption() (gas: 295640)
OptionSettlementTest:testRevertWriteWhenInvalidOption() (gas: 16923)
OptionSettlementTest:testSetFeeTo() (gas: 15883)
OptionSettlementTest:testSetTokenURIGenerator() (gas: 16786)
OptionSettlementTest:testSweepFeesWhenFeesAccruedForExercise() (gas: 1558107)
OptionSettlementTest:testSweepFeesWhenFeesAccruedForWrite() (gas: 1555126)
OptionSettlementTest:testSweepFeesWhenFeesAccruedForExercise() (gas: 1558584)
OptionSettlementTest:testSweepFeesWhenFeesAccruedForWrite() (gas: 1555576)
OptionSettlementTest:testTokenURI() (gas: 483080)
OptionSettlementTest:testUnderlyingAfterExercise() (gas: 375435)
OptionSettlementTest:testUnderlyingAfterExercise() (gas: 375628)
OptionSettlementTest:testUnderlyingForFungibleOptionToken() (gas: 31096)
OptionSettlementTest:testUnderlyingWhenNotExercised() (gas: 304722)
OptionSettlementTest:testWriteAfterFullyExercisingDay() (gas: 511448)
OptionSettlementTest:testWriteMultipleWriteSameOptionType() (gas: 431145)
OptionSettlementTest:testUnderlyingWhenNotExercised() (gas: 304797)
OptionSettlementTest:testWriteAfterFullyExercisingDay() (gas: 511662)
OptionSettlementTest:testWriteMultipleWriteSameOptionType() (gas: 431295)
Loading