diff --git a/x/ecocredit/base/keeper/msg_bridge_receive_test.go b/x/ecocredit/base/keeper/msg_bridge_receive_test.go index c526423536..3f75e02086 100644 --- a/x/ecocredit/base/keeper/msg_bridge_receive_test.go +++ b/x/ecocredit/base/keeper/msg_bridge_receive_test.go @@ -127,6 +127,7 @@ func (s *bridgeReceiveSuite) AProjectWithIdAndReferenceId(a, b string) { func (s *bridgeReceiveSuite) ACreditBatchWithDenomAndIssuerAlice(a string) { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Issuer: s.alice, Denom: a, Open: true, // always true unless specified diff --git a/x/ecocredit/base/keeper/msg_bridge_test.go b/x/ecocredit/base/keeper/msg_bridge_test.go index 4f132de15d..0c0669e0cb 100644 --- a/x/ecocredit/base/keeper/msg_bridge_test.go +++ b/x/ecocredit/base/keeper/msg_bridge_test.go @@ -215,6 +215,7 @@ func (s *bridgeSuite) creditBatchSetup() { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: pKey, + ClassKey: s.classKey, Denom: s.batchDenom, }) require.NoError(s.t, err) diff --git a/x/ecocredit/base/keeper/msg_cancel_test.go b/x/ecocredit/base/keeper/msg_cancel_test.go index 875da420d1..76490a9cf6 100644 --- a/x/ecocredit/base/keeper/msg_cancel_test.go +++ b/x/ecocredit/base/keeper/msg_cancel_test.go @@ -68,6 +68,7 @@ func (s *cancel) ACreditBatchWithDenom(a string) { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Denom: a, }) require.NoError(s.t, err) @@ -101,6 +102,7 @@ func (s *cancel) ACreditBatchFromCreditClassWithCreditType(a string) { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Denom: s.batchDenom, }) require.NoError(s.t, err) @@ -246,6 +248,7 @@ func (s *cancel) creditBatchSetup() { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Denom: s.batchDenom, }) require.NoError(s.t, err) diff --git a/x/ecocredit/base/keeper/msg_create_batch.go b/x/ecocredit/base/keeper/msg_create_batch.go index 96e5123306..02fbe823c4 100644 --- a/x/ecocredit/base/keeper/msg_create_batch.go +++ b/x/ecocredit/base/keeper/msg_create_batch.go @@ -74,6 +74,7 @@ func (k Keeper) CreateBatch(ctx context.Context, req *types.MsgCreateBatch) (*ty EndDate: endDate, IssuanceDate: issuanceDate, Open: req.Open, + ClassKey: class.Key, }) if err != nil { return nil, err diff --git a/x/ecocredit/base/keeper/msg_mint_batch_credits_test.go b/x/ecocredit/base/keeper/msg_mint_batch_credits_test.go index b9436da8ee..38cfc00b86 100644 --- a/x/ecocredit/base/keeper/msg_mint_batch_credits_test.go +++ b/x/ecocredit/base/keeper/msg_mint_batch_credits_test.go @@ -84,6 +84,7 @@ func (s *mintBatchCredits) AProjectWithId(a string) { func (s *mintBatchCredits) ACreditBatchWithDenomAndIssuerAlice(a string) { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Issuer: s.alice, Denom: a, Open: true, // always true unless specified @@ -109,6 +110,7 @@ func (s *mintBatchCredits) ACreditBatchWithDenomOpenAndIssuerAlice(a, b string) Issuer: s.alice, Denom: a, ProjectKey: s.projectKey, + ClassKey: s.classKey, Open: open, }) require.NoError(s.t, err) diff --git a/x/ecocredit/base/keeper/msg_retire_test.go b/x/ecocredit/base/keeper/msg_retire_test.go index d7582d6b41..bce31fb06a 100644 --- a/x/ecocredit/base/keeper/msg_retire_test.go +++ b/x/ecocredit/base/keeper/msg_retire_test.go @@ -67,6 +67,7 @@ func (s *retire) ACreditBatchWithDenom(a string) { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Denom: a, }) require.NoError(s.t, err) @@ -106,6 +107,7 @@ func (s *retire) ACreditBatchFromCreditClassWithCreditType(a string) { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Denom: s.batchDenom, }) require.NoError(s.t, err) @@ -279,6 +281,7 @@ func (s *retire) creditBatchSetup() { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Denom: s.batchDenom, }) require.NoError(s.t, err) diff --git a/x/ecocredit/base/keeper/msg_seal_batch_test.go b/x/ecocredit/base/keeper/msg_seal_batch_test.go index 77608c20c2..71bcf2e12b 100644 --- a/x/ecocredit/base/keeper/msg_seal_batch_test.go +++ b/x/ecocredit/base/keeper/msg_seal_batch_test.go @@ -73,6 +73,7 @@ func (s *sealBatch) AProjectWithId(a string) { func (s *sealBatch) ACreditBatchWithDenomAndIssuerAlice(a string) { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Issuer: s.alice, Denom: a, Open: true, diff --git a/x/ecocredit/base/keeper/msg_send_test.go b/x/ecocredit/base/keeper/msg_send_test.go index a69a26f613..89f8296c0a 100644 --- a/x/ecocredit/base/keeper/msg_send_test.go +++ b/x/ecocredit/base/keeper/msg_send_test.go @@ -69,6 +69,7 @@ func (s *send) ACreditBatchWithDenom(a string) { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Denom: a, }) require.NoError(s.t, err) @@ -102,6 +103,7 @@ func (s *send) ACreditBatchFromCreditClassWithCreditType(a string) { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Denom: s.batchDenom, }) require.NoError(s.t, err) @@ -355,6 +357,7 @@ func (s *send) creditBatchSetup() { bKey, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Denom: s.batchDenom, }) require.NoError(s.t, err) diff --git a/x/ecocredit/base/keeper/msg_update_batch_metadata_test.go b/x/ecocredit/base/keeper/msg_update_batch_metadata_test.go index 8f8369b6a9..cee14c1e22 100644 --- a/x/ecocredit/base/keeper/msg_update_batch_metadata_test.go +++ b/x/ecocredit/base/keeper/msg_update_batch_metadata_test.go @@ -77,6 +77,7 @@ func (s *updateBatchMetadata) AProjectWithId(a string) { func (s *updateBatchMetadata) ACreditBatchWithBatchDenomAndIssuerAlice(a string) { _, err := s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Issuer: s.alice, Denom: a, Open: true, // true unless specified @@ -92,6 +93,7 @@ func (s *updateBatchMetadata) ACreditBatchWithBatchDenomIssuerAliceAndOpen(a, b _, err = s.k.stateStore.BatchTable().InsertReturningID(s.ctx, &api.Batch{ ProjectKey: s.projectKey, + ClassKey: s.classKey, Issuer: s.alice, Denom: a, Open: open,