streamingfast / substreams-rs

7 stars 3 forks source link

Unknown import when using state::add_bigdecimal #4

Closed ppoliani closed 1 year ago

ppoliani commented 1 year ago

I've tried to use the StoreAddBigDecimal store . I've added the correct type in the yaml file

  - name: store_nft_volume_from_offers
    kind: store
    updatePolicy: add
    valueType: bigdecimal
    ...

However, when I run the substream I get the following error

Received error An error occurred while streaming blocks: Status { code: Unknown, message: "error building pipeline: initiating module output caches: new wasm module: creating new instance: unknown import: `state::add_bigdecimal` has not been defined", source: None }

I tried the same approach but using StoreAddBigInt and it works file.

I'm on the latest version 0.5.0.

maoueh commented 1 year ago

I think it requires to update firehose-aptos to make it use latest version of substreams dependency.

ppoliani commented 1 year ago

@maoueh do you mean this code here

maoueh commented 1 year ago

Yeah I talk about this repo, @Eduard-Voiculescu is doing the update

Eduard-Voiculescu commented 1 year ago

@ppoliani

Ok so @maoueh and I fixed the issue and tested it. You can pull the recent changes here