This is due to runBuildConfigStep() of warp.ts overwriting baseChainName and baseMetadata for multiple collaterals. These variables are then passed downstream to be used in deploy plan and dryrun.
Consider removing, or redefining the dependency on baseChainName and baseMetadata in the downstream functions (deploy plan, dry-run, etc.). For synthetic tokens, we can simply rely on baseMetadata as it is expected that all collaterals will be the same.
Remove HyERC20/ERC721.buildTokenMetadata() and move any extra logic to the CLI
Nice to Have
Allow the user to pick the synthetic token's metadata if there are multiple collateral instead of relying on the last baseMetadata
Problem
Currently, the CLI cannot handle a config with multiple collaterals on different chains. For example,
This is due to
runBuildConfigStep()
of warp.ts overwritingbaseChainName
andbaseMetadata
for multiple collaterals. These variables are then passed downstream to be used in deploy plan and dryrun.Also,
buildTokenMetadata()
of HypERC20/HypERC721Deployer is duplicated in the CLI.Solution
baseChainName
andbaseMetadata
in the downstream functions (deploy plan, dry-run, etc.). For synthetic tokens, we can simply rely onbaseMetadata
as it is expected that all collaterals will be the same.HyERC20/ERC721.buildTokenMetadata()
and move any extra logic to the CLINice to Have
baseMetadata