Summary
AxelarReporter._dispatch does not correctly reject an unsupported target chain when chainNames[targetChainId] has not been configured.
Required change
In veashi-contracts/src/adapters/axelar/AxelarReporter.sol, update the target-chain support check to detect the default empty string from the chainNames mapping using a raw empty-string check (for example, bytes(targetChainName).length == 0), while preserving the existing ChainIdNotSupported(targetChainId) revert.
Rationale
abi.encode(targetChainName) includes ABI offset and length metadata. Consequently, hashing abi.encode("") is different from keccak256(""), so the existing check does not recognize a missing mapping entry and can proceed with an empty Axelar destination chain name.
Affected area
veashi-contracts/src/adapters/axelar/AxelarReporter.sol
AxelarReporter._dispatch
Acceptance criteria
- An unconfigured
chainNames[targetChainId] entry reverts with ChainIdNotSupported(targetChainId).
- Configured, non-empty Axelar chain names continue to dispatch normally.
- Tests cover both the unconfigured-chain revert and a configured-chain path.
Backlinks
Summary
AxelarReporter._dispatchdoes not correctly reject an unsupported target chain whenchainNames[targetChainId]has not been configured.Required change
In
veashi-contracts/src/adapters/axelar/AxelarReporter.sol, update the target-chain support check to detect the default empty string from thechainNamesmapping using a raw empty-string check (for example,bytes(targetChainName).length == 0), while preserving the existingChainIdNotSupported(targetChainId)revert.Rationale
abi.encode(targetChainName)includes ABI offset and length metadata. Consequently, hashingabi.encode("")is different fromkeccak256(""), so the existing check does not recognize a missing mapping entry and can proceed with an empty Axelar destination chain name.Affected area
veashi-contracts/src/adapters/axelar/AxelarReporter.solAxelarReporter._dispatchAcceptance criteria
chainNames[targetChainId]entry reverts withChainIdNotSupported(targetChainId).Backlinks