MCPcopy Create free account
hub / github.com/wevm/viem / constructor

Method constructor

src/errors/node.ts:240–264  ·  view source on GitHub ↗
({
    cause,
    maxPriorityFeePerGas,
    maxFeePerGas,
  }: {
    cause?: BaseError | undefined
    maxPriorityFeePerGas?: bigint | undefined
    maxFeePerGas?: bigint | undefined
  } = {})

Source from the content-addressed store, hash-verified

238 static nodeMessage =
239 /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
240 constructor({
241 cause,
242 maxPriorityFeePerGas,
243 maxFeePerGas,
244 }: {
245 cause?: BaseError | undefined
246 maxPriorityFeePerGas?: bigint | undefined
247 maxFeePerGas?: bigint | undefined
248 } = {}) {
249 super(
250 [
251 `The provided tip (\`maxPriorityFeePerGas\`${
252 maxPriorityFeePerGas
253 ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei`
254 : ''
255 }) cannot be higher than the fee cap (\`maxFeePerGas\`${
256 maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''
257 }).`,
258 ].join('\n'),
259 {
260 cause,
261 name: 'TipAboveFeeCapError',
262 },
263 )
264 }
265}
266
267export type UnknownNodeErrorType = UnknownNodeError & {

Callers

nothing calls this directly

Calls 1

formatGweiFunction · 0.50

Tested by

no test coverage detected