stellar / soroban-examples

Example Soroban Contracts
Apache License 2.0
65 stars 68 forks source link

Add contract that generically deploys another contract and calls a constructor #55

Closed jonjove closed 2 years ago

jonjove commented 2 years ago

What problem does your feature solve?

There are no automatically called constructors, so we should present an example of how constructors can be safely handled.

What would you like to see?

A simple contract with a function deploy that takes a binary blob, a function name, and a list of arguments. The contract creates a contract from the binary blob then calls the specified function with the provided arguments.

What alternatives are there?

In the long run we should evaluate whether to provide a native constructor functionality.