Skip to content

Commit a67fa52

Browse files
committed
replace require with string with custom error
1 parent c07671e commit a67fa52

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ jobs:
7070
submodules: recursive
7171
- name: Set up environment
7272
uses: ./.github/actions/setup
73-
- run: rm foundry.toml
74-
- uses: crytic/[email protected]
73+
- run: Slither
74+
uses: crytic/[email protected]
7575

7676
codespell:
7777
runs-on: ubuntu-latest

contracts/crosschain/axelar/AxelarGatewaySource.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import {IERC7786GatewaySource} from "../interfaces/draft-IERC7786.sol";
1717
abstract contract AxelarGatewaySource is IERC7786GatewaySource, AxelarGatewayBase {
1818
using Strings for address;
1919

20+
error SendingValueNotSupported();
21+
2022
/// @inheritdoc IERC7786GatewaySource
2123
function supportsAttribute(bytes4 /*selector*/) public pure returns (bool) {
2224
return false;
@@ -29,7 +31,7 @@ abstract contract AxelarGatewaySource is IERC7786GatewaySource, AxelarGatewayBas
2931
bytes calldata payload,
3032
bytes[] calldata attributes
3133
) external payable returns (bytes32) {
32-
require(msg.value == 0, "Value not supported");
34+
require(msg.value == 0, SendingValueNotSupported());
3335
if (attributes.length > 0)
3436
revert UnsupportedAttribute(attributes[0].length < 0x04 ? bytes4(0) : bytes4(attributes[0][0:4]));
3537

0 commit comments

Comments
 (0)