CosmWasm / wasmvm

Go bindings to the running cosmwasm contracts with wasmer
Apache License 2.0
173 stars 99 forks source link

MemDB for testing failed #408

Closed DongLieu closed 1 year ago

DongLieu commented 1 year ago

405

I have an Interator Interface problem.

Currently, Wasmvm's KVStore and Cosmos-SDK's KVStore differ in the Iterator interface.

Specifically in the main SDK branch: Iterator(start, end []byte) (Iterator, error) with Iterator = dbm.Iterator (dbm “github.com/cosmos/cosmos-db”)

For SDK branch using cometbft: Iterator(start, end []byte) Iterator with Iterator = dbm.Iterator (dbm “github.com/cometbft/cometbft-db”)

Wasmvm: Iterator(start, end []byte) Iterator with 'Iterator = types.Iterator' ("github.com/CosmWasm/wasmvm/types")

This leads to Interator incompatibility. image

webmaster128 commented 1 year ago

Hey @DongLieu! Do I understand correctly you use wasmvm but not wasmd? Could you have a look at that diff in wasmd for the integration? https://github.com/CosmWasm/wasmd/pull/1245/files Can you do something similar in your project?

DongLieu commented 1 year ago

ok, thank you!