Skip to content

Commit

Permalink
Merge pull request #218 from franklinsch/selector-public-funcs
Browse files Browse the repository at this point in the history
Don't include non-public functions in function selector
  • Loading branch information
franklinsch authored May 17, 2018
2 parents 8f71c3c + 41378d2 commit 2ebf275
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/IRGen/IULIAContract.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ struct IULIAContract {

let functionsCode = functions.map({ $0.rendered() }).joined(separator: "\n\n").indented(by: 6)

let publicFunctions = functions.filter { $0.functionDeclaration.isPublic }

// Create a function selector, to determine which function is called in the Ethereum transaction.
let functionSelector = IULIAFunctionSelector(functions: functions)
let functionSelector = IULIAFunctionSelector(functions: publicFunctions)
let selectorCode = functionSelector.rendered().indented(by: 6)

// Generate code for each function in the structs.
Expand Down

0 comments on commit 2ebf275

Please sign in to comment.