tx · HkZSCRHNeGyFoAzcHkK4AdK4LRroo3pGVmcYysjuNv9T

3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB:  -0.01400000 Waves

2021.06.01 04:36 [1550638] smart account 3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB > SELF 0.00000000 Waves

{ "type": 13, "id": "HkZSCRHNeGyFoAzcHkK4AdK4LRroo3pGVmcYysjuNv9T", "fee": 1400000, "feeAssetId": null, "timestamp": 1622511381167, "version": 2, "chainId": 84, "sender": "3Mr97MBt1TwRZHBK8R1EFDz8S8mxui5U4zB", "senderPublicKey": "CQ7vntBAYh2QZcKcqiiyEnQWWXsr98ysDptD23Wgxmvb", "proofs": [ "4jxeKX3KwoTwCD1iivKr9ytgaehk6B4SYJN7XHdyYoGPiD4fch8L6CztYkmCoLa4kAQukp9huTHy5obRe3f2goWS" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAABAAAAAAIa2l0dGVuSWQCAAAALEd1b2JjSHZXOVdxb3Rua0dVajdKa3BjYlh0Z1ZmQjM3VEE0SmtnU2o5UWJiAQAAAA9nZXRSYW5kb21OdW1iZXIAAAAEAAAACHZhcmlhbnRzAAAABHR4SWQAAAAUaGF0Y2hpbmdGaW5pc2hIZWlnaHQAAAAGb2Zmc2V0BAAAAA9yYW5kb21TZWVkQmxvY2sJAQAAAAV2YWx1ZQAAAAEJAAPtAAAAAQkAAGUAAAACBQAAABRoYXRjaGluZ0ZpbmlzaEhlaWdodAAAAAAAAAAAAQQAAAAKcmFuZG9tSGFzaAkAAfcAAAABCQAAywAAAAIFAAAABHR4SWQJAQAAAAV2YWx1ZQAAAAEIBQAAAA9yYW5kb21TZWVkQmxvY2sAAAADdnJmCQAAagAAAAIJAASyAAAAAgUAAAAKcmFuZG9tSGFzaAkAAGgAAAACBQAAAAZvZmZzZXQAAAAAAAAAAAgFAAAACHZhcmlhbnRzAQAAAApnZW5lcmF0aW9uAAAAAQAAAANudW0DAwkAAGYAAAACBQAAAAN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lbmVDb2RlAAAAAQUAAAAKdHlwZVJhbmRvbQkABEwAAAACBQAAAAhpc3N1ZU5mdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEFAAAACmlzc3VlTmZ0SWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAppc3N1ZU5mdElkBQAAAAhnZW5ldHlwZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAANaXNzdWVRdWFudGl0eQUAAAALbmV3UXVhbnRpdHkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5pprkoA==", "height": 1550638, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HaCCQux7hW7Y88t4uUCBmqngSm2wskXnCVjJPjTcxDRp Next: 6o29o3F6Ua9zfeNsuzZwiNeCUndoMnKBQbR66kmkPKPs Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kittenId = "GuobcHvW9WqotnkGUj7JkpcbXtgVfB37TA4JkgSj9Qbb"
55
66 func getRandomNumber (variants,txId,hatchingFinishHeight,offset) = {
77 let randomSeedBlock = value(blockInfoByHeight((hatchingFinishHeight - 1)))
88 let randomHash = sha256((txId + value(randomSeedBlock.vrf)))
99 (toInt(randomHash, (offset * 8)) % variants)
1010 }
1111
1212
1313 func generation (num) = if (if ((num > 0))
1414 then true
1515 else (300 >= num))
1616 then "G1"
1717 else if (if ((num > 300))
1818 then true
1919 else (1000 >= num))
2020 then "G2"
2121 else "G3"
2222
2323
2424 func geneCode (num) = if ((num == 100))
2525 then "II-II-II-II"
2626 else if (if ((num >= 1))
2727 then (3 >= num)
2828 else false)
2929 then "BB-BB-BB-BB"
3030 else if (if ((num > 3))
3131 then (8 >= num)
3232 else false)
3333 then "CC-CC-CC-CC"
3434 else if (if ((num > 8))
3535 then (15 >= num)
3636 else false)
3737 then "DD-DD-DD-DD"
3838 else if (if ((num > 15))
3939 then (24 >= num)
4040 else false)
4141 then "EE-EE-EE-EE"
4242 else if (if ((num > 24))
4343 then (35 >= num)
4444 else false)
4545 then "FF-FF-FF-FF"
4646 else if (if ((num > 35))
4747 then (48 >= num)
4848 else false)
4949 then "GG-GG-GG-GG"
5050 else if (if ((num > 48))
5151 then (51 >= num)
5252 else false)
5353 then "AA-AA-AA-AA"
5454 else "HH-HH-HH-HH"
5555
5656
5757 @Callable(i)
5858 func giveBirthKitten () = {
5959 let pmt = i.payments[0]
6060 let pmtId = toBase58String(value(pmt.assetId))
6161 if ((pmtId != kittenId))
6262 then throw("Please send Kitten token.")
6363 else {
6464 let kittenAmount = pmt.amount
6565 if ((kittenAmount > 300))
6666 then throw("Amount of Kitten tokens sent is 3 tokens.")
6767 else if ((300 > kittenAmount))
6868 then throw("Amount of Kitten tokens sent is 3 tokens.")
6969 else {
7070 let issueQuantity = match getInteger(this, "issueQuantity") {
7171 case a: Int =>
7272 a
7373 case _ =>
7474 0
7575 }
7676 let newQuantity = (issueQuantity + 1)
7777 let generationType = generation(newQuantity)
7878 let issueNft = Issue("Kitten(=^・^=)", ("generation:" + generationType), 1, 0, false)
7979 let issueNftId = calculateAssetId(issueNft)
8080 let blockHeight = lastBlock.height
8181 let typeRandom = getRandomNumber(100, issueNftId, blockHeight, 0)
8282 let genetype = geneCode(typeRandom)
8383 [issueNft, ScriptTransfer(i.caller, 1, issueNftId), StringEntry(toBase58String(value(issueNftId)), genetype), IntegerEntry("issueQuantity", newQuantity)]
8484 }
8585 }
8686 }
8787
8888
8989 @Verifier(tx)
9090 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
9191

github/deemru/w8io/026f985 
29.78 ms