tx · 4fZEMf3Ze5GMUnUDLrLSMWknHJjrLJ1fJzKQrKqYoziJ

3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB:  -0.01400000 Waves

2021.05.30 20:01 [1548680] smart account 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB > SELF 0.00000000 Waves

{ "type": 13, "id": "4fZEMf3Ze5GMUnUDLrLSMWknHJjrLJ1fJzKQrKqYoziJ", "fee": 1400000, "feeAssetId": null, "timestamp": 1622394136784, "version": 2, "chainId": 84, "sender": "3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB", "senderPublicKey": "CQ7vntBAYh2QZcKcqiiyEnQWWXsr98ysDptD23Wgxmvb", "proofs": [ "2SWDew91XW1YrZNUgqE2gv5NQ3VpkxZQhzdLuhYG4BNGxkkGdm2dbAjBuPDQQo9z5F69Te9XTjER5rv1PfaNyZwY" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAwAAAAAIa2l0dGVuSWQCAAAALEd1b2JjSHZXOVdxb3Rua0dVajdKa3BjYlh0Z1ZmQjM3VEE0SmtnU2o5UWJiAQAAAApnZW5lcmF0aW9uAAAAAQAAAANudW0DAwkAAGYAAAACBQAAAANudW0AAAAAAAAAAAAGCQAAZwAAAAIAAAAAAAAAASwFAAAAA251bQIAAAACRzEDAwkAAGYAAAACBQAAAANudW0AAAAAAAAAASwGCQAAZwAAAAIAAAAAAAAAA+gFAAAAA251bQIAAAACRzICAAAAAkczAQAAAA1pc3N1ZUdlbmVDb2RlAAAAAAQAAAAJdGltZXN0YW1wCAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAQAAAAMdGltZXN0YW1wU3RyCQABpAAAAAEFAAAACXRpbWVzdGFtcAQAAAAKdGltZXN0YW1wMgkBAAAACXRha2VSaWdodAAAAAIFAAAADHRpbWVzdGFtcFN0cgAAAAAAAAAAAgQAAAAHcGVyY2VudAkBAAAADXBhcnNlSW50VmFsdWUAAAABBQAAAAp0aW1lc3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AAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5pLBTew==", "height": 1548680, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GftuRzV8GiAb1E98hTJq9QgTDGGcquBnoAU9zZcupCm5 Next: 5DPyQmq66BmE1fjxHf74JKCNVmFHPt6MQoiJKyHD8rby Diff:
OldNewDifferences
2222 if ((percent == 0))
2323 then "AA-AA-AA-AA"
2424 else if (if ((percent > 0))
25- then true
26- else (3 >= percent))
25+ then (3 >= percent)
26+ else false)
2727 then "BB-BB-BB-BB"
2828 else if (if ((percent > 3))
29- then true
30- else (8 >= percent))
29+ then (8 >= percent)
30+ else false)
3131 then "CC-CC-CC-CC"
3232 else if (if ((percent > 8))
33- then true
34- else (15 >= percent))
33+ then (15 >= percent)
34+ else false)
3535 then "DD-DD-DD-DD"
3636 else if (if ((percent > 15))
37- then true
38- else (24 >= percent))
37+ then (24 >= percent)
38+ else false)
3939 then "EE-EE-EE-EE"
4040 else if (if ((percent > 24))
41- then true
42- else (35 >= percent))
41+ then (35 >= percent)
42+ else false)
4343 then "FF-FF-FF-FF"
4444 else if (if ((percent > 35))
45- then true
46- else (48 >= percent))
45+ then (48 >= percent)
46+ else false)
4747 then "GG-GG-GG-GG"
4848 else "HH-HH-HH-HH"
4949 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kittenId = "GuobcHvW9WqotnkGUj7JkpcbXtgVfB37TA4JkgSj9Qbb"
55
66 func generation (num) = if (if ((num > 0))
77 then true
88 else (300 >= num))
99 then "G1"
1010 else if (if ((num > 300))
1111 then true
1212 else (1000 >= num))
1313 then "G2"
1414 else "G3"
1515
1616
1717 func issueGeneCode () = {
1818 let timestamp = lastBlock.timestamp
1919 let timestampStr = toString(timestamp)
2020 let timestamp2 = takeRight(timestampStr, 2)
2121 let percent = parseIntValue(timestamp2)
2222 if ((percent == 0))
2323 then "AA-AA-AA-AA"
2424 else if (if ((percent > 0))
25- then true
26- else (3 >= percent))
25+ then (3 >= percent)
26+ else false)
2727 then "BB-BB-BB-BB"
2828 else if (if ((percent > 3))
29- then true
30- else (8 >= percent))
29+ then (8 >= percent)
30+ else false)
3131 then "CC-CC-CC-CC"
3232 else if (if ((percent > 8))
33- then true
34- else (15 >= percent))
33+ then (15 >= percent)
34+ else false)
3535 then "DD-DD-DD-DD"
3636 else if (if ((percent > 15))
37- then true
38- else (24 >= percent))
37+ then (24 >= percent)
38+ else false)
3939 then "EE-EE-EE-EE"
4040 else if (if ((percent > 24))
41- then true
42- else (35 >= percent))
41+ then (35 >= percent)
42+ else false)
4343 then "FF-FF-FF-FF"
4444 else if (if ((percent > 35))
45- then true
46- else (48 >= percent))
45+ then (48 >= percent)
46+ else false)
4747 then "GG-GG-GG-GG"
4848 else "HH-HH-HH-HH"
4949 }
5050
5151
5252 @Callable(i)
5353 func giveBirthKitten () = {
5454 let pmt = i.payments[0]
5555 let pmtId = toBase58String(value(pmt.assetId))
5656 if ((pmtId != kittenId))
5757 then throw("Please send Kitten token.")
5858 else {
5959 let kittenAmount = pmt.amount
6060 let issueQuantity = match getInteger(this, "issueQuantity") {
6161 case a: Int =>
6262 a
6363 case _ =>
6464 0
6565 }
6666 let newQuantity = (issueQuantity + 1)
6767 let generationType = generation(newQuantity)
6868 if ((kittenAmount > 300))
6969 then throw("Amount of Kitten tokens sent is 3 tokens.")
7070 else if ((300 > kittenAmount))
7171 then throw("Amount of Kitten tokens sent is 3 tokens.")
7272 else {
7373 let issueNft = Issue("Kitten(=^・^=)", ("generation:" + generationType), 1, 0, false)
7474 let issueNftId = calculateAssetId(issueNft)
7575 let nftTransfer = ScriptTransfer(i.caller, 1, issueNftId)
7676 let geneCode = issueGeneCode()
7777 [issueNft, nftTransfer, StringEntry(toBase58String(value(issueNftId)), geneCode)]
7878 }
7979 }
8080 }
8181
8282
8383 @Verifier(tx)
8484 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8585

github/deemru/w8io/026f985 
62.59 ms