Do not use structs on impose entitlement#38
Merged
jake-nyquist merged 3 commits intofeat/hardhat-coveragefrom May 26, 2022
Merged
Do not use structs on impose entitlement#38jake-nyquist merged 3 commits intofeat/hardhat-coveragefrom
jake-nyquist merged 3 commits intofeat/hardhat-coveragefrom
Conversation
df0332f to
4c9d5d8
Compare
jake-nyquist
commented
May 26, 2022
| uint32 assetId; | ||
| address vaultAddress; | ||
| uint128 strike; | ||
| uint128 bid; |
Contributor
Author
There was a problem hiding this comment.
this scrambling is to fit in slots:
address 20 bytes
uin32 4 bytes
uint32 4 bytes
(empty: 4 bytes)
--------------
address 20 bytes
(empty 12 bytes)
-------
uint128 16 bytes
uint128 16 bytes
------
address 20 bytes
bool 1 bytes
regynald
approved these changes
May 26, 2022
jake-nyquist
added a commit
that referenced
this pull request
May 26, 2022
* Add boilerplate hardhat implementation * proto commit * vault coverage tests (#28) * vault coverage tests * 100% vault factory coverage * empty case * transfers * Adding js helpers for singing Entitlement * chainId for hardhat network * up to 68% test coverage * 85% coverage * checkpoint * 100% lines coverage in vaults Co-authored-by: Eliecer Chicott <eliecerchicott@Eliecers-MacBook-Pro-2.local> * [WIP] Call instrument tests (#29) * vault coverage tests * 100% vault factory coverage * empty case * transfers * Adding js helpers for singing Entitlement * chainId for hardhat network * up to 68% test coverage * 85% coverage * checkpoint * 100% lines coverage in vaults * Update gitignore WIP tests Working mintwitherc721 tests Use before each Most mintWithVault and mintWithEntitledVault tests mintWithEntitledVault coverage bid coverage settle coverage First reclaim test * move tests into a single file * add write with signature test (failing) Co-authored-by: Jacob R. Nyquist <jake@nyqu.ist> Co-authored-by: Eliecer Chicott <eliecerchicott@Eliecers-MacBook-Pro-2.local> * tweak BeaconSalts to be an internal library, rename state variables * Simplify reclaim asset (#31) * Simplify reclaim asset logic * Remaining reclaim tests * call instrument config coverage * getter coverage * settle option and return nft coverage * Fix rebase issue * Fix test error * protocol coverage (#32) * spellcheck (#33) * protocol coverage * spellcheck * Add more option events (#34) * Add option settled event * Remove console log tests * Add callsettled and callreclaimed events; burnexpiredotion function * burned expired option and coverage * Fix issue with _allowedVaultImplementation * Add solo vault test * mintWithErc721 while multivault exists coverage * burned expired option can't work on options with bids * covered call reclaim forge tests working again * all forge test working * Fix slither gh action (#36) * Update coverage.yml * Update slither.yml * Fix slither tag * gas savings, entitlement simplification; (#37) * Do not use structs on impose entitlement (#38) * change impose to skip structs * increase gas savings * address pr comments * fix build bug * no warnings * extra hardhat file cleanup * expand gas limit Co-authored-by: Eliecer Chicott <eliecerchicott@Eliecers-MacBook-Pro-2.local> Co-authored-by: Regynald Augustin <github@regynald.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(1) modifies the signature of imposeEntitlement to not have structs, which makes it callable from hardhat

(2) minimizes the sizes of certain types to more compactly store data