hedera-json-rpc-relay
hedera-json-rpc-relay copied to clipboard
Transaction reverted with encoded error but string was expected
Description
The Axelar team is encountering an issue where they are expecting a revert message to be a string but it is coming back encoded. Below are the details of the scenario:
- Transaction Details: Transaction on Hashscan
-
Error Message:
AssertionError: Expected transaction to be reverted with custom error 'NativeCurrencyNotAccepted', but it didn't revert
- Assertion Location: AxelarGateway.js#L159
- Contract Code: The call that actually reverts is located at AxelarGatewayProxy.sol#L54
Steps to Reproduce
- Execute the transaction linked above on the Hedera testnet.
- Observe that the transaction reverts with the encoded version of the expected error string.
- Check the assertion in the
AxelarGateway.js
test file.
Expected Behavior The transaction should revert with NativeCurrencyNotAccepted
in the string.
Actual Behavior The transaction reverts with the right error but it is encoded and Axelar is expecting it to be a string in parity with many other evms they've integrated
Environment
- Hedera Network: Testnet
- Repository: axelarnetwork/axelar-cgp-solidity