feat: export generated contracts and methods (#40)

This commit is contained in:
Eric Mastro 2021-09-21 20:03:03 +10:00 committed by GitHub
parent d62f8105a1
commit b894d9a2ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -344,7 +344,7 @@ macro contract*(cname: untyped, body: untyped): untyped =
eventListener = ident "eventListener"
result.add quote do:
type
`cname` = object
`cname`* = object
for obj in objects:
case obj.kind:
@ -389,7 +389,7 @@ macro contract*(cname: untyped, body: untyped): untyped =
`encodedParams` &= `dataBuf`
var procDef = quote do:
proc `procName`(`senderName`: Sender[`cname`]): ContractCall[`output`] =
proc `procName`*(`senderName`: Sender[`cname`]): ContractCall[`output`] =
discard
for input in obj.functionObject.inputs:
procDef[3].add nnkIdentDefs.newTree(