from ontology.interop.System.App import DynamicAppCall
from ontology.interop.System.Runtime import Notify
def Main(operation, args):
if operation == "DynamicCallContract":
if len(args) != 3:
return False
revesedContractAddress = args[0]
opt = args[1]
params = args[2]
return DynamicCallContract(revesedContractAddress, opt, params)
return False
def DynamicCallContract(revesedContractAddress, operation, params):
res = DynamicAppCall(revesedContractAddress, operation, [params])
Notify(["the result of the DynamicCall is: ", res])
return res