diff --git a/.github/workflows/nuklaivm-ci.yml b/.github/workflows/nuklaivm-ci.yml index c75d7a9..2207d5b 100644 --- a/.github/workflows/nuklaivm-ci.yml +++ b/.github/workflows/nuklaivm-ci.yml @@ -46,9 +46,9 @@ jobs: - name: Run unit tests shell: bash run: scripts/tests.unit.sh - # - name: Run integration tests - # shell: bash - # run: scripts/tests.integration.sh + - name: Run integration tests + shell: bash + run: scripts/tests.integration.sh # nuklaivm-e2e-tests: # needs: [nuklaivm-lint, nuklaivm-unit-tests] diff --git a/actions/claim_marketplace_payment.go b/actions/claim_marketplace_payment.go index 7a258f4..9648218 100644 --- a/actions/claim_marketplace_payment.go +++ b/actions/claim_marketplace_payment.go @@ -49,6 +49,7 @@ func (*ClaimMarketplacePayment) GetTypeID() uint8 { func (c *ClaimMarketplacePayment) StateKeys(actor codec.Address) state.Keys { return state.Keys{ string(storage.AssetInfoKey(c.MarketplaceAssetAddress)): state.Read | state.Write, + string(storage.AssetInfoKey(c.PaymentAssetAddress)): state.Read | state.Write, string(storage.AssetAccountBalanceKey(c.PaymentAssetAddress, actor)): state.All, } } diff --git a/actions/claim_marketplace_payment_test.go b/actions/claim_marketplace_payment_test.go index 982c859..4d82757 100644 --- a/actions/claim_marketplace_payment_test.go +++ b/actions/claim_marketplace_payment_test.go @@ -133,6 +133,7 @@ func TestClaimMarketplacePaymentAction(t *testing.T) { metadataBytes, err := utils.MapToBytes(metadata) require.NoError(t, err) require.NoError(t, storage.SetAssetInfo(context.Background(), store, marketplaceAssetAddress, nconsts.AssetMarketplaceTokenID, []byte("name"), []byte("SYM"), 0, metadataBytes, []byte(marketplaceAssetAddress.String()), 0, 0, actor, codec.EmptyAddress, codec.EmptyAddress, codec.EmptyAddress, codec.EmptyAddress)) + require.NoError(t, storage.SetAssetInfo(context.Background(), store, baseAssetAddress, nconsts.AssetFungibleTokenID, []byte("name"), []byte("SYM"), 0, metadataBytes, []byte(baseAssetAddress.String()), 0, 0, codec.EmptyAddress, codec.EmptyAddress, codec.EmptyAddress, codec.EmptyAddress, codec.EmptyAddress)) return store }(), Assertion: func(ctx context.Context, t *testing.T, store state.Mutable) { diff --git a/actions/subscribe_dataset_marketplace.go b/actions/subscribe_dataset_marketplace.go index 091897f..6b1b34d 100644 --- a/actions/subscribe_dataset_marketplace.go +++ b/actions/subscribe_dataset_marketplace.go @@ -57,10 +57,11 @@ func (d *SubscribeDatasetMarketplace) StateKeys(actor codec.Address) state.Keys nftAddress := storage.AssetAddressNFT(d.MarketplaceAssetAddress, nil, actor) return state.Keys{ string(storage.AssetInfoKey(d.MarketplaceAssetAddress)): state.Read | state.Write, + string(storage.AssetInfoKey(d.PaymentAssetAddress)): state.Read | state.Write, string(storage.AssetInfoKey(nftAddress)): state.All, string(storage.AssetAccountBalanceKey(d.MarketplaceAssetAddress, actor)): state.Allocate | state.Write, + string(storage.AssetAccountBalanceKey(d.PaymentAssetAddress, actor)): state.Read | state.Write, string(storage.AssetAccountBalanceKey(nftAddress, actor)): state.All, - string(storage.AssetInfoKey(d.PaymentAssetAddress)): state.Read | state.Write, } }