tx · CqwSP65EPmYR7kZuZBUMdfj8S6JdDCF25UUajAYFgyuG

3Mytb3VCj8DZHoLi79gYgdBebhSzear4bcv:  -0.00200000 Waves

2022.07.21 13:22 [2149397] smart account 3Mytb3VCj8DZHoLi79gYgdBebhSzear4bcv > SELF 0.00000000 Waves

{ "type": 13, "id": "CqwSP65EPmYR7kZuZBUMdfj8S6JdDCF25UUajAYFgyuG", "fee": 200000, "feeAssetId": null, "timestamp": 1658399024092, "version": 2, "chainId": 84, "sender": "3Mytb3VCj8DZHoLi79gYgdBebhSzear4bcv", "senderPublicKey": "8B7i8HQWLc9Wv2DgoTSyf8RT8xizHECxGY9kvtm5h8zY", "proofs": [ "3uHvEg5HoFnbvP6zMbyhYnp7KrCNY13rwZP5wgdd2S2VXPuasK3m7LuuiAKingqKc39yzhHdsfceoty2omLdBvXH" ], "script": "base64:AAIFAAAAAAAAAA0IAhIECgIICBIDCgEIAAAACAAAAAAKc2hpbnl3Z2dpZAEAAAAgiWnPAv+2urnUcZbXebiZdiawdNB3efRzbobw9HOfBiYAAAAAD3RyZWFzdXJ5QWRkcmVzcwEAAAAaAVRl+PAWCwTAWUJwGp5IjJf/ftwcYvLdu/0AAAAADm5hdGlvbnNBZGRyZXNzAQAAABoBVE2F6N70+ERrWRA7cF/Dt7llDlH1REZtoAAAAAASbWFya2V0cGxhY2VBZGRyZXNzAQAAABoBVB0huZPx/BjDpxtJcRZDllF066xULiW87wAAAAALYWRtaW5XYWxsZXQJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNcE50aVBTUlNxNk5uYVFZazM4QmZXU3paY2dBWVR5clE5AQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAAAQAAAA10cnlHZXRJbnRlZ2VyA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zdXJlS2V5BAAAAAVvd25lZAkBAAAADHRyeUdldFN0cmluZwAAAAEJAAEsAAAAAgUAAAALdHJlYXN1cmVLZXkCAAAAB19SZWRlZW0DCQEAAAACIT0AAAACBQAAAAVvd25lZAkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIJAAACAAAAAQIAAAAmVGhpcyB0cmVhc3VyZSBoYXMgYWxyZWFkeSBiZWVuIGNsYWltZWQEAAAAC3RyZWFzdXJlVmFsCQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEFAAAAC3RyZWFzdXJlS2V5CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAALdHJlYXN1cmVWYWwFAAAACnNoaW55d2dnaWQJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACBQAAAAt0cmVhc3VyZUtleQIAAAAHX1JlZGVlbQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAt0cmVhc3VyZUtleQUAAAADbmlsAAAAAIts8FA=", "height": 2149397, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HnhvqCntVaxnZfH4gUhv7bCwWZqqCQtioVwRJxX4wr7W Next: none Diff:
OldNewDifferences
4444 else {
4545 let owned = tryGetString((treasureKey + "_Redeem"))
4646 if ((owned != ""))
47- then throw("This treasure has been claimed")
47+ then throw("This treasure has been assigned to another player")
4848 else [StringEntry((treasureKey + "_Redeem"), toAddr)]
4949 }
5050
5454 func redeemTreasure (treasureKey) = {
5555 let owned = tryGetString((treasureKey + "_Redeem"))
5656 if ((owned != toString(i.caller)))
57- then throw("This treasure has been claimed")
57+ then throw("This treasure has already been claimed")
5858 else {
5959 let treasureVal = tryGetInteger(treasureKey)
6060 [ScriptTransfer(i.caller, treasureVal, shinywggid), DeleteEntry((treasureKey + "_Redeem")), DeleteEntry(treasureKey)]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let shinywggid = base58'AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf'
55
66 let treasuryAddress = base58'3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ'
77
88 let nationsAddress = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy'
99
1010 let marketplaceAddress = base58'3Mra7mjPipcQd5sJaRmXK8xgS4scb8gPF4A'
1111
1212 let adminWallet = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9")
1313
1414 func tryGetString (key) = match getString(this, key) {
1515 case b: String =>
1616 b
1717 case _ =>
1818 ""
1919 }
2020
2121
2222 func tryGetInteger (key) = match getInteger(this, key) {
2323 case b: Int =>
2424 b
2525 case _ =>
2626 0
2727 }
2828
2929
3030 func checkAdmin (caller) = if (if (if (if ((caller == adminWallet))
3131 then true
3232 else (caller == this))
3333 then true
3434 else (caller.bytes == nationsAddress))
3535 then true
3636 else (caller.bytes == treasuryAddress))
3737 then true
3838 else (caller.bytes == marketplaceAddress)
3939
4040
4141 @Callable(i)
4242 func discoverTreasure (treasureKey,toAddr) = if (!(checkAdmin(i.caller)))
4343 then throw("You are not authorized to perform this operation")
4444 else {
4545 let owned = tryGetString((treasureKey + "_Redeem"))
4646 if ((owned != ""))
47- then throw("This treasure has been claimed")
47+ then throw("This treasure has been assigned to another player")
4848 else [StringEntry((treasureKey + "_Redeem"), toAddr)]
4949 }
5050
5151
5252
5353 @Callable(i)
5454 func redeemTreasure (treasureKey) = {
5555 let owned = tryGetString((treasureKey + "_Redeem"))
5656 if ((owned != toString(i.caller)))
57- then throw("This treasure has been claimed")
57+ then throw("This treasure has already been claimed")
5858 else {
5959 let treasureVal = tryGetInteger(treasureKey)
6060 [ScriptTransfer(i.caller, treasureVal, shinywggid), DeleteEntry((treasureKey + "_Redeem")), DeleteEntry(treasureKey)]
6161 }
6262 }
6363
6464

github/deemru/w8io/026f985 
28.09 ms