Reputation: 11
I have a contract that is able to call another module on chain from within itself, and it is working as follows:
(defun call-other(nft-id)
(mod-2.defun-name ...params)
I am trying to do it dynamically by passing module name of "mod-2" to the defun, and hopefully using a symbol to call mod-2 dynamically but it cant resolve mod.
Ideal:
(defun call-other(nft-id:string mod:string)
('mod.defun-name ...params )
Any ideas would be greatly appreciated
Upvotes: 0
Views: 77
Reputation: 11
You can pass modules as params and call them as follows :
(From Babena marm implementations; awesome job folks and thanks!)
Upvotes: 1