SC CODE: Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "main_tokens.js.gz")
31 STORE("descrHdr", "Orbis main_tokens.js")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "orbis_main_tokens_js")
34 STORE("docType", "TELA-JS-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "27671eeff0e462ba0539d01b04727d6a1389c0d79ef6829af7eb4127ef7300f3")
37 STORE("fileCheckS", "155c7c791f72590440ac0546ee548bcb1b7290c0683ef2f4f622f05120e9e449")
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
/*
H4sIAAAAAAAC/7xYzXLjuBG+z1P0uCZLKpFp7R7tkaa8tieZxD9TI23lsLW1hsiWhDUEsADQGsXWI+SWe14xj5BqAJRA/VnOpNYHF012f/2D7q8bPqoMgrGa5/bo7M2My0LNMpMzOVAPKA10gZm5zGFUydxyJdMWPL0BAMiVNEpgJtQ4TX7uX5zfwuDub1e3/V+gb5m2XI6zLEtaZ06ajyB9G9C5+TsTAu2FkhJzi0UN+QKs1wKpLEl51RqffsxEzW7QGDbGNEGtlU7akHwWyAzWGjBXlYaZRxpxbWyM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i6OKmN3C87tL6WqBLleVG4/rxRBSVr814ShNysdkJp6wyoyyOQT9NSaevJYy+QF9wGg19XENu0v2mR+B+XiNcuEIuomTcH7EYhNqbHjGnaFGl+3Kq6HqwCn5dDLlVe55JZBt3Iige4ZFRvEmdAT2krs+pT/65vNZfjtNVeSvub3HlRUKGdNv9cSbmCGoRS24h0JefX64bIlJXLA9p7DC0fYMxrBbOsbzV04a/9u9vMOO/5aJ6uQm+7EdKGH1rrij8KNaQJgzOgx/TngPZLG56AzvMUElaWgueMCu/kN6NksjxSj1NpquyfvlxnuUZm8W74G+b2py/XaW2hIS64fIjnglcKoyFNWH2qJJdNNI6gSyail4WaSSIFavECtfrVR/rruyc6xkyqWdpaZORq6O6lraEq5hkrS5TFxYSLIiW82F4ueP5Qr+pNNY1T9YgbahS3xkf1EMVdaRG+7tpFr1z94f9hHV2RhUZaSZ3On5f3+A3KcDM1V3LE9TRNzjXCXFVgqvAwY5KaBhwY2Al6Z+qd8QMMJtzAjGaxTwgwIerOHGk1rW89kBIcbUNu32NjxqUHdkdnJzhtZUkrbv3NHl4ns9+R397Wis/PTYJ7u4vgtuGPlL5i+SRNA0QbnLWmo3Qkuzh0/ea+zUiBNDjX41g0nPv2/+9s+bfOay4SF9RZcBQt1EdUDq4Y3L/LfA1Fd4kmjS+5NXi7P4aldNKYPusgcTCbX9f3oE7DsR2tnQzifvF9lPg+/W8AAAD//7EzLrEGFQAA
*/ |
| 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", "main_tokens.js.gz")
31 STORE("descrHdr", "Orbis main_tokens.js")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "orbis_main_tokens_js")
34 STORE("docType", "TELA-JS-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "27671eeff0e462ba0539d01b04727d6a1389c0d79ef6829af7eb4127ef7300f3")
37 STORE("fileCheckS", "155c7c791f72590440ac0546ee548bcb1b7290c0683ef2f4f622f05120e9e449")
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
/*
H4sIAAAAAAAC/7xYzXLjuBG+z1P0uCZLKpFp7R7tkaa8tieZxD9TI23lsLW1hsiWhDUEsADQGsXWI+SWe14xj5BqAJRA/VnOpNYHF012f/2D7q8bPqoMgrGa5/bo7M2My0LNMpMzOVAPKA10gZm5zGFUydxyJdMWPL0BAMiVNEpgJtQ4TX7uX5zfwuDub1e3/V+gb5m2XI6zLEtaZ06ajyB9G9C5+TsTAu2FkhJzi0UN+QKs1wKpLEl51RqffsxEzW7QGDbGNEGtlU7akHwWyAzWGjBXlYaZRxpxbWyMoNFWWvq/F8soLQythC4UKq+mKG02RnslkB5/nH8q0oTSdWxdvo6HVtaIXrfUaqzRmAumi30gTr+fM/k5KDRhxuSynr+IcBwEG4kn/5+f4W34dmC+b7gxXI7h8u4G0Bsy+7M1tDIruGFDgRSr1RWeLT9wKVH/ZXBzDV1I3puSScgFM6Z7JBQruBwfm9LJHPXen9DnHlA6ZCikVThxRluN/GbGzgWSC6VglKtkKFT+EHRD9GuOFPyx9oMZg/Y4eHP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