SC CODE: /*
101 111 111
101 100 100
101 100 111
101 100 100
101 111 111
I C E
*/
Function InitializePrivate() Uint64
10 IF EXISTS("owner") THEN GOTO 110
20 STORE("owner", ADDRESS_RAW("dero1qy2gyktqak3vqxl6k80g5at50z92ltj0xyyj4j8j22c5s2zjjpncsqq9wwyly"))
30 STORE("image_url", "https://github.com/ahmedv-D/ice/blob/main/Untitled.jpeg")
31 STORE("type", "G45-FAT")
32 STORE("timestamp", BLOCK_TIMESTAMP())
40 STORE("name", "ICE")
50 STORE("symbol", "ICE")
55 STORE("native_symbol", "ICE")
60 STORE("decimals", 0)
65 STORE("native_decimals", 0)
70 STORE("totalsupply", 137268000)
75 STORE("minted", 0)
100 RETURN 0
110 RETURN 1
End Function
Function MintAnon() Uint64
10 DIM minted as Uint64
80 LET minted = LOAD("minted")
85 IF minted >= LOAD("totalsupply") THEN GOTO 110
90 SEND_ASSET_TO_ADDRESS(SIGNER(), 124, SCID())
95 STORE("minted", minted + 124)
100 RETURN 0
110 RETURN 1
End Function
Function DisplayToken() Uint64
1 DIM amount as Uint64
2 DIM signerString as String
3 LET signerString = ADDRESS_STRING(SIGNER())
4 IF signerString == "" THEN GOTO 10
5 LET amount = ASSETVALUE(SCID())
6 IF EXISTS("owner_" + signerString) == 0 THEN GOTO 8
7 LET amount = amount + LOAD("owner_" + signerString)
8 STORE("owner_" + signerString, amount)
9 RETURN 0
10 RETURN 1
End Function
Function RetrieveToken(amount Uint64) Uint64
1 DIM storedAmount as Uint64
2 DIM signerString as String
3 LET signerString = ADDRESS_STRING(SIGNER())
4 LET storedAmount = LOAD("owner_" + signerString)
5 IF amount > storedAmount THEN GOTO 13
6 SEND_ASSET_TO_ADDRESS(SIGNER(), amount, SCID())
7 LET storedAmount = storedAmount - amount
8 IF storedAmount == 0 THEN GOTO 11
9 STORE("owner_" + signerString, storedAmount)
10 RETURN 0
11 DELETE("owner_" + signerString)
12 RETURN 0
13 RETURN 1
End Function |
| SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'/*
101 111 111
101 100 100
101 100 111
101 100 100
101 111 111
I C E
*/
Function InitializePrivate() Uint64
10 IF EXISTS("owner") THEN GOTO 110
20 STORE("owner", ADDRESS_RAW("dero1qy2gyktqak3vqxl6k80g5at50z92ltj0xyyj4j8j22c5s2zjjpncsqq9wwyly"))
30 STORE("image_url", "https://github.com/ahmedv-D/ice/blob/main/Untitled.jpeg")
31 STORE("type", "G45-FAT")
32 STORE("timestamp", BLOCK_TIMESTAMP())
40 STORE("name", "ICE")
50 STORE("symbol", "ICE")
55 STORE("native_symbol", "ICE")
60 STORE("decimals", 0)
65 STORE("native_decimals", 0)
70 STORE("totalsupply", 137268000)
75 STORE("minted", 0)
100 RETURN 0
110 RETURN 1
End Function
Function MintAnon() Uint64
10 DIM minted as Uint64
80 LET minted = LOAD("minted")
85 IF minted >= LOAD("totalsupply") THEN GOTO 110
90 SEND_ASSET_TO_ADDRESS(SIGNER(), 124, SCID())
95 STORE("minted", minted + 124)
100 RETURN 0
110 RETURN 1
End Function
Function DisplayToken() Uint64
1 DIM amount as Uint64
2 DIM signerString as String
3 LET signerString = ADDRESS_STRING(SIGNER())
4 IF signerString == "" THEN GOTO 10
5 LET amount = ASSETVALUE(SCID())
6 IF EXISTS("owner_" + signerString) == 0 THEN GOTO 8
7 LET amount = amount + LOAD("owner_" + signerString)
8 STORE("owner_" + signerString, amount)
9 RETURN 0
10 RETURN 1
End Function
Function RetrieveToken(amount Uint64) Uint64
1 DIM storedAmount as Uint64
2 DIM signerString as String
3 LET signerString = ADDRESS_STRING(SIGNER())
4 LET storedAmount = LOAD("owner_" + signerString)
5 IF amount > storedAmount THEN GOTO 13
6 SEND_ASSET_TO_ADDRESS(SIGNER(), amount, SCID())
7 LET storedAmount = storedAmount - amount
8 IF storedAmount == 0 THEN GOTO 11
9 STORE("owner_" + signerString, storedAmount)
10 RETURN 0
11 DELETE("owner_" + signerString)
12 RETURN 0
13 RETURN 1
End Function'] |