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

Function _getUnderflowTest

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

Source from the content-addressed store, hash-verified

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