patractlabs / redspot

Redspot is an Substrate pallet-contracts (ink!) development environment. Compile your contracts and run them on a different networks. Redspot's core forks from Hardhat but changed a lot to suit substrate.
https://redspot.patract.io/
Other
67 stars 22 forks source link

Handling types with the same name #125

Closed KaiserKarel closed 2 years ago

KaiserKarel commented 3 years ago

I've got 2 contracts which expose types with identical names. Is there a way to add namespacing so that I can add both types to the redspot config?


// contract 1
pub struct Foo {
   balance: Balance,
   name: String,
}

// contract 2 
pub struct Foo {
   balance: Balance,
   name: i64,
   date: Timestamp
}
ii-ii-ii commented 3 years ago

Not yet, you can change the type name, such as Contract1Foo, Contract2Foo