Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
enhancement: add support for sway generics (#1332)
Browse files Browse the repository at this point in the history
* enhancement: add support for sway generics

updates

* lostman feedback

---------

Co-authored-by: Rashad Alston <[email protected]>
  • Loading branch information
ra0x3 and Rashad Alston authored Sep 11, 2023
1 parent a4e5159 commit c7d9f97
Show file tree
Hide file tree
Showing 21 changed files with 1,148 additions and 455 deletions.
12 changes: 8 additions & 4 deletions packages/fuel-indexer-lib/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ lazy_static! {

/// Sway ABI types we don't support and won't in the near future.
pub static ref IGNORED_ABI_JSON_TYPES: HashSet<&'static str> =
HashSet::from(["()", "struct Vec"]);
HashSet::from(["()"]);

/// Fuel VM receipt-related types.
pub static ref FUEL_RECEIPT_TYPES: HashSet<&'static str> = HashSet::from([
Expand Down Expand Up @@ -209,14 +209,18 @@ lazy_static! {


/// ABI types not allowed in the contract ABI.
pub static ref DISALLOWED_ABI_JSON_TYPES: HashSet<&'static str> = HashSet::from([]);
pub static ref UNSUPPORTED_ABI_JSON_TYPES: HashSet<&'static str> = HashSet::from(["Vec"]);

/// Generic Sway ABI types.
pub static ref GENERIC_TYPES: HashSet<&'static str> = HashSet::from([
pub static ref IGNORED_GENERIC_METADATA: HashSet<&'static str> = HashSet::from([
"generic T",
"raw untyped ptr",
"struct RawVec",
"struct Vec"
]);

pub static ref GENERIC_STRUCTS: HashSet<&'static str> = HashSet::from([
"Vec",
"Option"
]);

/// Set of Rust primitive types.
Expand Down
Loading

0 comments on commit c7d9f97

Please sign in to comment.