SC CODE: // Data
Function InitializePrivate() Uint64
10 STORE("owner", SIGNER())
20 STORE("xx", "0.00")
30 STORE("xy", "0.00")
40 STORE("xz", "NA")
50 STORE("yx", "0")
60 STORE("yy", "0")
70 STORE("yz", "NA")
80 STORE("zx", "dero")
90 STORE("zy", "NA")
100 STORE("zz", "NA")
110 RETURN 0
End Function
Function TuneParameters(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("xx", xx)
40 STORE("xy", xy)
50 STORE("xz", xz)
60 STORE("yx", yx)
70 STORE("yy", yy)
80 STORE("yz", yz)
90 STORE("zx", zx)
100 STORE("zy", zy)
110 STORE("zz", zz)
120 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 STORE("xx", "0.00")
30 STORE("xy", "0.00")
40 STORE("xz", "NA")
50 STORE("yx", "0")
60 STORE("yy", "0")
70 STORE("yz", "NA")
80 STORE("zx", "dero")
90 STORE("zy", "NA")
100 STORE("zz", "NA")
110 RETURN 0
End Function
Function TuneParameters(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("xx", xx)
40 STORE("xy", xy)
50 STORE("xz", xz)
60 STORE("yx", yx)
70 STORE("yy", yy)
80 STORE("yz", yz)
90 STORE("zx", zx)
100 STORE("zy", zy)
110 STORE("zz", zz)
120 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'] |