MCPcopy Create free account
hub / github.com/d1ll0n/stack-packer / _getUnderflowTest

Function _getUnderflowTest

src/code-gen/test/hardhat.ts:87–94  ·  view source on GitHub ↗
(contractName: string, fn: {name:string}, args: string[], field: ProcessedField)

Source from the content-addressed store, hash-verified

85)
86
87const _getUnderflowTest = (contractName: string, fn: {name:string}, args: string[], field: ProcessedField) => generateIt(
88 `Reverts when ${field.name} underflows`,
89 [
90 `await expect(`,
91 _generateCall(contractName, fn, args),
92 ').to.be.revertedWith("0x11 (Arithmetic operation underflowed or overflowed outside of an unchecked block)");'
93 ]
94);
95
96const getMinMaxValues = (fields: ProcessedField[]) => {
97 const minValues = fields.map(field => getFieldValue(field, 'min'));

Callers 1

getUnderflowTestFunction · 0.70

Calls 2

generateItFunction · 0.70
_generateCallFunction · 0.70

Tested by

no test coverage detected