SC CODE: Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "iconhdr.svg")
31 STORE("descrHdr", "Orbis icon")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "orbis_icon")
34 STORE("docType", "TELA-STATIC-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "16aec74ad5f6f9bcf290a5079140acff235a6162b3d7f5117c0334b2272317d7")
37 STORE("fileCheckS", "1f12577c77fe0aafd422ca3d16137b0becbdaec25a8294ceff23f18a4beb534")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 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
/*
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="205.55869mm"
height="205.55869mm"
viewBox="0 0 205.55869 205.55869"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<g
id="layer2"
transform="translate(-1.8312607,-32.27977)">
<circle
style="display:inline;fill:#000000;stroke-width:0.264583"
id="path1"
r="102.77934"
cy="135.05911"
cx="104.6106" />
</g>
<g
id="layer1"
transform="translate(-1.8312607,-26.988103)">
<g
id="g7"
style="display:inline"
transform="matrix(1,0.00591372,0,0.97994774,77.969284,-0.0972558)">
<path
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.264397"
id="circle6"
d="M 7.55159,129.8665 A 27.621277,34.751606 0 0 1 35.172867,95.114895 V 129.8665 Z"
transform="matrix(0.99999879,0.00155785,0,1,0,0)" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.264566"
id="path4-7-7-7-1"
cx="-16.547058"
cy="-158.63911"
rx="9.0093393"
ry="9.3338175"
transform="matrix(-0.99998179,0.00603462,0,-1,0,0)" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.281807"
id="path4-7-7-7-1-3"
cx="-35.716976"
cy="-104.85578"
rx="10.089917"
ry="9.4558334"
transform="matrix(-0.99998179,0.00603462,0,-1,0,0)" />
<circle
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.264583"
id="circle7"
cx="42.247051"
cy="129.46677"
r="16.694399" />
<rect
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.188892"
id="rect5-5"
width="18.013666"
height="29.753723"
x="7.5684695"
y="128.99492"
transform="matrix(0.99998179,-0.00603462,0,1,0,0)" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.237216"
id="path2-4-2-0"
cy="70.313683"
cx="142.44336"
rx="9.0441084"
ry="8.7193117"
transform="matrix(1,-0.00603473,0,1.0204626,-77.969284,0.56976948)" />
</g>
<g
id="g3-3"
style="display:inline"
transform="rotate(180,105.20646,129.70438)">
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.296566"
id="path2-4-0-7"
cx="42.303188"
cy="129.87827"
rx="34.751999"
ry="34.751606" />
<ellipse
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.281452"
id="path4-5"
cx="17.189165"
cy="127.94102"
rx="10.391689"
ry="9.1199684" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.270166"
id="path4-7-7"
cx="16.826178"
cy="131.10886"
rx="9.241395"
ry="9.4886303" />
<circle
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.264583"
id="path3-2"
cx="42.247051"
cy="129.46677"
r="16.694399" />
</g>
<g
id="g3"
style="display:inline">
<circle
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.296566"
id="path2-4-0"
cx="42.303188"
cy="129.87827"
r="34.751606" />
<ellipse
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.281452"
id="path4"
cx="17.189165"
cy="127.94102"
rx="10.391689"
ry="9.1199684" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.270166"
id="path4-7"
cx="16.826178"
cy="131.10886"
rx="9.241395"
ry="9.4886303" />
<circle
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.264583"
id="path3"
cx="42.247051"
cy="129.46677"
r="16.694399" />
<rect
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.264583"
id="rect5"
width="18.06073"
height="58.223885"
x="133.41624"
y="70.476585" />
<rect
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.296087"
id="rect6"
width="2.9771769"
height="37.145992"
x="151.50896"
y="91.619179" />
</g>
</g>
</svg>
*/ |
| SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "iconhdr.svg")
31 STORE("descrHdr", "Orbis icon")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "orbis_icon")
34 STORE("docType", "TELA-STATIC-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "16aec74ad5f6f9bcf290a5079140acff235a6162b3d7f5117c0334b2272317d7")
37 STORE("fileCheckS", "1f12577c77fe0aafd422ca3d16137b0becbdaec25a8294ceff23f18a4beb534")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 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
/*
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="205.55869mm"
height="205.55869mm"
viewBox="0 0 205.55869 205.55869"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<g
id="layer2"
transform="translate(-1.8312607,-32.27977)">
<circle
style="display:inline;fill:#000000;stroke-width:0.264583"
id="path1"
r="102.77934"
cy="135.05911"
cx="104.6106" />
</g>
<g
id="layer1"
transform="translate(-1.8312607,-26.988103)">
<g
id="g7"
style="display:inline"
transform="matrix(1,0.00591372,0,0.97994774,77.969284,-0.0972558)">
<path
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.264397"
id="circle6"
d="M 7.55159,129.8665 A 27.621277,34.751606 0 0 1 35.172867,95.114895 V 129.8665 Z"
transform="matrix(0.99999879,0.00155785,0,1,0,0)" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.264566"
id="path4-7-7-7-1"
cx="-16.547058"
cy="-158.63911"
rx="9.0093393"
ry="9.3338175"
transform="matrix(-0.99998179,0.00603462,0,-1,0,0)" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.281807"
id="path4-7-7-7-1-3"
cx="-35.716976"
cy="-104.85578"
rx="10.089917"
ry="9.4558334"
transform="matrix(-0.99998179,0.00603462,0,-1,0,0)" />
<circle
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.264583"
id="circle7"
cx="42.247051"
cy="129.46677"
r="16.694399" />
<rect
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.188892"
id="rect5-5"
width="18.013666"
height="29.753723"
x="7.5684695"
y="128.99492"
transform="matrix(0.99998179,-0.00603462,0,1,0,0)" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.237216"
id="path2-4-2-0"
cy="70.313683"
cx="142.44336"
rx="9.0441084"
ry="8.7193117"
transform="matrix(1,-0.00603473,0,1.0204626,-77.969284,0.56976948)" />
</g>
<g
id="g3-3"
style="display:inline"
transform="rotate(180,105.20646,129.70438)">
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.296566"
id="path2-4-0-7"
cx="42.303188"
cy="129.87827"
rx="34.751999"
ry="34.751606" />
<ellipse
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.281452"
id="path4-5"
cx="17.189165"
cy="127.94102"
rx="10.391689"
ry="9.1199684" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.270166"
id="path4-7-7"
cx="16.826178"
cy="131.10886"
rx="9.241395"
ry="9.4886303" />
<circle
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.264583"
id="path3-2"
cx="42.247051"
cy="129.46677"
r="16.694399" />
</g>
<g
id="g3"
style="display:inline">
<circle
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.296566"
id="path2-4-0"
cx="42.303188"
cy="129.87827"
r="34.751606" />
<ellipse
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.281452"
id="path4"
cx="17.189165"
cy="127.94102"
rx="10.391689"
ry="9.1199684" />
<ellipse
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.270166"
id="path4-7"
cx="16.826178"
cy="131.10886"
rx="9.241395"
ry="9.4886303" />
<circle
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.264583"
id="path3"
cx="42.247051"
cy="129.46677"
r="16.694399" />
<rect
style="display:inline;fill:#5dc067;fill-opacity:1;stroke-width:0.264583"
id="rect5"
width="18.06073"
height="58.223885"
x="133.41624"
y="70.476585" />
<rect
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:0.296087"
id="rect6"
width="2.9771769"
height="37.145992"
x="151.50896"
y="91.619179" />
</g>
</g>
</svg>
*/'] |