2

Ethereum has a opportunity to create new contract from another. Does eosio has the same? I found a code with new account creation, but I didn't find nothing about setting code and abi from contract.

4

You can call eosio::setcode and eosio::setabi as inline-action to external contract or deferred-action and set code and abi of a contract you have the necessary permissions for, from within your contract.

|improve this answer|||||
  • The contract would have to have access to the compiled code it is deploying then, no? In other words, can you point to an already deployed contract and say "deploy that to my contract address"? – Byte Disciple Apr 26 '19 at 5:39
  • There is no way to retrieve source code of a contract deployed on chain unless the contract has an action in it to retrieve a copy of its own code. – cmadh Apr 26 '19 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.