Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract accounts, Eval etc #209

Open
steinerkelvin opened this issue Oct 31, 2022 · 0 comments
Open

Contract accounts, Eval etc #209

steinerkelvin opened this issue Oct 31, 2022 · 0 comments

Comments

@steinerkelvin
Copy link
Contributor

If we get arrays (#35 #116 #208) (could also be simply limited to U120-tuples) we can implement an Eval operation that deserializes the array to a statement and executes it.

That way we can, for example, implement contracts that manage namespaces. The user would submit the serialized definition plus authentication that would be checked and then the statement would be executed on the behalf of the contract.

// `code` is a statement that deploys code on a namespace 
// that which is owned by `NamespaceManager 

fun (NamespaceManager code x y z) {
  (NamespaceManager code x y z) =
    if (Allowed code x y z) then {
       ask (Run code);
       (Done #1)
    } else {
       (Done #0)
    }
}

related to #172
cc @o-santi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant