SC CODE: // Data
Function InitializePrivate() Uint64
10 STORE("owner", SIGNER())
20 initGroupA ()
30 initGroupB ()
40 initGroupC ()
50 RETURN 0
End Function
Function initGroupA() Uint64
10 STORE("ox", "NA")
20 STORE("oy", "NA")
30 STORE("oz", "NA")
40 STORE("px", "NA")
50 STORE("py", "NA")
60 STORE("pz", "NA")
70 STORE("qx", "NA")
80 STORE("qy", "NA")
90 STORE("qz", "NA")
100 STORE("rx", "NA")
110 STORE("ry", "NA")
120 STORE("rz", "NA")
130 RETURN 0
End Function
Function initGroupB() Uint64
10 STORE("sx", "NA")
20 STORE("sy", "NA")
30 STORE("sz", "NA")
40 STORE("tx", "NA")
50 STORE("ty", "NA")
60 STORE("tz", "NA")
70 STORE("ux", "NA")
80 STORE("uy", "NA")
90 STORE("uz", "NA")
100 STORE("vx", "NA")
110 STORE("vy", "NA")
120 STORE("vz", "NA")
130 RETURN 0
End Function
Function initGroupC() Uint64
10 STORE("wx", "NA")
20 STORE("wy", "NA")
30 STORE("wz", "NA")
40 STORE("xx", "NA")
50 STORE("xy", "NA")
60 STORE("xz", "NA")
70 STORE("yx", "NA")
80 STORE("yy", "NA")
90 STORE("yz", "NA")
100 STORE("zx", "NA")
110 STORE("zy", "NA")
120 STORE("zz", "NA")
130 RETURN 0
End Function
Function TuneGroupA(ox String, oy String, oz String, px String, py String, pz String, qx String, qy String, qz String, rx String, ry String, rz String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("ox", ox)
40 STORE("oy", oy)
50 STORE("oz", oz)
60 STORE("px", px)
70 STORE("py", py)
80 STORE("pz", pz)
90 STORE("qx", qx)
100 STORE("qy", qy)
110 STORE("qz", qz)
120 STORE("rx", rx)
130 STORE("ry", ry)
140 STORE("rz", rz)
150 RETURN 0
End Function
Function TuneGroupB(sx String, sy String, sz String, tx String, ty String, tz String, ux String, uy String, uz String, vx String, vy String, vz String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("sx", sx)
40 STORE("sy", sy)
50 STORE("sz", sz)
60 STORE("tx", tx)
70 STORE("ty", ty)
80 STORE("tz", tz)
90 STORE("ux", ux)
100 STORE("uy", uy)
110 STORE("uz", uz)
120 STORE("vx", vx)
130 STORE("vy", vy)
140 STORE("vz", vz)
150 RETURN 0
End Function
Function TuneGroupC(wx String, wy String, wz String, xx String, xy String, xz String, yx String, yy String, yz String, zx String, zy String, zz String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("wx", wx)
40 STORE("wy", wy)
50 STORE("wz", wz)
60 STORE("xx", xx)
70 STORE("xy", xy)
80 STORE("xz", xz)
90 STORE("yx", yx)
100 STORE("yy", yy)
110 STORE("yz", yz)
120 STORE("zx", zx)
130 STORE("zy", zy)
140 STORE("zz", zz)
150 RETURN 0
End Function
Function Withdraw(amount Uint64) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 SEND_DERO_TO_ADDRESS(SIGNER(),amount)
40 RETURN 0
End Function
Function TransferOwnership(newowner String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("tmpowner",ADDRESS_RAW(newowner))
40 RETURN 0
End Function
Function ClaimOwnership() Uint64
10 IF LOAD("tmpowner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("owner",SIGNER()) // ownership claim successful
40 RETURN 0
End Function
Function UpdateCode(code String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 UPDATE_SC_CODE(code)
40 RETURN 0
End Function |
SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'// Data
Function InitializePrivate() Uint64
10 STORE("owner", SIGNER())
20 initGroupA ()
30 initGroupB ()
40 initGroupC ()
50 RETURN 0
End Function
Function initGroupA() Uint64
10 STORE("ox", "NA")
20 STORE("oy", "NA")
30 STORE("oz", "NA")
40 STORE("px", "NA")
50 STORE("py", "NA")
60 STORE("pz", "NA")
70 STORE("qx", "NA")
80 STORE("qy", "NA")
90 STORE("qz", "NA")
100 STORE("rx", "NA")
110 STORE("ry", "NA")
120 STORE("rz", "NA")
130 RETURN 0
End Function
Function initGroupB() Uint64
10 STORE("sx", "NA")
20 STORE("sy", "NA")
30 STORE("sz", "NA")
40 STORE("tx", "NA")
50 STORE("ty", "NA")
60 STORE("tz", "NA")
70 STORE("ux", "NA")
80 STORE("uy", "NA")
90 STORE("uz", "NA")
100 STORE("vx", "NA")
110 STORE("vy", "NA")
120 STORE("vz", "NA")
130 RETURN 0
End Function
Function initGroupC() Uint64
10 STORE("wx", "NA")
20 STORE("wy", "NA")
30 STORE("wz", "NA")
40 STORE("xx", "NA")
50 STORE("xy", "NA")
60 STORE("xz", "NA")
70 STORE("yx", "NA")
80 STORE("yy", "NA")
90 STORE("yz", "NA")
100 STORE("zx", "NA")
110 STORE("zy", "NA")
120 STORE("zz", "NA")
130 RETURN 0
End Function
Function TuneGroupA(ox String, oy String, oz String, px String, py String, pz String, qx String, qy String, qz String, rx String, ry String, rz String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("ox", ox)
40 STORE("oy", oy)
50 STORE("oz", oz)
60 STORE("px", px)
70 STORE("py", py)
80 STORE("pz", pz)
90 STORE("qx", qx)
100 STORE("qy", qy)
110 STORE("qz", qz)
120 STORE("rx", rx)
130 STORE("ry", ry)
140 STORE("rz", rz)
150 RETURN 0
End Function
Function TuneGroupB(sx String, sy String, sz String, tx String, ty String, tz String, ux String, uy String, uz String, vx String, vy String, vz String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("sx", sx)
40 STORE("sy", sy)
50 STORE("sz", sz)
60 STORE("tx", tx)
70 STORE("ty", ty)
80 STORE("tz", tz)
90 STORE("ux", ux)
100 STORE("uy", uy)
110 STORE("uz", uz)
120 STORE("vx", vx)
130 STORE("vy", vy)
140 STORE("vz", vz)
150 RETURN 0
End Function
Function TuneGroupC(wx String, wy String, wz String, xx String, xy String, xz String, yx String, yy String, yz String, zx String, zy String, zz String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("wx", wx)
40 STORE("wy", wy)
50 STORE("wz", wz)
60 STORE("xx", xx)
70 STORE("xy", xy)
80 STORE("xz", xz)
90 STORE("yx", yx)
100 STORE("yy", yy)
110 STORE("yz", yz)
120 STORE("zx", zx)
130 STORE("zy", zy)
140 STORE("zz", zz)
150 RETURN 0
End Function
Function Withdraw(amount Uint64) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 SEND_DERO_TO_ADDRESS(SIGNER(),amount)
40 RETURN 0
End Function
Function TransferOwnership(newowner String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("tmpowner",ADDRESS_RAW(newowner))
40 RETURN 0
End Function
Function ClaimOwnership() Uint64
10 IF LOAD("tmpowner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 STORE("owner",SIGNER()) // ownership claim successful
40 RETURN 0
End Function
Function UpdateCode(code String) Uint64
10 IF LOAD("owner") == SIGNER() THEN GOTO 30
20 RETURN 1
30 UPDATE_SC_CODE(code)
40 RETURN 0
End Function'] |