Renaming Sway imports causes abigen!() macro to fail
Author: soltheonCreated Nov 25, 2025Updated Nov 25, 2025
I am trying to import PoolId from Mira and Reactor exchanges, so I renamed one like this:
use interfaces::{data_structures::PoolId, mira_amm::MiraAMM};
use reactor_interfaces::{reactor_pool::ReactorPool, data_structures::PoolId as ReactorPoolId};....this compiles successfully with forc, but when I try to use the script in fuels-rs it fails to find that type:
error[E0412]: cannot find type `ReactorPoolId` in this scope
--> bin/reactor_arbitrage.rs:20:1
|
20 | / abigen!(Script(
21 | | name = "SimulationScript",
22 | | abi = "./sway/scripts/simulate_reactor/out/release/simulate_reactor-abi.json"
23 | | ));
| |__^ not found in this scope
|
= note: this error originates in the macro `abigen` (in Nightly builds, run with -Z macro-backtrace for more info)fuels = { version = "0.76.0", features=["std", "coin-cache"] } forc 0.70.1
Source: FuelLabs/fuels-rs