+ "Value": "contract NewUser {\n data {\n NewPubkey string\n }\n conditions {\n $id = PubToID($NewPubkey)\n if $id == 0 {\n error LangRes(\"@1wrong_pub\", \"en\")\n }\n if DBFind(\"keys\").Columns(\"id\").WhereId($id).One(\"id\") != nil {\n error LangRes(\"@1template_user_exists\", \"en\")\n }\n }\n action {\n $pub = HexToPub($NewPubkey)\n $account = IdToAddress($id)\n $amount = Money(1000) * Money(1000000000000000000)\n DBInsert(\"keys\", {\"id\": $id, \"account\": $account, \"pub\": $pub, \"amount\": $amount, \"ecosystem\": 1})\n }\n}",
0 commit comments