Hi guys, I’m trying to create uid
based on Address and AssetId in the indexer lib file, it works well like uid(event.address)
and uid(event.asset_id.0)
but how to make it together?
I’m trying to store data like this:
storage {
user_collateral: StorageMap<(Address, AssetId), u64> = StorageMap {},
}
Toolchain latest and indexer v0.20.8
Default host: aarch64-apple-darwin
fuelup home: /Users/alexey/.fuelup
installed toolchains
--------------------
beta-3-aarch64-apple-darwin
beta-4-rc.2-aarch64-apple-darwin
latest-aarch64-apple-darwin (default)
hotfix
my-custom-toolchain
active toolchain
-----------------
latest-aarch64-apple-darwin (default)
forc : 0.44.1
- forc-client
- forc-deploy : 0.44.1
- forc-run : 0.44.1
- forc-doc : 0.44.1
- forc-explore : 0.28.1
- forc-fmt : 0.44.1
- forc-index : 0.20.8
- forc-lsp : 0.44.1
- forc-tx : 0.44.1
- forc-wallet : 0.3.0
fuel-core : 0.20.4
fuel-core-keygen : Error getting version string
fuel-indexer : 0.20.8
fuels versions
---------------
forc : 0.45
forc-wallet : 0.45
Source code
https://github.com/compolabs/sway-lend/blob/beta-4/services/swaylend-indexer/src/lib.rs