tx · 4Kxwf7vDWc12nHvXyn6hwf7cpQ8dYZFhKZc4B2f4qo1c
3N44KHaD39vQf7XYfmYcmt84wkTCfEAXbGp: -0.01000000 Waves
2023.05.02 18:26 [2560310] smart account 3N44KHaD39vQf7XYfmYcmt84wkTCfEAXbGp > SELF 0.00000000 Waves
{
"type": 13,
"id": "4Kxwf7vDWc12nHvXyn6hwf7cpQ8dYZFhKZc4B2f4qo1c",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1683041216329,
"version": 2,
"chainId": 84,
"sender": "3N44KHaD39vQf7XYfmYcmt84wkTCfEAXbGp",
"senderPublicKey": "21HfJ2FKjebxPdfuLLNmwvz7Q4umgGiVG7mgZMP82mXM",
"proofs": [
"2YrV9yrZpo1NK2T2hwwygQpgGcq6mjVnmKEeUYvDBvoPdvgBUgPP3DeU3ZHKuNfJ9WezFKWzJZZNbdPFy5LiroTF"
],
"script": "base64:BgIECAISAAABAWkBCndyaXRlSGVsbG8ACQDMCAIJAQtTdHJpbmdFbnRyeQICBHRlc3QCBWhlbGxvBQNuaWwAsQAyvw==",
"height": 2560310,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: okaTLXNc43mE15oT1edRXwsrs8QfYtTNsJdgvMRZa6q
Next: 6UnPwAqMZ7SkwvYPgDXaqfmrBB9YwA1GYnQxDX4V3YJQ
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let kCounter = "counter" |
---|
5 | | - | |
---|
6 | | - | let kRandom = "random" |
---|
7 | | - | |
---|
8 | | - | let separator = "_" |
---|
9 | | - | |
---|
10 | | - | let kWinner = "winner" |
---|
11 | | - | |
---|
12 | | - | @Callable(i) |
---|
13 | | - | func payForWin (contractID,amount,status,maxUser,gameId) = { |
---|
14 | | - | let counter = valueOrElse(getInteger(this, ((kCounter + separator) + gameId)), 0) |
---|
15 | | - | if ((counter > maxUser)) |
---|
16 | | - | then throw("Maximum number of users") |
---|
17 | | - | else [StringEntry(((contractID + separator) + gameId), toString(amount)), StringEntry(((contractID + separator) + gameId), status), IntegerEntry(((kCounter + separator) + gameId), (counter + 1)), IntegerEntry(((contractID + separator) + gameId), counter), StringEntry(toString(counter), contractID)] |
---|
18 | | - | } |
---|
19 | | - | |
---|
20 | 4 | | |
---|
21 | 5 | | |
---|
22 | 6 | | @Callable(i) |
---|
23 | | - | func setRandom (gameId,random) = [IntegerEntry(((kRandom + separator) + gameId), random)] |
---|
24 | | - | |
---|
25 | | - | |
---|
26 | | - | |
---|
27 | | - | @Callable(i) |
---|
28 | | - | func setStatus (gameId,status) = { |
---|
29 | | - | let winnerNumber = getStringValue(this, ((kRandom + separator) + gameId)) |
---|
30 | | - | let winnerContract = getStringValue(this, winnerNumber) |
---|
31 | | - | [StringEntry(((kWinner + separator) + gameId), winnerContract), StringEntry(((winnerContract + separator) + gameId), status)] |
---|
32 | | - | } |
---|
| 7 | + | func writeHello () = [StringEntry("test", "hello")] |
---|
33 | 8 | | |
---|
34 | 9 | | |
---|