Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #332 from nervosnetwork/impr-err-msg
Browse files Browse the repository at this point in the history
chore: improve docs when to id missing
  • Loading branch information
keroro520 authored May 13, 2022
2 parents be1b44a + db042ac commit eee3de0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/api-server/src/methods/modules/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
QUERY_OFFSET_REACHED_END,
POLY_MAX_BLOCK_GAS_LIMIT,
POLY_MIN_GAS_PRICE,
COMPATIBLE_DOCS_URL,
} from "../constant";
import {
ExecuteOneQueryResult,
Expand Down Expand Up @@ -1421,7 +1422,9 @@ async function buildEthCallTx(

const toId: number | undefined = await ethAddressToAccountId(toAddress, rpc);
if (toId == null) {
throw new Error(`to id missing! toAddress: ${toAddress}`);
throw new Error(
`To id of address: ${toAddress} is missing. Is your to address a valid contract account? More info: ${COMPATIBLE_DOCS_URL}`
);
}
const nonce = 0;
const polyjuiceArgs = buildPolyjuiceArgs(
Expand Down

0 comments on commit eee3de0

Please sign in to comment.