Open Oni-giri opened 6 days ago
Hi there!
This is a problem due to Scallop and Navi exposing two different named addresses with the same name. This should be able to be resolved using the addr_subst
form in the Move.toml
which can be used to rename the math
named address on either or both of the packages that bring the math
address into scope. Give this a shot and it should work:
[package]
name = "test"
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
[dependencies]
Sui = { override = true, git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" }
ScallopProtocol = { git = "https://github.com/scallop-io/sui-lending-protocol.git", subdir = "contracts/protocol", rev = "mainnet", addr_subst = {"scallop_math" = "math" } }
lending_core = { git = "https://github.com/naviprotocol/protocol-interface.git", subdir = "lending_core", rev = "main", addr_susbst = {"lending_math" = "math" } }
Steps to Reproduce Issue
Consider an empty project with the following
Move.toml
:Expected Result
Everything compiles
Actual Result
Calling
sui move build
will return the following error:Remarks
Note that removing
ScallopProtocol
orlending_core
(Navi Finance) will compile fine.The issue here is likely that both protocols use their own
math
dependency :Given that both libraries are not overlapping, we can't try to override it.
System Information