Closed ra0x3 closed 11 months ago
@segfault-magnet
AssetId
)configurables
in their Sway contract with something like AssetId
without making some non-trivial changes to a ton of indexer code #[NoStd]
pub struct AssetId {
pub value: ::fuels::types::Bits256,
}
:(
AssetId
)Check the SDK version. AssetId should be the fuel core type since version fuels
0.49.0.
Lemme know if it is newer than the above.
@segfault-magnet Version is fuels = { version = "0.50", default-features = false }
I tested this locally, we're resolving the type to the AssetId from fuel types.
How can I reproduce this issue @ra0x3 ? Cannot access the link in the issue, getting 404.
@segfault-magnet
foo.txt
file, you'll see the code that I pasted above ☝🏼
cargo expand
in an indexer module - so shows all the SDK expanded codemain.sw
are the configurables that I added to produce this result@ra0x3 the Abigen
used in the code generation is from fuels
0.46
. Can you update it over in fuel-indexer-macros
's Cargo.toml
? Anything after 0.49 should be ok.
@ra0x3
Edit: Heck since I seem to be blind, might as well add one more @ra0x3 :D
Ahh ok @segfault-magnet I see fuels
and fuels-code-gen
are separate. Let me try this.
@segfault-magnet Purrrffect 🐱 worked like a charm thanks!
Usage of certain types in Sway causes types to be generated in the ABI that clash with indexer scalar types
An example of these "certain types" usage in a contract
For now, we will just skip deriving types from these clashing types
How we discovered this:
configurables
in the contract (which I didn't know you could do) - but is fine in generalconfigurables
to our test indexer contracts, I noticed all of this