SC Arguments: [Name:SC_ACTION Type:uint64 Value:'0' Name:SC_ID Type:hash Value:'a67ffb88056a4f21f69503c17f8a7a3739ca7b62272a384efcf56777067d88fb' Name:code Type:string Value:'Function Initialize(content String) Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 StorePage("initScript", content)
1000 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", SIGNER())
50 STORE("version", "1.1")
100 RETURN 0
End Function
Function StorePage(name String, content String) Uint64
IF content == "" THEN GOTO 20
16 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE(name, content)
60 RETURN 0
End Function
Function DeletePage(name String) Uint64
16 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 DELETE(name)
60 RETURN 0
End Function
Function UpdateCode(code String) Uint64
15 IF code == "" THEN GOTO 20
16 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 UPDATE_SC_CODE(code)
100 RETURN 0' Name:entrypoint Type:string Value:'UpdateCode'] |