Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/d1ll0n/stack-packer
/ functions
Functions
174 in github.com/d1ll0n/stack-packer
⨍
Functions
174
◇
Types & classes
13
↓ 15 callers
Method
addConstant
* Add a constant and get the reference to it * @param name Name of constant to use * @param value Value for the constant * @returns Reference
src/code-gen/context.ts:80
↓ 10 callers
Function
toTypeName
(def: AbiType, roundToNearestByte?: boolean)
src/code-gen/fields.ts:9
↓ 9 callers
Function
arrJoiner
(arr: ArrayJoinInput)
src/lib/text.ts:25
↓ 9 callers
Function
toHex
(n: number)
src/lib/bytes.ts:6
↓ 8 callers
Function
arrayifyFields
( beforeStr: string, arr: string[] | string, afterStr: string )
src/code-gen/codegen-helpers.ts:5
↓ 8 callers
Function
modifyItem
( arrOrStr: ArrayJoinInput<string>, modification: ArrayModification )
src/lib/text.ts:69
↓ 7 callers
Function
mkdirIfNotExists
(target: string)
src/project/paths.ts:43
↓ 7 callers
Method
toPascalCase
()
src/lib/String.ts:2
↓ 6 callers
Function
applyCoderType
(field: ProcessedField, coderType: CoderType)
src/code-gen/fields.ts:99
↓ 6 callers
Function
buildAssemblyBlock
(lines: ArrayJoinInput<string>)
src/code-gen/codegen-helpers.ts:22
↓ 5 callers
Function
getDir
(_path: string)
src/project/paths.ts:10
↓ 5 callers
Function
getMaxUint
(bits: number)
src/lib/bytes.ts:18
↓ 5 callers
Method
handleFields
(fields: StructField[])
src/parser/index.ts:57
↓ 5 callers
Function
isSolFile
(_path: string)
src/project/paths.ts:6
↓ 5 callers
Function
maxUint
(bits: number)
src/lib/bytes.ts:16
↓ 5 callers
Function
parseMember
(scopeName: string, member: VariableDeclaration, defaultCoderType: CoderType)
src/parser/parser.ts:52
↓ 5 callers
Function
suffixLastString
( arrOrStr: ArrayJoinInput<string>, text: string )
src/lib/text.ts:113
↓ 4 callers
Method
addFunctions
(fns: CodeGenFunction[], sectionTitle?: string)
src/code-gen/context.ts:46
↓ 4 callers
Method
findGetterOrSetterForFields
( struct: ProcessedStruct, fields: ProcessedField[], fn: CodeGenFunction, contractName: string
src/code-gen/test/generic.ts:99
↓ 4 callers
Function
getFieldValue
(field: ProcessedField, kind: TestValueKind)
src/code-gen/test/hardhat.ts:63
↓ 4 callers
Function
getFieldValue
(field: ProcessedField, kind: TestValueKind)
src/code-gen/test/foundry.ts:62
↓ 4 callers
Function
getSetterTest
( testName: string, fields: ProcessedField[], setterCode: ArrayJoinInput<string>, getterCode: ArrayJoi
src/code-gen/test/hardhat.ts:105
↓ 4 callers
Function
getSetterTest
( testName: string, fields: ProcessedField[], setterCode: ArrayJoinInput<string>, getterCode: ArrayJoi
src/code-gen/test/foundry.ts:104
↓ 4 callers
Function
intAllowed
(typeName: AbiType)
src/code-gen/fields.ts:118
↓ 4 callers
Function
removeTrailingNewLines
(arrOrStr: ArrayJoinInput<string>)
src/lib/text.ts:128
↓ 3 callers
Function
_generateCall
(contractName: string, fn: {name:string}, args: string[])
src/code-gen/test/hardhat.ts:72
↓ 3 callers
Function
_generateCall
(contractName: string, fn: {name:string}, args: string[])
src/code-gen/test/foundry.ts:71
↓ 3 callers
Function
buildFunctionBlock
( name: string, input: string[] | string, output: string[] | string, lines: ArrayJoinInput<string> )
src/code-gen/codegen-helpers.ts:78
↓ 3 callers
Function
elementaryToTypeDef
(typeName: string)
src/parser/index.ts:221
↓ 3 callers
Function
generateIt
(name: string, code: ArrayJoinInput<string>[])
src/code-gen/test/hardhat.ts:73
↓ 3 callers
Function
generateIt
(name: string, code: ArrayJoinInput<string>[])
src/code-gen/test/foundry.ts:72
↓ 3 callers
Function
getAccessorOptions
(name: string, accessors?: Accessors)
src/code-gen/fields.ts:203
↓ 3 callers
Function
getEncoder
( struct: AbiStruct, fields: ProcessedField[], context: FileContext, name: string, maskReference?: s
src/code-gen/functions.ts:150
↓ 3 callers
Function
getExtension
(_path: string)
src/project/paths.ts:4
↓ 3 callers
Function
getFieldsGetter
(name: string, struct: AbiStruct, fields: ProcessedField[])
src/code-gen/functions.ts:23
↓ 3 callers
Function
shouldCheckForOverflow
(field: AbiStructField)
src/code-gen/fields.ts:122
↓ 3 callers
Function
toArray
(arr: ArrayJoinInput<string>)
src/lib/text.ts:5
↓ 3 callers
Function
tryFindHardhatProjectInPath
(contractsPath?: string)
src/project/hardhat.ts:46
↓ 2 callers
Function
applyGroupAccessCoder
( group: GroupType, fields: ProcessedField[], groupCoderLocation: 'get' | 'set' )
src/code-gen/fields.ts:78
↓ 2 callers
Function
buildNestedAssemblyOr
( fields: { positioned: ProcessedField["positioned"] }[] )
src/code-gen/codegen-helpers.ts:121
↓ 2 callers
Method
convertFieldType
(typeName: TypeName)
src/parser/index.ts:169
↓ 2 callers
Function
copyFnDef
(fn: CodeGenFunction)
src/code-gen/test/external.ts:4
↓ 2 callers
Function
findChild
(_path: string, childOrPossibleChildren: string | string[])
src/project/paths.ts:23
↓ 2 callers
Function
findDirectoryInTree
(_path: string, parentName: string)
src/project/paths.ts:16
↓ 2 callers
Function
generateCall
(args: string[])
src/code-gen/test/hardhat.ts:125
↓ 2 callers
Function
generateCall
(args: string[])
src/code-gen/test/foundry.ts:124
↓ 2 callers
Function
generateFileHeader
(withNotice?: boolean, unsafeWarning?: boolean, imports?: string[])
src/code-gen/context.ts:27
↓ 2 callers
Function
generateFunctionCode
(fn: CodeGenFunction)
src/code-gen/codegen-helpers.ts:48
↓ 2 callers
Function
generateSolFile
(codeLines: string[], context: FileContext, imports: string[])
src/code-gen/word-packer.ts:78
↓ 2 callers
Function
getFoundryRootFromSrc
(srcDirectory: string)
src/project/foundry.ts:5
↓ 2 callers
Function
getOmitMask
(offset: number, size: number)
src/lib/bytes.ts:20
↓ 2 callers
Function
getParameterDefinition
(field: AbiStructField)
src/code-gen/fields.ts:128
↓ 2 callers
Function
isDir
(_path: string)
src/project/paths.ts:8
↓ 2 callers
Function
parentOf
(_path: string)
src/project/paths.ts:12
↓ 2 callers
Function
parseSubNode
(scopeName: string, subNode: SubNodeType)
src/parser/parser.ts:142
↓ 2 callers
Function
prefixFirstString
( arrOrStr: ArrayJoinInput<string>, text: string )
src/lib/text.ts:95
↓ 2 callers
Function
uintAllowed
(typeName: AbiType)
src/code-gen/fields.ts:110
↓ 1 callers
Function
_getOverflowTest
(contractName: string, fn: {name:string}, args: string[], field: ProcessedField)
src/code-gen/test/hardhat.ts:78
↓ 1 callers
Function
_getOverflowTest
(contractName: string, fn: {name:string}, args: string[], field: ProcessedField)
src/code-gen/test/foundry.ts:77
↓ 1 callers
Function
_getUnderflowTest
(contractName: string, fn: {name:string}, args: string[], field: ProcessedField)
src/code-gen/test/hardhat.ts:87
↓ 1 callers
Function
_getUnderflowTest
(contractName: string, fn: {name:string}, args: string[], field: ProcessedField)
src/code-gen/test/foundry.ts:86
↓ 1 callers
Function
abiStructToSol
(struct: AbiStruct | AbiEnum)
src/code-gen/fields.ts:34
↓ 1 callers
Method
addSection
(title: string, code: ArrayJoinInput<string>[])
src/code-gen/context.ts:68
↓ 1 callers
Function
bitsRequired
(n: number, roundUp?: boolean)
src/lib/bytes.ts:42
↓ 1 callers
Method
clearCode
()
src/code-gen/context.ts:60
↓ 1 callers
Function
containsChild
(_path: string, child: string)
src/project/paths.ts:14
↓ 1 callers
Function
convertFieldType
(typeName: TypeName, structs: Record<string, AbiStruct>, enums: Record<string, AbiEnum>)
src/parser/index.ts:7
↓ 1 callers
Method
createLibrary
(structsAndEnums: Array<AbiStruct | AbiEnum>, context: FileContext)
src/code-gen/word-packer.ts:90
↓ 1 callers
Function
doMap
(subArr: ArrayJoinInput<string>, depth = 0)
src/lib/text.ts:27
↓ 1 callers
Function
generateCoderLibrary
(struct: ProcessedStruct, context: FileContext)
src/code-gen/word-packer.ts:27
↓ 1 callers
Function
generateComparisonFunctions
(struct: AbiStruct)
src/code-gen/functions.ts:92
↓ 1 callers
Function
generateEqualityFunction
(struct: AbiStruct)
src/code-gen/functions.ts:68
↓ 1 callers
Function
generateExternalCoder
( functions: CodeGenFunction[], structTypeName: string, structStorageName: string, libraryName: string
src/code-gen/test/external.ts:52
↓ 1 callers
Function
generateExternalFunction
(fn: CodeGenFunction, structStorageName: string, libraryName: string)
src/code-gen/test/external.ts:10
↓ 1 callers
Function
generateFieldAccessors
(struct: AbiStruct, field: ProcessedField, context: FileContext)
src/code-gen/functions.ts:128
↓ 1 callers
Function
generateFieldGetter
(struct: AbiStruct, field: ProcessedField)
src/code-gen/functions.ts:126
↓ 1 callers
Function
generateFieldSetter
( struct: AbiStruct, field: ProcessedField, context: FileContext )
src/code-gen/functions.ts:183
↓ 1 callers
Function
generateFoundryTestForFunction
( struct: ProcessedStruct, fn: CodeGenFunction, libraryName: string )
src/code-gen/test/foundry.ts:117
↓ 1 callers
Function
generateHardhatTest
( struct: ProcessedStruct, functions: CodeGenFunction[], libraryName: string )
src/code-gen/test/hardhat.ts:208
↓ 1 callers
Function
generateHardhatTestForFunction
( struct: ProcessedStruct, fn: CodeGenFunction, libraryName: string )
src/code-gen/test/hardhat.ts:118
↓ 1 callers
Function
generateInternalLibraryCall
(fn: CodeGenFunction, libraryName: string)
src/code-gen/codegen-helpers.ts:28
↓ 1 callers
Function
generateIsNullFunction
(struct: AbiStruct)
src/code-gen/functions.ts:44
↓ 1 callers
Function
generateNotice
(unsafe: boolean)
src/code-gen/comments.ts:29
↓ 1 callers
Function
getChunk
(index: number)
src/code-gen/codegen-helpers.ts:126
↓ 1 callers
Function
getDeclareConstant
(name: string, value: string)
src/code-gen/context.ts:7
↓ 1 callers
Function
getDecodeFunction
(struct: ProcessedStruct, fields: ProcessedField[])
src/code-gen/functions.ts:112
↓ 1 callers
Function
getDecodeGroupFunction
(struct: AbiStruct, group: ProcessedGroup)
src/code-gen/functions.ts:35
↓ 1 callers
Function
getEncodeFunction
( struct: ProcessedStruct, fields: ProcessedField[], context: FileContext )
src/code-gen/functions.ts:117
↓ 1 callers
Function
getEncodeGroupFunction
( struct: ProcessedStruct, group: ProcessedGroup, context: FileContext )
src/code-gen/functions.ts:99
↓ 1 callers
Function
getGroupOmissionMask
(fields: {type: { size?: number }, offset: number}[])
src/lib/bytes.ts:28
↓ 1 callers
Function
getHardhatProjectInfo
(argv: { output: string; input: string; constantsFile: any; testContracts?: string; hardhatOutput?: string })
src/project/hardhat.ts:73
↓ 1 callers
Function
getHardhatRootFromContracts
(srcDirectory: string)
src/project/hardhat.ts:31
↓ 1 callers
Function
getHardhatTestDirectory
(opts: { hardhatOutput?: string; rootDirectory: string; })
src/project/hardhat.ts:40
↓ 1 callers
Function
getInputFiles
(argv: { input: string })
src/project/inputs.ts:9
↓ 1 callers
Function
getMaxUintForField
(field: AbiStructField)
src/code-gen/fields.ts:146
↓ 1 callers
Function
getMinMaxValues
(fields: ProcessedField[])
src/code-gen/test/hardhat.ts:96
↓ 1 callers
Function
getMinMaxValues
(fields: ProcessedField[])
src/code-gen/test/foundry.ts:95
↓ 1 callers
Function
getOmissionMask
(bitsBefore: number, size: number)
src/lib/bytes.ts:36
↓ 1 callers
Function
getOverflowCheck
(originalFields: ProcessedField[], context: FileContext)
src/code-gen/functions.ts:208
↓ 1 callers
Function
getOverflowTest
(args: string[], field: ProcessedField)
src/code-gen/test/hardhat.ts:126
next →
1–100 of 174, ranked by callers