MCPcopy Create free account
hub / github.com/ZhangJinHaHaHa/AgentLens / parseWeiString

Function parseWeiString

contracts/scripts/deployConfig.js:44–52  ·  view source on GitHub ↗
(value, variableName, fallbackValue)

Source from the content-addressed store, hash-verified

42}
43
44function parseWeiString(value, variableName, fallbackValue) {
45 const rawValue = value || fallbackValue;
46
47 if (!/^\d+$/u.test(rawValue)) {
48 throw new Error(`${variableName} must be a non-negative integer string in wei`);
49 }
50
51 return BigInt(rawValue).toString();
52}
53
54function readRegistryDeploymentConfig(env, options = {}) {
55 const rpcUrl = env.EDGE_RPC_URL;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected