Languages such as javascript and Perl have eval statement. Is it possible to have some functionalty similar to eval in Solidity ?

In particular, this is what I want to do: Suppose I deploy a contract A. A should have a function that takes address, function name and parameters of a contract that it can call. When I deploy a different contract B sometime later, I want to be able to call A's function and pass B's address, function name and parameters and have A call it.

Please note that at the time of deployment of A, I do not know the name of B's function and its signature. J

  • eval is an insecure function so why to implement it in a limited language like solidity Commented Dec 17, 2016 at 19:57
  • Suppose some "thing" is represented by a contract (A) which has been deployed. Then what this contract can do is fixed. If I want it to call the function of another contract (e.g. B) which is deployed later and whose signature (prototype) i do not know in advance, I cannot .
    – user813
    Commented Dec 19, 2016 at 5:52
  • 3
    so look at ethereum.stackexchange.com/questions/2404/… Commented Dec 19, 2016 at 17:52


Browse other questions tagged or ask your own question.