The @hypelane-xyz/core package doesn't export the ABIs for the core contracts in a way that's discoverable and conveniently usable with libraries like Viem. We do export the Ethers V5 Factories, from which the ABI can be retrieved, but that's not direct and obvious.
Solution
Export the ABIs. They already exist in the solidity/artifacts dir but we need to modify the package files and exports fields.
The Celo ABIs package does a good job and structuring the exports to enable tree-shaking and support both CJS/ESM but the downside of their approach is that each ABI is under its own path. There may be a better solution, I'm not sure.
Nice to Have
Find a way to avoid the duplication of ABIs between the typechain Ethers5 artifacts and the pure ABIs
Problem
The
@hypelane-xyz/core
package doesn't export the ABIs for the core contracts in a way that's discoverable and conveniently usable with libraries like Viem. We do export the Ethers V5 Factories, from which the ABI can be retrieved, but that's not direct and obvious.Solution
Export the ABIs. They already exist in the
solidity/artifacts
dir but we need to modify the packagefiles
andexports
fields.The Celo ABIs package does a good job and structuring the exports to enable tree-shaking and support both CJS/ESM but the downside of their approach is that each ABI is under its own path. There may be a better solution, I'm not sure.
Nice to Have
Find a way to avoid the duplication of ABIs between the typechain Ethers5 artifacts and the pure ABIs