SecretNetwork
SecretNetwork copied to clipboard
Add Iterator feature support for contracts
It's about time we start supporting the iterator flag - this will bring us up to par with most of the Cosmwasm v1 feature set (excluding raw queries), and support for most of the stuff in the cosmwasm-plus storage package.
To support this flag afaik we need to add support for the scan_db
and db_next
calls, which shouldn't be too difficult. Our keys are encrypted, so the standard behaviour can't be lifted 1:1 from Cosmwasm, but I suspect there probably won't be too much difference.
The main issue here is that in order to decrypt the key-value pair, the contract must know what's the key beforehand. Also, the encrypted key is actually encrypted after being sha256ed.