feat: export generated contracts and methods (#40)
This commit is contained in:
parent
d62f8105a1
commit
b894d9a2ca
4
web3.nim
4
web3.nim
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue