Skip to content

Commit

Permalink
Don't include non-public functions in selector
Browse files Browse the repository at this point in the history
  • Loading branch information
franklinsch committed May 17, 2018
1 parent 8f71c3c commit 41378d2
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 41378d2

Please sign in to comment.