Skip to content

Commit 5922343

Browse files
authored
add new monad error mapping (#203)
1 parent c81344a commit 5922343

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/client/errors.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ var sei = ClientErrors{
303303
}
304304

305305
var monad = ClientErrors{
306-
Fatal: regexp.MustCompile("Gas limit too low"),
306+
Fatal: regexp.MustCompile("Gas limit too low"),
307+
InsufficientEth: regexp.MustCompile("Signer had insufficient balance"),
307308
}
308309

309310
const TerminallyStuckMsg = "transaction terminally stuck"

pkg/client/errors_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ func Test_Eth_Errors(t *testing.T) {
234234
{"[Request ID: 9dd78806-58c8-4e6d-89a8-a60962abe705] Error invoking RPC: transaction 0.0.3041916@1717691931.680570179 failed precheck with status INSUFFICIENT_PAYER_BALANCE", true, "hedera"},
235235
{"[Request ID: 6198d2a3-590f-4724-aae5-69fecead0c49] Insufficient funds for transfer", true, "hedera"},
236236
{"insufficient funds for gas * price + value: balance 0, tx cost 9327080000000000, overshot 9327080000000000", true, "Geth"},
237+
{"Signer had insufficient balance", true, "monad"},
237238
}
238239
for _, test := range tests {
239240
err = evmclient.NewSendErrorS(test.message)

0 commit comments

Comments
 (0)