Skip to content

Do not use structs on impose entitlement#38

Merged
jake-nyquist merged 3 commits intofeat/hardhat-coveragefrom
05-25-change_impose_to_skip_structs
May 26, 2022
Merged

Do not use structs on impose entitlement#38
jake-nyquist merged 3 commits intofeat/hardhat-coveragefrom
05-25-change_impose_to_skip_structs

Conversation

@jake-nyquist
Copy link
Contributor

@jake-nyquist jake-nyquist commented May 25, 2022

(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
image

@jake-nyquist jake-nyquist changed the title 05 25 change impose to skip structs Do not use structs on impose entitlement May 25, 2022
@jake-nyquist jake-nyquist force-pushed the 05-25-change_impose_to_skip_structs branch from df0332f to 4c9d5d8 Compare May 25, 2022 22:57
@jake-nyquist jake-nyquist requested a review from regynald May 25, 2022 23:01
uint32 assetId;
address vaultAddress;
uint128 strike;
uint128 bid;
Copy link
Contributor Author

@jake-nyquist jake-nyquist May 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jake-nyquist jake-nyquist merged commit c833cdb into feat/hardhat-coverage 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>
@regynald regynald deleted the 05-25-change_impose_to_skip_structs branch May 31, 2022 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants