| SC Arguments: [Name:SC_ACTION Type:uint64 Value:'0' Name:SC_ID Type:hash Value:'88fe27ba403415ce1947acd986fd9199156aa155ac68acb7a950272fde7104f6' Name:code Type:string Value:'Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "Orbis Tools")
31 STORE("descrHdr", "Friendly tools with Orbis")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "orbis-tools.tela")
34 STORE("mods", "")
40 STORE("DOC1", "8e846842db4084dac221b869a7a5f40ceef81b9573909b59de859c6859268af8")
41 STORE("DOC10", "ae89a132ecd508e4e1be9185c2157bc89ceed2d7ef8a48669149560122fe6dc8")
42 STORE("DOC11", "ffeda46496663d87007595ae6427ff4300375a3f07b1e2db780f6560cef5cbd5")
43 STORE("DOC2", "c20e3d126a0483faeb28704200d4c27e342d6e2f94c2a668c91a702c636a2c97")
44 STORE("DOC3", "dbd419799495be3f35dba87e62907ab7d2d5f62b192aad88d98498f34b546fbc")
45 STORE("DOC4", "d6caaaf5ae2db0027829cf2868462ee16f95967dff29f3e3d6dd692a1f3a599f")
46 STORE("DOC5", "ad753d71865a8979e81a3b2001c4d4d2e182519be27928f623a1bce3e120d0b5")
47 STORE("DOC6", "c84e1907ee9c1dc5500ee644401c8eb0e9ec1b3afd71a686396f6ae0d77246bb")
48 STORE("DOC7", "e5da786edd94532010ac87d364eec12d8724624bed5824d910974830e95cf4b1")
49 STORE("DOC8", "f1ef5953766fd3ffa6329a3b7a1cbb096611c6d10ec84bac3c3b9a355be35bad")
50 STORE("DOC9", "9d6bd2547f56e337e4876064db64e1a3f31ecd24a71e99e3c17b612f10fda0c0")
1000 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("telaVersion", "1.1.0")
60 STORE("commit", 0)
70 STORE(0, HEX(TXID()))
80 STORE("hash", HEX(TXID()))
85 STORE("likes", 0)
90 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
Function UpdateCode(code String, mods String) Uint64
10 IF LOAD("owner") == "anon" THEN GOTO 20
15 IF code == "" THEN GOTO 20
16 IF LOAD("owner") == address() THEN GOTO 30
20 RETURN 1
30 UPDATE_SC_CODE(code)
40 STORE("commit", LOAD("commit")+1)
50 STORE(LOAD("commit"), HEX(TXID()))
60 STORE("hash", HEX(TXID()))
70 STORE("mods", mods)
100 RETURN 0
End Function' Name:entrypoint Type:string Value:'UpdateCode' Name:mods Type:string Value:''] |