ajna-finance / ajna-core

The Ajna protocol is a non-custodial, peer-to-peer, permissionless lending, borrowing and trading system that requires no governance or external price feeds to function.
https://www.ajna.finance/
Other
31 stars 11 forks source link

Emit subset hash on pool creation #1029

Closed brianmcmichael closed 11 months ago

brianmcmichael commented 11 months ago

Description

Updated to target develop from #1012

Adds subsetHash to PoolCreated event.

Adds tests of event emission to ERC721 pool creation.

Purpose

subsetHash is a required parameter for pool lookup in the factory. For non-subset pools, this subsetHash can be obtained from the factory constant, but for ERC721 subset pools this value is calculated in the deploy function and not emitted or returned. Emitting the subsetHash in the event will allow integrators to get the hash from the event and use it for pool lookups without needing to inspect the transaction inputs and recalculating the value.

Impact

Slight gas increase for the additional event parameter on pool deploy.

Tasks