Stored lambdas approach:
It allows any packable value as a parameter and the method that computes the new value can be updated.
import smartpy as sp
def __init__(self, **kargs):
def calc(self, data):
self.data.value = self.data.logic(data)
You could do something like this:
Or just store upgradable structures as bytes and lambdas to unpack/pack and process those bytes. (Expensive and doesn't work with big maps)
Is it feasible to this without giving the admin developer too much
No, having an upgradable contract means that the contract can change its behavior to do unintended things. ...
Another way is dependency injection: the upgradable contract takes as a parameter a contract address or a lambda that is called. The caller can thus "upgrade" the original contract by varying the supplied address / lambda. The pro is also the con of this approach: it allows the the contract client to interact with the contract in ways the contract ...