UNPKG

apla-blockchain-tools

Version:

Module contains a number of tools to work with Apla Blockchain

66 lines 3.27 kB
{ "name": "libraryTest", "conditions": "true", "data": [ { "Type": "contracts", "Name": "TestIntPassing", "Value": "contract TestIntPassing {\n data {\n param int\n }\n conditions {\n\n }\n action {\n $result = $param;\n }\n}", "Conditions": "true" }, { "Type": "contracts", "Name": "TestFloatPassing", "Value": "contract TestFloatPassing {\n data {\n param float\n }\n conditions {\n }\n action {\n $result = $param;\n }\n}", "Conditions": "true" }, { "Type": "contracts", "Name": "TestStringPassing", "Value": "contract TestStringPassing {\n data {\n param string\n }\n conditions {\n }\n action {\n $result = $param;\n }\n}", "Conditions": "true" }, { "Type": "contracts", "Name": "TestBytesPassing", "Value": "contract TestBytesPassing {\n data {\n param bytes\n }\n conditions {\n \n }\n action {\n $result = $param;\n }\n}", "Conditions": "true" }, { "Type": "contracts", "Name": "TestBoolPassing", "Value": "contract TestBoolPassing {\n data {\n param bool\n }\n conditions {\n \n }\n action {\n $result = $param;\n }\n}", "Conditions": "true" }, { "Type": "contracts", "Name": "TestFilePassing", "Value": "contract TestFilePassing {\n data {\n param file\n }\n\n conditions {\n }\n action {\n // Int(64) - id of the application\n $result = @1UploadFile(\"Name,Data,ApplicationId\", \"testImage\", $param, Int(64))\n }\n}", "Conditions": "true" }, { "Type": "contracts", "Name": "TestArrayPassing", "Value": "contract TestArrayPassing {\n data {\n param array\n }\n conditions {\n \n }\n action {\n $result = $param;\n }\n}", "Conditions": "true" }, { "Type": "contracts", "Name": "TestMoneyPassing", "Value": "contract TestMoneyPassing {\n data {\n param money\n }\n conditions {\n \n }\n action {\n $result = $param;\n }\n}", "Conditions": "true" }, { "Type": "contracts", "Name": "TestParamsPassingOnlyRequired", "Value": "contract TestParamsPassingOnlyRequired {\n data {\n number int\n b bool\n }\n conditions {\n\n }\n action {\n $result = $number\n }\n}", "Conditions": "true" }, { "Type": "contracts", "Name": "TestParamsPassingRequiredAndOptional", "Value": "contract TestParamsPassingRequiredAndOptional {\n data {\n number int\n b bool \"optional\"\n }\n conditions {\n\n }\n action {\n $result = $number\n }\n}", "Conditions": "true" } ] }