Skip to content

Commit

Permalink
refactor event parameters in InstanceStore and ProductStore to improv…
Browse files Browse the repository at this point in the history
…e indexing and enhance event logging (#787)
  • Loading branch information
doerfli committed Dec 10, 2024
1 parent f13a062 commit 185308b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
28 changes: 14 additions & 14 deletions contracts/instance/InstanceStore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ contract InstanceStore is
BaseStore
{

event LogProductStoreComponentInfoCreated(NftId componentNftId, StateId state, address createdby, address txOrigin);
event LogProductStoreComponentInfoUpdated(NftId componentNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStorePoolInfoCreated(NftId poolNftId, StateId state, address createdBy, address txOrigin);
event LogProductStorePoolInfoUpdated(NftId poolNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreDistributorTypeInfoCreated(DistributorType distributorType, StateId state, address createdBy, address txOrigin);
event LogProductStoreDistributorTypeInfoUpdated(DistributorType distributorType, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreDistributorInfoCreated(NftId distributorNftId, StateId state, address createdBy, address txOrigin);
event LogProductStoreDistributorInfoUpdated(NftId distributorNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreReferralInfoCreated(ReferralId referralId, StateId state, address createdBy, address txOrigin);
event LogProductStoreReferralInfoUpdated(ReferralId referralId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreBundleInfoCreated(NftId bundleNftId, StateId state, address createdBy, address txOrigin);
event LogProductStoreBundleInfoUpdated(NftId bundleNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreRequestInfoCreated(RequestId requestId, StateId state, address createdBy, address txOrigin);
event LogProductStoreRequestInfoUpdated(RequestId requestId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreComponentInfoCreated(NftId indexed componentNftId, StateId indexed state, address indexed createdby, address txOrigin);
event LogProductStoreComponentInfoUpdated(NftId indexed componentNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStorePoolInfoCreated(NftId indexed poolNftId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStorePoolInfoUpdated(NftId indexed poolNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreDistributorTypeInfoCreated(DistributorType indexed distributorType, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStoreDistributorTypeInfoUpdated(DistributorType indexed distributorType, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreDistributorInfoCreated(NftId indexed distributorNftId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStoreDistributorInfoUpdated(NftId indexed distributorNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreReferralInfoCreated(ReferralId indexed referralId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStoreReferralInfoUpdated(ReferralId indexed referralId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreBundleInfoCreated(NftId indexed bundleNftId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStoreBundleInfoUpdated(NftId indexed bundleNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreRequestInfoCreated(RequestId indexed requestId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStoreRequestInfoUpdated(RequestId indexed requestId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);


mapping(Key32 => IComponents.ComponentInfo) private _components;
Expand Down
28 changes: 14 additions & 14 deletions contracts/instance/ProductStore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ contract ProductStore is
ObjectCounter,
ObjectLifecycle
{
event LogProductStoreProductInfoCreated(NftId productNftId, StateId state, address createdBy, address txOrigin);
event LogProductStoreProductInfoUpdated(NftId productNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreFeeInfoCreated(NftId productNftId, StateId state, address createdBy, address txOrigin);
event LogProductStoreFeeInfoUpdated(NftId productNftId, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreRiskInfoCreated(RiskId riskId, StateId state, address createdBy, address txOrigin);
event LogProductStoreRiskInfoUpdated(RiskId riskId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStorePolicyInfoCreated(NftId policyNftId, StateId state, address createdBy, address txOrigin);
event LogProductStorePolicyInfoUpdated(NftId policyNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStorePremiumInfoCreated(NftId policyNftId, StateId state, address createdBy, address txOrigin);
event LogProductStorePremiumInfoUpdated(NftId policyNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreClaimInfoCreated(NftId policyNftId, ClaimId claimId, StateId state, address createdBy, address txOrigin);
event LogProductStoreClaimInfoUpdated(NftId policyNftId, ClaimId claimId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStorePayoutInfoCreated(NftId policyNftId, PayoutId payoutId, StateId state, address createdBy, address txOrigin);
event LogProductStorePayoutInfoUpdated(NftId policyNftId, PayoutId payoutId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreProductInfoCreated(NftId indexed productNftId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStoreProductInfoUpdated(NftId indexed productNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreFeeInfoCreated(NftId indexed productNftId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStoreFeeInfoUpdated(NftId indexed productNftId, address indexed updatedBy, address indexed txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreRiskInfoCreated(RiskId indexed riskId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStoreRiskInfoUpdated(RiskId indexed riskId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStorePolicyInfoCreated(NftId indexed policyNftId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStorePolicyInfoUpdated(NftId indexed policyNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStorePremiumInfoCreated(NftId indexed policyNftId, StateId indexed state, address indexed createdBy, address txOrigin);
event LogProductStorePremiumInfoUpdated(NftId indexed policyNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStoreClaimInfoCreated(NftId indexed policyNftId, ClaimId indexed claimId, StateId indexed state, address createdBy, address txOrigin);
event LogProductStoreClaimInfoUpdated(NftId indexed policyNftId, ClaimId indexed claimId, StateId indexed oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
event LogProductStorePayoutInfoCreated(NftId indexed policyNftId, PayoutId indexed payoutId, StateId indexed state, address createdBy, address txOrigin);
event LogProductStorePayoutInfoUpdated(NftId indexed policyNftId, PayoutId indexed payoutId, StateId indexed oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);

mapping(Key32 key32 => IComponents.ProductInfo) private _products;
mapping(Key32 key32 => IComponents.FeeInfo) private _fees;
Expand Down

0 comments on commit 185308b

Please sign in to comment.